summaryrefslogtreecommitdiffstats
path: root/demux/demux_lavf.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-07-24 19:42:02 +0200
committerwm4 <wm4@nowhere>2013-07-24 19:42:02 +0200
commit4e7ab517c182f87a4927e22b6af4a36204f4c6eb (patch)
treebe4e512401644f3385063cfbb1264df6a49070e0 /demux/demux_lavf.c
parent782d5ec3a0ae78e72c533f8ac286cad97bf90989 (diff)
downloadmpv-4e7ab517c182f87a4927e22b6af4a36204f4c6eb.tar.bz2
mpv-4e7ab517c182f87a4927e22b6af4a36204f4c6eb.tar.xz
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.)
Diffstat (limited to 'demux/demux_lavf.c')
-rw-r--r--demux/demux_lavf.c1
1 files changed, 1 insertions, 0 deletions
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;