1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-21 10:51:51 +00:00

demux: set correct stream index for attached pictures

This fixes .cue files with audio files that contain attached pictures to
some degree. demux_timeline.c just discarded packets with unset index,
so the picture was never fed to the decoder.
This commit is contained in:
wm4 2017-10-25 12:28:33 +02:00
parent 257a2b9646
commit 3d32cb1649

View File

@ -898,7 +898,11 @@ static struct demux_packet *dequeue_packet(struct demux_stream *ds)
if (ds->attached_picture_added)
return NULL;
ds->attached_picture_added = true;
return demux_copy_packet(ds->sh->attached_picture);
struct demux_packet *pkt = demux_copy_packet(ds->sh->attached_picture);
if (!pkt)
abort();
pkt->stream = ds->sh->index;
return pkt;
}
if (!ds->reader_head)
return NULL;