diff options
author | wm4 <wm4@nowhere> | 2015-01-05 06:16:50 +0100 |
---|---|---|
committer | Diogo Franco (Kovensky) <diogomfranco@gmail.com> | 2015-01-25 17:00:18 +0900 |
commit | 1560f74dde1f29c4cd1a8b6bf91dfa120ace786b (patch) | |
tree | 1977dd3829594bd63b3f82540065930ae36eef9e | |
parent | 9b9d453748385b9082f7a8e974d7b6e8138a42ff (diff) | |
download | mpv-1560f74dde1f29c4cd1a8b6bf91dfa120ace786b.tar.bz2 mpv-1560f74dde1f29c4cd1a8b6bf91dfa120ace786b.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.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/demux/demux_mkv.c b/demux/demux_mkv.c index a0ba477c07..5535fc0ec2 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; } } |