diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 2e390e4268..71447fa507 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -1445,7 +1445,7 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len pes = ts->pids[pid]->u.pes_filter.opaque; if (!pes->st) { pes->st = avformat_new_stream(pes->stream, NULL); - st->id = pes->pid; + pes->st->id = pes->pid; } st = pes->st; } else if (stream_type != 0x13) {