mpegts: set stream id on just created stream, not an unrelated variable
authorAnton Khirnov <anton@khirnov.net>
Tue, 8 Nov 2011 13:13:30 +0000 (14:13 +0100)
committerAnton Khirnov <anton@khirnov.net>
Tue, 8 Nov 2011 17:56:39 +0000 (18:56 +0100)
Bug introduced in 84ad31ff180fa089cd6bfd93c246336a16036455.
Thanks to Uoti Urpala for finding it.

libavformat/mpegts.c

index 2e390e4..71447fa 100644 (file)
@@ -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) {