summaryrefslogtreecommitdiff
path: root/libavformat/mpeg.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/mpeg.c')
-rw-r--r--libavformat/mpeg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index 52bf40faa5..982903829f 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -532,9 +532,10 @@ static int mpegps_read_packet(AVFormatContext *s,
goto redo;
}
/* no stream found: add a new stream */
- st = av_new_stream(s, startcode);
+ st = avformat_new_stream(s, NULL);
if (!st)
goto skip;
+ st->id = startcode;
st->codec->codec_type = type;
st->codec->codec_id = codec_id;
if (codec_id != CODEC_ID_PCM_S16BE)