summaryrefslogtreecommitdiff
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-03-27 11:42:15 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-03-27 11:42:15 +0100
commit12f203a0987935b79870a9502b7e148fa064897c (patch)
treef75a50bee3da01c3104857891e97c03ac8e7145e /libavcodec/utils.c
parentef8ab2f953079106bb4d72f9ce0af9c38f919130 (diff)
parentc24469e812501903a46a06eff9722a82e136e841 (diff)
Merge commit 'c24469e812501903a46a06eff9722a82e136e841'
* commit 'c24469e812501903a46a06eff9722a82e136e841': utils: add workaround for AVHWAccel in ff_get_buffer compat code configure: Remove a stray msmpeg4v1 encoder declaration Conflicts: libavcodec/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index d547ba1b14..a341a7dfb4 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -761,7 +761,9 @@ do { \
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(frame->format);
planes = av_pix_fmt_count_planes(frame->format);
- if (!planes)
+ /* workaround for AVHWAccel plane count of 0, buf[0] is used as
+ check for allocated buffers: make libavcodec happy */
+ if (desc && desc->flags & PIX_FMT_HWACCEL)
planes = 1;
if (!desc || planes <= 0) {
ret = AVERROR(EINVAL);