From 3d32cb164957854f84e41d9aeb62e0ea185d0ca9 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 25 Oct 2017 12:28:33 +0200 Subject: 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. --- demux/demux.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'demux/demux.c') diff --git a/demux/demux.c b/demux/demux.c index cca9078611..73bf9dd1c2 100644 --- a/demux/demux.c +++ b/demux/demux.c @@ -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; -- cgit v1.2.3