From 8079f4ff821aa811de449f08dfdba777e8dd0397 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Wed, 25 Jul 2012 00:23:27 +0300 Subject: demux, vd_ffmpeg: fix demux keyframe flag, set AV_PKT_FLAG_KEY There was some confusion about the "flags" field in demuxer packets. Demuxers set it to either 1 or 0x10 to indicate a keyframe (and the field was not used to indicate anything else). This didn't cause visible problems because nothing read the value. Replace the "flags" field with a boolean "keyframe" field. Set AV_PKT_FLAG_KEY based on this field in packets fed to libavcodec video decoders (looks like PNG and ZeroCodec are the only ones which depend on values from demuxer; previously this was hardcoded to true for PNG). Make demux_mf set the keyframe field in every packet. This matters for PNG files now that the demuxer flag is forwarded to libavcodec. Fix logic setting the field in demux_mkv. It had probably not been updated when adding SimpleBlock support. This probably makes no difference for any current practical use. --- mplayer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mplayer.c') diff --git a/mplayer.c b/mplayer.c index 934ba3a819..fe2e509fb4 100644 --- a/mplayer.c +++ b/mplayer.c @@ -2785,8 +2785,8 @@ static double update_video_nocorrect_pts(struct MPContext *mpctx) decoded_frame = mp_dvdnav_restore_smpi(mpctx, &in_size, &packet, NULL); if (in_size >= 0 && !decoded_frame) #endif - decoded_frame = decode_video(sh_video, NULL, packet, in_size, - framedrop_type, sh_video->pts); + decoded_frame = decode_video(sh_video, sh_video->ds->current, packet, + in_size, framedrop_type, sh_video->pts); #ifdef CONFIG_DVDNAV // Save last still frame for future display mp_dvdnav_save_smpi(mpctx, in_size, packet, decoded_frame); -- cgit v1.2.3