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:
wm4 2015-01-05 06:16:50 +01:00
parent 09c3296683
commit ba9aa55de9
1 changed files with 5 additions and 0 deletions

View File

@ -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;
} }
} }