[MPlayer-cvslog] r34901 - trunk/libmpcodecs/vd_ffmpeg.c

reimar subversion at mplayerhq.hu
Tue May 15 19:54:31 CEST 2012


Author: reimar
Date: Tue May 15 19:54:31 2012
New Revision: 34901

Log:
Fix direct rendering for H.264.

H.264 files without B-frames would fail to play
completely with "Too many buffered pts" messages.

Modified:
   trunk/libmpcodecs/vd_ffmpeg.c

Modified: trunk/libmpcodecs/vd_ffmpeg.c
==============================================================================
--- trunk/libmpcodecs/vd_ffmpeg.c	Mon May 14 22:24:43 2012	(r34900)
+++ trunk/libmpcodecs/vd_ffmpeg.c	Tue May 15 19:54:31 2012	(r34901)
@@ -798,7 +798,10 @@ static mp_image_t *decode(sh_video_t *sh
     pkt.size = 0;
     av_destruct_packet(&pkt);
 
-    dr1= ctx->do_dr1;
+    // even when we do dr we might actually get a buffer we had
+    // FFmpeg allocate - this mostly happens with nonref_dr.
+    // Ensure we treat it correctly.
+    dr1= ctx->do_dr1 && pic->type == FF_BUFFER_TYPE_USER;
     if(ret<0) mp_msg(MSGT_DECVIDEO, MSGL_WARN, "Error while decoding frame!\n");
 //printf("repeat: %d\n", pic->repeat_pict);
 //-- vstats generation


More information about the MPlayer-cvslog mailing list