summaryrefslogtreecommitdiffstats
path: root/demux
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-10-25 12:28:33 +0200
committerwm4 <wm4@nowhere>2017-10-25 16:39:33 +0200
commit3d32cb164957854f84e41d9aeb62e0ea185d0ca9 (patch)
treea13a017d7f6e6f61e23f80aaa323678b8d8ac5b0 /demux
parent257a2b9646e845ef801588e871b9859d30ebf99a (diff)
downloadmpv-3d32cb164957854f84e41d9aeb62e0ea185d0ca9.tar.bz2
mpv-3d32cb164957854f84e41d9aeb62e0ea185d0ca9.tar.xz
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.
Diffstat (limited to 'demux')
-rw-r--r--demux/demux.c6
1 files changed, 5 insertions, 1 deletions
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;