summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-01-05 06:16:50 +0100
committerwm4 <wm4@nowhere>2015-01-05 06:16:50 +0100
commitba9aa55de906f39b408bb187fd3d7d0db7126ac8 (patch)
tree1fda3f7d5ac2b2e848fb9923ccfe11efeb365e6b
parent09c3296683c82c29747f6128a4c089ba2b55516e (diff)
downloadmpv-ba9aa55de906f39b408bb187fd3d7d0db7126ac8.tar.bz2
mpv-ba9aa55de906f39b408bb187fd3d7d0db7126ac8.tar.xz
demux_mkv: avoid PTS warning with image attachments
Removes an annoying "No video PTS! Making something up." warning. Mark it as keyframe, which is needed to prevent strange behavior with PNG. Also, don't leak the picture data.
-rw-r--r--demux/demux_mkv.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/demux/demux_mkv.c b/demux/demux_mkv.c
index 25910d5db6..ed5b2c74a9 100644
--- a/demux/demux_mkv.c
+++ b/demux/demux_mkv.c
@@ -1135,6 +1135,11 @@ static void add_coverart(struct demuxer *demuxer)
break;
sh->codec = codec;
sh->attached_picture = new_demux_packet_from(att->data, att->data_size);
+ if (sh->attached_picture) {
+ sh->attached_picture->pts = 0;
+ talloc_steal(sh, sh->attached_picture);
+ sh->attached_picture->keyframe = true;
+ }
sh->title = att->name;
}
}