Fix all VDPAU decoders.
authorCarl Eugen Hoyos <cehoyos@ag.or.at>
Wed, 18 Jun 2014 09:35:33 +0000 (11:35 +0200)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Wed, 18 Jun 2014 11:55:26 +0000 (13:55 +0200)
Fixes ticket #3726.

libavcodec/mpegvideo.c

index 97f22d2..d8ebe6c 100644 (file)
@@ -434,6 +434,9 @@ static int frame_size_alloc(MpegEncContext *s, int linesize)
 {
     int alloc_size = FFALIGN(FFABS(linesize) + 64, 32);
 
+    if (s->avctx->hwaccel || s->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU)
+        return 0;
+
     if (linesize < 24) {
         av_log(s->avctx, AV_LOG_ERROR, "Image too small, temporary buffers cannot function\n");
         return AVERROR_PATCHWELCOME;