[FFmpeg-devel] [PATCH]Fix H264 VDPAU after r25243

Carl Eugen Hoyos cehoyos
Tue Oct 5 11:44:07 CEST 2010


Hi!

H264 VDPAU currently crashes for many streams.
I don't know if av_image_copy() is supposed to work for PIX_FMT_*_VDPAU, but 
attached patch fixes the crashes.

Please comment, Carl Eugen
-------------- next part --------------
Index: ffmpeg/libavcodec/h264.c
===================================================================
--- ffmpeg/libavcodec/h264.c	(revision 25340)
+++ ffmpeg/libavcodec/h264.c	(working copy)
@@ -1917,6 +1917,7 @@
                 if (prev) {
                     av_image_copy(h->short_ref[0]->data, h->short_ref[0]->linesize,
                                   (const uint8_t**)prev->data, prev->linesize,
+                                  s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU ? PIX_FMT_VDPAU_H264 :
                                   PIX_FMT_YUV420P, s->mb_width*16, s->mb_height*16);
                     h->short_ref[0]->poc = prev->poc+2;
                 }



More information about the ffmpeg-devel mailing list