# HG changeset patch # User reimar # Date 1342868570 0 # Node ID 1c762294183fa566a89bcfa1c3e3adba6b463f3c # Parent 1e843d908eaee7faa6fa54710d7d88844bc034e0 Set AV_PKT_FLAG_KEY correctly based on demuxer keyframe flag. diff -r 1e843d908eae -r 1c762294183f libmpcodecs/vd_ffmpeg.c --- a/libmpcodecs/vd_ffmpeg.c Sat Jul 21 11:01:25 2012 +0000 +++ b/libmpcodecs/vd_ffmpeg.c Sat Jul 21 11:02:50 2012 +0000 @@ -778,8 +778,8 @@ 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);