From 4e7ab517c182f87a4927e22b6af4a36204f4c6eb Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 24 Jul 2013 19:42:02 +0200 Subject: demux_lavf: set keyframe flag on attached pictures Gives really funky results with PNG attachments otherwise. The main problem is that avcodec_flush_buffers() does not fully reset the decoder, so passing multiple PNG packets without keyframe flags will attempt to combine the new picture with the previously decoded contents. (Makes no sense with proper PNG - maybe this codepath is intended for MNG or APNG.) --- demux/demux_lavf.c | 1 + 1 file changed, 1 insertion(+) (limited to 'demux') diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c index e7d144eb71..350fe54b66 100644 --- a/demux/demux_lavf.c +++ b/demux/demux_lavf.c @@ -402,6 +402,7 @@ static void handle_stream(demuxer_t *demuxer, int i) st->attached_pic.size); sh->attached_picture->pts = 0; talloc_steal(sh, sh->attached_picture); + sh->attached_picture->keyframe = true; } sh_video->format = codec->codec_tag; -- cgit v1.2.3