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 committed by Diogo Franco (Kovensky)
parent 9b9d453748
commit 1560f74dde
1 changed files with 5 additions and 0 deletions

View File

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