mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-01-05 21:55:37 +01:00
Replace remaining av_new_stream() with avformat_new_stream().
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user