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

reimar subversion at mplayerhq.hu
Sat Jul 21 13:02:50 CEST 2012


Author: reimar
Date: Sat Jul 21 13:02:50 2012
New Revision: 35042

Log:
Set AV_PKT_FLAG_KEY correctly based on demuxer keyframe flag.

Modified:
   trunk/libmpcodecs/vd_ffmpeg.c

Modified: trunk/libmpcodecs/vd_ffmpeg.c
==============================================================================
--- trunk/libmpcodecs/vd_ffmpeg.c	Sat Jul 21 13:01:25 2012	(r35041)
+++ trunk/libmpcodecs/vd_ffmpeg.c	Sat Jul 21 13:02:50 2012	(r35042)
@@ -778,8 +778,8 @@ static mp_image_t *decode(sh_video_t *sh
     av_init_packet(&pkt);
     pkt.data = data;
     pkt.size = len;
-    // HACK: make PNGs decode normally instead of as CorePNG delta frames
-    pkt.flags = AV_PKT_FLAG_KEY;
+    // Necessary to decode e.g. CorePNG and ZeroCodec correctly
+    pkt.flags = (sh->ds->flags & 1) ? AV_PKT_FLAG_KEY : 0;
     if (!ctx->palette_sent && sh->bih && sh->bih->biBitCount <= 8) {
         /* Pass palette to codec */
         uint8_t *pal_data = (uint8_t *)(sh->bih+1);


More information about the MPlayer-cvslog mailing list