]> git.sesse.net Git - ffmpeg/commitdiff
lav*,tests: remove several register_all calls
authorJosh de Kock <josh@itanimul.li>
Sun, 18 Feb 2018 17:54:23 +0000 (17:54 +0000)
committerJosh de Kock <josh@itanimul.li>
Mon, 2 Apr 2018 02:26:22 +0000 (03:26 +0100)
avdevice_register_all() is still required to register devices into
lavf (this is required due to lavd being somewhat of a hack).

Signed-off-by: Josh de Kock <josh@itanimul.li>
28 files changed:
doc/examples/filter_audio.c
doc/examples/filtering_audio.c
doc/examples/filtering_video.c
doc/examples/transcoding.c
fftools/ffmpeg.c
fftools/ffplay.c
fftools/ffprobe.c
libavcodec/tests/utils.c
libavdevice/lavfi.c
libavfilter/lavfutils.c
libavfilter/src_movie.c
libavfilter/tests/filtfmts.c
libavformat/tests/movenc.c
libavformat/tests/seek.c
tests/api/api-band-test.c
tests/api/api-codec-param-test.c
tests/api/api-flac-test.c
tests/api/api-h264-test.c
tests/api/api-seek-test.c
tools/aviocat.c
tools/enum_options.c
tools/graph2dot.c
tools/ismindex.c
tools/pktdumper.c
tools/probetest.c
tools/seek_print.c
tools/sidxindex.c
tools/uncoded_frame.c

index 7467c21c30bf9b1854dc93ed5c122c6a9b24fefe..1611e3d952e5ba956c1dc17c61dc7a2cf2a3a0b1 100644 (file)
@@ -289,8 +289,6 @@ int main(int argc, char *argv[])
         return 1;
     }
 
-    avfilter_register_all();
-
     /* Allocate the frame we will be using to store the data. */
     frame  = av_frame_alloc();
     if (!frame) {
index 73a00e814c1ab4657bf758d1e05bb507c814c1cc..b109dbcb96d70e747a80a40de9334309852924e8 100644 (file)
@@ -228,8 +228,6 @@ int main(int argc, char **argv)
         exit(1);
     }
 
-    avfilter_register_all();
-
     if ((ret = open_input_file(argv[1])) < 0)
         goto end;
     if ((ret = init_filters(filter_descr)) < 0)
index 01d6644620be642b3f78df07865f7100ea752f2f..ed4e7bbd81d2d4592eaa117dc64507d58b6ff449 100644 (file)
@@ -222,8 +222,6 @@ int main(int argc, char **argv)
         exit(1);
     }
 
-    avfilter_register_all();
-
     if ((ret = open_input_file(argv[1])) < 0)
         goto end;
     if ((ret = init_filters(filter_descr)) < 0)
index ed1fd6411bfd1ee24993198cf55d526b367b004a..a83fa3a185817ad9d2125ec6a10a1f0c48ed4b20 100644 (file)
@@ -517,8 +517,6 @@ int main(int argc, char **argv)
         return 1;
     }
 
-    avfilter_register_all();
-
     if ((ret = open_input_file(argv[1])) < 0)
         goto end;
     if ((ret = open_output_file(argv[2])) < 0)
index d3bc382dec11abe9d6e0c3349f414029239793ad..2f8a5ace568ea76968d588971e080aa49be7d4f7 100644 (file)
@@ -4776,12 +4776,9 @@ int main(int argc, char **argv)
         argv++;
     }
 
-    avcodec_register_all();
 #if CONFIG_AVDEVICE
     avdevice_register_all();
 #endif
-    avfilter_register_all();
-    av_register_all();
     avformat_network_init();
 
     show_banner(argc, argv, options);
index f2028d4b13df957056c612933d33ebf41387ed1d..bc9ddb8885c9e6ec605514ca4797c858403e3a1d 100644 (file)
@@ -3655,10 +3655,6 @@ int main(int argc, char **argv)
 #if CONFIG_AVDEVICE
     avdevice_register_all();
 #endif
-#if CONFIG_AVFILTER
-    avfilter_register_all();
-#endif
-    av_register_all();
     avformat_network_init();
 
     init_opts();
index a4ac6972a215af6114972ae601d2e0d3501752ac..2582649fd3061337ada1b4a92f5da7643618adf7 100644 (file)
@@ -3567,7 +3567,6 @@ int main(int argc, char **argv)
 
     options = real_options;
     parse_loglevel(argc, argv, options);
-    av_register_all();
     avformat_network_init();
     init_opts();
 #if CONFIG_AVDEVICE
index e2891fb389fdf43d2baeab90eb312ce946eb369e..f6ba7fe66e3f96991b26a67016cab4ce6b0c228c 100644 (file)
@@ -21,7 +21,6 @@
 int main(void){
     AVCodec *codec = NULL;
     int ret = 0;
-    avcodec_register_all();
 
     while (codec = av_codec_next(codec)) {
         if (av_codec_is_encoder(codec)) {
index 6f2ae958dcbf788b17f2f218f974fdd4dcde28c8..ca8f05f3f72368ee76b8e0333d3567dc13bb27cd 100644 (file)
@@ -130,8 +130,6 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx)
     if (!pix_fmts)
         FAIL(AVERROR(ENOMEM));
 
-    avfilter_register_all();
-
     buffersink = avfilter_get_by_name("buffersink");
     abuffersink = avfilter_get_by_name("abuffersink");
 
index b6319cf02758a409d05e40f8a73bbd74b3ad36b0..db4b69b9f36d0a18e1531defd2851e869db894a8 100644 (file)
@@ -37,8 +37,6 @@ int ff_load_image(uint8_t *data[4], int linesize[4],
 
     av_init_packet(&pkt);
 
-    av_register_all();
-
     iformat = av_find_input_format("image2pipe");
     if ((ret = avformat_open_input(&format_ctx, filename, iformat, NULL)) < 0) {
         av_log(log_ctx, AV_LOG_ERROR,
index 258ba504a57177cc777bcfd4f2b820c75da931d8..bcabfcc4c295e0b2cd220fb168c614ad5a0d111a 100644 (file)
@@ -239,8 +239,6 @@ static av_cold int movie_common_init(AVFilterContext *ctx)
         return AVERROR_PATCHWELCOME;
     }
 
-    av_register_all();
-
     // Try to find the movie format (container)
     iformat = movie->format_name ? av_find_input_format(movie->format_name) : NULL;
 
index 72b860ae5b5b41db3eb4daeb65064a4911a59731..a958621f1c2cdf8550642c597377ae9c8073ea2d 100644 (file)
@@ -97,8 +97,6 @@ int main(int argc, char **argv)
     if (!graph_ctx)
         return 1;
 
-    avfilter_register_all();
-
     /* get a corresponding filter and open it */
     if (!(filter = avfilter_get_by_name(filter_name))) {
         fprintf(stderr, "Unrecognized filter with name '%s'\n", filter_name);
index ad6c92a94c96c5608644e5211c9b469457b28e0d..1d15d97ad92df57fb73f0589f680c4bf8a19f3e0 100644 (file)
@@ -379,8 +379,6 @@ int main(int argc, char **argv)
         }
     }
 
-    av_register_all();
-
     md5 = av_md5_alloc();
     if (!md5)
         return 1;
index 7ed56ba4ef98061ab0a4f1790f509751701c6e81..e0067a64fc37171b8d873164d4704280f28bc1fb 100644 (file)
@@ -91,9 +91,6 @@ int main(int argc, char **argv)
     av_dict_set(&format_opts, "channels", "1", 0);
     av_dict_set(&format_opts, "sample_rate", "22050", 0);
 
-    /* initialize libavcodec, and register all codecs and formats */
-    av_register_all();
-
     if (argc < 2) {
         printf("usage: %s input_file\n"
                "\n", argv[0]);
index 5ccba4f766555223570b4f9e469bb62ed62b9a9a..a84f6b7e5560df3425b5be7839f9407f62ef98c0 100644 (file)
@@ -214,8 +214,6 @@ int main(int argc, char **argv)
         return 1;
     }
 
-    av_register_all();
-
     if (video_decode(argv[1]) != 0)
         return 1;
 
index 377a5e9c793efd6616a5c048d0bf6a9ae6b56e46..0868322cb4b917f6aee976a88fec6d435a7a996c 100644 (file)
@@ -231,8 +231,6 @@ int main(int argc, char* argv[])
     AVFormatContext *fmt_ctx = NULL;
     AVFormatContext *fmt_ctx_no_decode = NULL;
 
-    av_register_all();
-
     if (argc < 2) {
         av_log(NULL, AV_LOG_ERROR, "Usage: %s <input>\n", argv[0]);
         return -1;
index c5a37f03e11e75cff2993210cc16fb6966ca1126..2e9081266f829646aeece42c0288fcdcdb55f204 100644 (file)
@@ -245,8 +245,6 @@ int main(void)
     int sample_rates[] = {8000, 44100, 48000, 192000};
     int cl, sr;
 
-    avcodec_register_all();
-
     enc = avcodec_find_encoder(AV_CODEC_ID_FLAC);
     if (!enc) {
         av_log(NULL, AV_LOG_ERROR, "Can't find encoder\n");
index 52282e0007458f044d8aba2f5835706790dd29b1..66669fa0c353c59f8f0d68e6fbc4555427d6c695 100644 (file)
@@ -158,8 +158,6 @@ int main(int argc, char **argv)
         return 1;
     }
 
-    av_register_all();
-
     if (video_decode_example(argv[1]) != 0)
         return 1;
 
index 2b32cb9e4f382f4abe03b79e4ed050b64d37e3c3..d0531a2f731f8d0b62b9ae2f3f7abca5424d823c 100644 (file)
@@ -279,8 +279,6 @@ int main(int argc, char **argv)
         return 1;
     }
 
-    av_register_all();
-
     if (seek_test(argv[1], argv[2], argv[3]) != 0)
         return 1;
 
index 28529b06d6a99341e3cbf0b82fcb255827d7c3e5..2aa08b92ed988f119f539ad857876e0101e886e1 100644 (file)
@@ -42,7 +42,6 @@ int main(int argc, char **argv)
     AVDictionary *in_opts = NULL;
     AVDictionary *out_opts = NULL;
 
-    av_register_all();
     avformat_network_init();
 
     for (i = 1; i < argc; i++) {
index c2a295cad62e42877ebf1a15b62eebe1847f42be..77e1f9f799d98117bc72f58bd82373e910166153 100644 (file)
@@ -130,8 +130,6 @@ int main(int argc, char **argv)
     if (argc < 2)
         print_usage();
 
-    av_register_all();
-
     if (!strcmp(argv[1], "format"))
         show_format_opts();
     else if (!strcmp(argv[1], "codec"))
index 21d0795e8818478c59609518afd350c99f8e1fa8..d5c1e4e3c792081e1546bfdacf0a52d3e28743c2 100644 (file)
@@ -189,8 +189,6 @@ int main(int argc, char **argv)
         *p = '\0';
     }
 
-    avfilter_register_all();
-
     if (avfilter_graph_parse(graph, graph_string, NULL, NULL, NULL) < 0) {
         fprintf(stderr, "Failed to parse the graph description\n");
         return 1;
index 0254a98ff71ecfff86cf9b27575c9aae5256fe71..7601f62e06ff51299ac29be23bc9696794e2847f 100644 (file)
@@ -791,8 +791,6 @@ int main(int argc, char **argv)
     int split = 0, ismf = 0, i;
     struct Tracks tracks = { 0, .video_track = -1, .audio_track = -1 };
 
-    av_register_all();
-
     for (i = 1; i < argc; i++) {
         if (!strcmp(argv[i], "-n")) {
             basename = argv[i + 1];
index 6516ad3a225d52aa1583cc513dd9e7153109f18f..16a965b75697b8422f5e52eb588bb19d83b551fd 100644 (file)
@@ -89,9 +89,6 @@ int main(int argc, char **argv)
     strcat(fntemplate, PKTFILESUFF);
     printf("FNTEMPLATE: '%s'\n", fntemplate);
 
-    // register all file formats
-    av_register_all();
-
     err = avformat_open_input(&fctx, argv[1], NULL, NULL);
     if (err < 0) {
         fprintf(stderr, "cannot open input: error %d\n", err);
index 74045eb4985e286219bde4a24222981299c38cca..2c6c1de2463930051f8d3a918d54a9aca365ea9f 100644 (file)
@@ -124,9 +124,6 @@ int main(int argc, char **argv)
         return 1;
     }
 
-    avcodec_register_all();
-    av_register_all();
-
     av_lfg_init(&state, 0xdeadbeef);
 
     pd.buf = NULL;
index de876b487c5812a08f40c8b326ee52dae9a1f738..9280421741de84a2c67ffa93c9be1737175ed755 100644 (file)
@@ -65,7 +65,6 @@ int main(int argc, char **argv)
     argv++;
     argc--;
 
-    av_register_all();
     if ((ret = avformat_open_input(&avf, filename, NULL, NULL)) < 0) {
         fprintf(stderr, "%s: %s\n", filename, av_err2str(ret));
         return 1;
index be284610d563fe43aa58d58d0a5c36d5fdfd3c19..a4f95515e4f06f7ad3d6388433cc9ef5bcd0754f 100644 (file)
@@ -363,8 +363,6 @@ int main(int argc, char **argv)
     struct Tracks tracks = { 0 };
     int i;
 
-    av_register_all();
-
     for (i = 1; i < argc; i++) {
         if (!strcmp(argv[i], "-out")) {
             out = argv[i + 1];
index 3aaa4b6897544b2be94a7679ec971b86cf82dcdb..3f850d344d74661ce5575a1f2a91f8b6905ffb0a 100644 (file)
@@ -62,9 +62,7 @@ int main(int argc, char **argv)
     out_dev_name = argv + 2;
     nb_out_dev = argc - 2;
 
-    av_register_all();
     avdevice_register_all();
-    avfilter_register_all();
 
     /* Create input graph */
     if (!(in_graph = avfilter_graph_alloc())) {