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
09c3296683
commit
ba9aa55de9
|
@ -1135,6 +1135,11 @@ static void add_coverart(struct demuxer *demuxer)
|
||||||
break;
|
break;
|
||||||
sh->codec = codec;
|
sh->codec = codec;
|
||||||
sh->attached_picture = new_demux_packet_from(att->data, att->data_size);
|
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;
|
sh->title = att->name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue