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(). --- libavdevice/dshow.c | 3 ++- libavdevice/lavfi.c | 3 ++- libavdevice/openal-dec.c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'libavdevice') diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c index 6a77f4b43a..ab5f7e97e0 100644 --- a/libavdevice/dshow.c +++ b/libavdevice/dshow.c @@ -659,11 +659,12 @@ dshow_add_device(AVFormatContext *avctx, AVFormatParameters *ap, AVStream *st; int ret = AVERROR(EIO); - st = av_new_stream(avctx, devtype); + st = avformat_new_stream(avctx, NULL); if (!st) { ret = AVERROR(ENOMEM); goto error; } + st->id = devtype; ctx->capture_filter[devtype]->stream_index = st->index; diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c index 9228156988..cce09c5592 100644 --- a/libavdevice/lavfi.c +++ b/libavdevice/lavfi.c @@ -161,8 +161,9 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx, /* for each open output create a corresponding stream */ for (i = 0, inout = output_links; inout; i++, inout = inout->next) { AVStream *st; - if (!(st = av_new_stream(avctx, i))) + if (!(st = avformat_new_stream(avctx, NULL))) FAIL(AVERROR(ENOMEM)); + st->id = i; } /* create a sink for each output and connect them to the graph */ diff --git a/libavdevice/openal-dec.c b/libavdevice/openal-dec.c index 1b70525c77..77b63b5695 100644 --- a/libavdevice/openal-dec.c +++ b/libavdevice/openal-dec.c @@ -145,7 +145,7 @@ static int read_header(AVFormatContext *ctx, AVFormatParameters *ap) if (error = al_get_error(ad->device, &error_msg)) goto fail; /* Create stream */ - if (!(st = av_new_stream(ctx, 0))) { + if (!(st = avformat_new_stream(ctx, NULL))) { error = AVERROR(ENOMEM); goto fail; } -- cgit v1.2.3