mirror of https://github.com/mpv-player/mpv
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.
This commit is contained in:
parent
9b9d453748
commit
1560f74dde
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue