]> git.sesse.net Git - ffmpeg/blobdiff - doc/examples/transcode_aac.c
Merge commit '2651352988212531038326c44754ece1728c4a3b'
[ffmpeg] / doc / examples / transcode_aac.c
index 9fd5c00d6059ef67e3f10c5b6fcc8f921a209340..b19349573ac59d07553ba7ead018b5c64b711e1f 100644 (file)
@@ -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))) {
@@ -750,8 +753,6 @@ int main(int argc, char **argv)
         exit(1);
     }
 
-    /* Register all codecs and formats so that they can be used. */
-    av_register_all();
     /* Open the input file for reading. */
     if (open_input_file(argv[1], &input_format_context,
                         &input_codec_context))