From 0e5ecd806eadf7dd0ec645b1b69310ee76c0cd1c Mon Sep 17 00:00:00 2001 From: Clément Bœsch Date: Sat, 5 Nov 2011 13:11:18 +0100 Subject: Replace remaining av_new_stream() with avformat_new_stream(). --- libavformat/act.c | 2 +- libavformat/bintext.c | 2 +- libavformat/g723_1.c | 2 +- libavformat/libmodplug.c | 4 ++-- libavformat/loasdec.c | 2 +- libavformat/microdvddec.c | 2 +- libavformat/pmpdec.c | 5 +++-- libavformat/wav.c | 3 ++- 8 files changed, 12 insertions(+), 10 deletions(-) (limited to 'libavformat') diff --git a/libavformat/act.c b/libavformat/act.c index 8454cd1fc0..bbda1ae409 100644 --- a/libavformat/act.c +++ b/libavformat/act.c @@ -69,7 +69,7 @@ static int read_header(AVFormatContext *s, int min,sec,msec; - st=av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); diff --git a/libavformat/bintext.c b/libavformat/bintext.c index e03a31e447..2450d92d0e 100644 --- a/libavformat/bintext.c +++ b/libavformat/bintext.c @@ -102,7 +102,7 @@ static AVStream * init_stream(AVFormatContext *s, AVFormatParameters *ap) { BinDemuxContext *bin = s->priv_data; - AVStream *st = av_new_stream(s, 0); + AVStream *st = avformat_new_stream(s, NULL); if (!st) return NULL; st->codec->codec_tag = 0; diff --git a/libavformat/g723_1.c b/libavformat/g723_1.c index 19441a1b19..5bdd764363 100644 --- a/libavformat/g723_1.c +++ b/libavformat/g723_1.c @@ -32,7 +32,7 @@ static int g723_1_init(AVFormatContext *s, AVFormatParameters *ap) { AVStream *st; - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); diff --git a/libavformat/libmodplug.c b/libavformat/libmodplug.c index 8b4e4f3bcd..ec9acd6c92 100644 --- a/libavformat/libmodplug.c +++ b/libavformat/libmodplug.c @@ -217,7 +217,7 @@ static int modplug_read_header(AVFormatContext *s, AVFormatParameters *ap) if (!modplug->f) return AVERROR_INVALIDDATA; - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); av_set_pts_info(st, 64, 1, 1000); @@ -231,7 +231,7 @@ static int modplug_read_header(AVFormatContext *s, AVFormatParameters *ap) modplug->ts_per_packet = 1000*AUDIO_PKT_SIZE / (4*44100.); if (modplug->video_stream) { - AVStream *vst = av_new_stream(s, 1); + AVStream *vst = avformat_new_stream(s, NULL); if (!vst) return AVERROR(ENOMEM); av_set_pts_info(vst, 64, 1, 1000); diff --git a/libavformat/loasdec.c b/libavformat/loasdec.c index dd74b304fb..f3019420d1 100644 --- a/libavformat/loasdec.c +++ b/libavformat/loasdec.c @@ -63,7 +63,7 @@ static int loas_read_header(AVFormatContext *s, { AVStream *st; - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); diff --git a/libavformat/microdvddec.c b/libavformat/microdvddec.c index 95c76afc8d..4c56a7f503 100644 --- a/libavformat/microdvddec.c +++ b/libavformat/microdvddec.c @@ -54,7 +54,7 @@ static int microdvd_read_header(AVFormatContext *s, AVFormatParameters *ap) { AVRational pts_info = (AVRational){ 2997, 125 }; /* default: 23.976 fps */ MicroDVDContext *microdvd = s->priv_data; - AVStream *st = av_new_stream(s, 0); + AVStream *st = avformat_new_stream(s, NULL); int i, frame; double fps; char c; diff --git a/libavformat/pmpdec.c b/libavformat/pmpdec.c index ba40003359..88b8998ad9 100644 --- a/libavformat/pmpdec.c +++ b/libavformat/pmpdec.c @@ -47,7 +47,7 @@ static int pmp_header(AVFormatContext *s, AVFormatParameters *ap) { int srate, channels; int i; uint64_t pos; - AVStream *vst = av_new_stream(s, 0); + AVStream *vst = avformat_new_stream(s, NULL); if (!vst) return AVERROR(ENOMEM); vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; @@ -90,9 +90,10 @@ static int pmp_header(AVFormatContext *s, AVFormatParameters *ap) { srate = avio_rl32(pb); channels = avio_rl32(pb) + 1; for (i = 1; i < pmp->num_streams; i++) { - AVStream *ast = av_new_stream(s, i); + AVStream *ast = avformat_new_stream(s, NULL); if (!ast) return AVERROR(ENOMEM); + ast->id = i; ast->codec->codec_type = AVMEDIA_TYPE_AUDIO; ast->codec->codec_id = audio_codec_id; ast->codec->channels = channels; diff --git a/libavformat/wav.c b/libavformat/wav.c index b690cc1a8f..096f706c37 100644 --- a/libavformat/wav.c +++ b/libavformat/wav.c @@ -485,10 +485,11 @@ static int wav_read_header(AVFormatContext *s, goto break_loop; } av_log(s, AV_LOG_DEBUG, "Found SMV data\n"); - vst = av_new_stream(s, 1); + vst = avformat_new_stream(s, NULL); if (!vst) return AVERROR(ENOMEM); avio_r8(pb); + vst->id = 1; vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; vst->codec->codec_id = CODEC_ID_MJPEG; vst->codec->width = avio_rl24(pb); -- cgit v1.2.3