Mercurial > mplayer.hg
changeset 34948:1c762294183f
Set AV_PKT_FLAG_KEY correctly based on demuxer keyframe flag.
author | reimar |
---|---|
date | Sat, 21 Jul 2012 11:02:50 +0000 |
parents | 1e843d908eae |
children | f43323b9b020 |
files | libmpcodecs/vd_ffmpeg.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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);