From 25a2d269bdd919e633e202b67927c3c72f9f0dd5 Mon Sep 17 00:00:00 2001 From: Marton Balint Date: Fri, 29 Dec 2017 23:29:27 +0100 Subject: fftools, tools, examples: migrate to AVFormatContext->url Signed-off-by: Marton Balint --- doc/examples/transcode_aac.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'doc/examples/transcode_aac.c') diff --git a/doc/examples/transcode_aac.c b/doc/examples/transcode_aac.c index 9fd5c00d60..3c7688cd33 100644 --- a/doc/examples/transcode_aac.c +++ b/doc/examples/transcode_aac.c @@ -171,8 +171,11 @@ static int open_output_file(const char *filename, goto cleanup; } - av_strlcpy((*output_format_context)->filename, filename, - sizeof((*output_format_context)->filename)); + if (!((*output_format_context)->url = av_strdup(filename))) { + fprintf(stderr, "Could not allocate url.\n"); + error = AVERROR(ENOMEM); + goto cleanup; + } /* Find the encoder to be used by its name. */ if (!(output_codec = avcodec_find_encoder(AV_CODEC_ID_AAC))) { -- cgit v1.2.3