summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;