summaryrefslogtreecommitdiff
path: root/libavformat/avidec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/avidec.c')
-rw-r--r--libavformat/avidec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index da92353b00..71aa0365d3 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -426,10 +426,11 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
break;
}else{
stream_index++;
- st = av_new_stream(s, stream_index);
+ st = avformat_new_stream(s, NULL);
if (!st)
goto fail;
+ st->id = stream_index;
ast = av_mallocz(sizeof(AVIStream));
if (!ast)
goto fail;