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:
parent
257a2b9646
commit
3d32cb1649
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user