]> git.sesse.net Git - ffmpeg/commitdiff
examples: Don't call deprecated functions which don't do anything
authorMark Thompson <sw@jkqxz.net>
Wed, 7 Feb 2018 19:36:57 +0000 (19:36 +0000)
committerMark Thompson <sw@jkqxz.net>
Fri, 9 Feb 2018 21:38:42 +0000 (21:38 +0000)
20 files changed:
doc/examples/avio_dir_cmd.c
doc/examples/avio_reading.c
doc/examples/decode_audio.c
doc/examples/decode_video.c
doc/examples/demuxing_decoding.c
doc/examples/encode_audio.c
doc/examples/encode_video.c
doc/examples/extract_mvs.c
doc/examples/filtering_audio.c
doc/examples/filtering_video.c
doc/examples/http_multiclient.c
doc/examples/hw_decode.c
doc/examples/metadata.c
doc/examples/muxing.c
doc/examples/qsvdec.c
doc/examples/remuxing.c
doc/examples/transcode_aac.c
doc/examples/transcoding.c
doc/examples/vaapi_encode.c
doc/examples/vaapi_transcode.c

index 50c435cf8f89b832abd13c036ea18c48fde63022..0722bd9ab154cf4d2fa54282be2e2869bd7963ba 100644 (file)
@@ -143,8 +143,6 @@ int main(int argc, char *argv[])
         return 1;
     }
 
-    /* register codecs and formats and other lavf/lavc components*/
-    av_register_all();
     avformat_network_init();
 
     op = argv[1];
index 7860fd5e2fd7b70a9fc85984d194f20656b4726e..cbfeb174b8ce43c5fed7510bcb940e8126a7b3ed 100644 (file)
@@ -74,9 +74,6 @@ int main(int argc, char *argv[])
     }
     input_filename = argv[1];
 
-    /* register codecs and formats and other lavf/lavc components*/
-    av_register_all();
-
     /* slurp file content into buffer */
     ret = av_file_map(input_filename, &buffer, &buffer_size, 0, NULL);
     if (ret < 0)
index fb9a9af2f60b0be8e5589d09dcca613e6cb1586e..19dcafd2c82c3ecd40837a75776b24faf55312b6 100644 (file)
@@ -94,9 +94,6 @@ int main(int argc, char **argv)
     filename    = argv[1];
     outfilename = argv[2];
 
-    /* register all the codecs */
-    avcodec_register_all();
-
     pkt = av_packet_alloc();
 
     /* find the MPEG audio decoder */
index 4377fd49e0dc6c9f69085d808cb101d648024412..5a9d43f6897336cbefc88642032f03120621926d 100644 (file)
@@ -101,8 +101,6 @@ int main(int argc, char **argv)
     filename    = argv[1];
     outfilename = argv[2];
 
-    avcodec_register_all();
-
     pkt = av_packet_alloc();
     if (!pkt)
         exit(1);
index b1a216abb4cb72f448b4fe215d0ab3692be72a1e..69a31a893519cdb91bd1f39cad6b7df02b160e59 100644 (file)
@@ -252,9 +252,6 @@ int main (int argc, char **argv)
     video_dst_filename = argv[2];
     audio_dst_filename = argv[3];
 
-    /* register all formats and codecs */
-    av_register_all();
-
     /* open input file, and allocate format context */
     if (avformat_open_input(&fmt_ctx, src_filename, NULL, NULL) < 0) {
         fprintf(stderr, "Could not open source file %s\n", src_filename);
index d1ef105d9dabdf8c01c430a79de3d0cb0eb56d49..ab3586be7fd6eb4814958c4fa3e3d878d140b9c8 100644 (file)
@@ -138,9 +138,6 @@ int main(int argc, char **argv)
     }
     filename = argv[1];
 
-    /* register all the codecs */
-    avcodec_register_all();
-
     /* find the MP2 encoder */
     codec = avcodec_find_encoder(AV_CODEC_ID_MP2);
     if (!codec) {
index 8cd13219bb560065f4195c6b2327bab6991ab47e..6731b2ad19bf1a29d52e93797d5bb1e1405ddeef 100644 (file)
@@ -84,8 +84,6 @@ int main(int argc, char **argv)
     filename = argv[1];
     codec_name = argv[2];
 
-    avcodec_register_all();
-
     /* find the mpeg1video encoder */
     codec = avcodec_find_encoder_by_name(codec_name);
     if (!codec) {
index 7ae934ead3d510abb8cf47dba5af607f2e9a352c..de31ccd2b9877c8b33ac602c6a392e0fd8cd5f4c 100644 (file)
@@ -129,8 +129,6 @@ int main(int argc, char **argv)
     }
     src_filename = argv[1];
 
-    av_register_all();
-
     if (avformat_open_input(&fmt_ctx, src_filename, NULL, NULL) < 0) {
         fprintf(stderr, "Could not open source file %s\n", src_filename);
         exit(1);
index 18d6ca275c50d9acc371e5572a2b9574026d37fc..73a00e814c1ab4657bf758d1e05bb507c814c1cc 100644 (file)
@@ -228,7 +228,6 @@ int main(int argc, char **argv)
         exit(1);
     }
 
-    av_register_all();
     avfilter_register_all();
 
     if ((ret = open_input_file(argv[1])) < 0)
index 9b607ba016f7313e569e4f66b010b36ccb21ee43..01d6644620be642b3f78df07865f7100ea752f2f 100644 (file)
@@ -222,7 +222,6 @@ int main(int argc, char **argv)
         exit(1);
     }
 
-    av_register_all();
     avfilter_register_all();
 
     if ((ret = open_input_file(argv[1])) < 0)
index e2c2201a08f3630cbe792753008b8d6848d063c0..831e89c60a496843fbe3b7f73122ea495728ff99 100644 (file)
@@ -114,7 +114,6 @@ int main(int argc, char **argv)
     in_uri = argv[1];
     out_uri = argv[2];
 
-    av_register_all();
     avformat_network_init();
 
     if ((ret = av_dict_set(&options, "listen", "2", 0)) < 0) {
index 83a5808bf7f9078b4c9e658713f62310ec93f57b..14fe08b374f9e8d63921f4fa6d26b89f7f4604b5 100644 (file)
@@ -163,8 +163,6 @@ int main(int argc, char *argv[])
         return -1;
     }
 
-    av_register_all();
-
     type = av_hwdevice_find_type_by_name(argv[1]);
     if (type == AV_HWDEVICE_TYPE_NONE) {
         fprintf(stderr, "Device type %s is not supported.\n", argv[1]);
index f73c2673692c1e532c1c345da296e5f7fe612731..e330d077a9393c2ea3ac3854254b7521b5927f61 100644 (file)
@@ -44,7 +44,6 @@ int main (int argc, char **argv)
         return 1;
     }
 
-    av_register_all();
     if ((ret = avformat_open_input(&fmt_ctx, argv[1], NULL, NULL)))
         return ret;
 
index 6b98a3b2a0ac1459758ff6a4a85e9c7dd963c8c4..08da98e574a91fcc364b8432a095870e74facb1c 100644 (file)
@@ -564,9 +564,6 @@ int main(int argc, char **argv)
     AVDictionary *opt = NULL;
     int i;
 
-    /* Initialize libavcodec, and register all codecs and formats. */
-    av_register_all();
-
     if (argc < 2) {
         printf("usage: %s output_file\n"
                "API example program to output a media file with libavformat.\n"
index cede6153bed3b26787a1b6cc46290bbd8b783eda..7415eefca5b82e2820a5dca3a94164c9d9567b8e 100644 (file)
@@ -150,8 +150,6 @@ int main(int argc, char **argv)
 
     int ret, i;
 
-    av_register_all();
-
     if (argc < 3) {
         fprintf(stderr, "Usage: %s <input file> <output file>\n", argv[0]);
         return 1;
index 59594181a709014244d390ddc43c0d729883afab..9e4d1031b4a59761617b7de3c1dac5d97b5191cb 100644 (file)
@@ -65,8 +65,6 @@ int main(int argc, char **argv)
     in_filename  = argv[1];
     out_filename = argv[2];
 
-    av_register_all();
-
     if ((ret = avformat_open_input(&ifmt_ctx, in_filename, 0, 0)) < 0) {
         fprintf(stderr, "Could not open input file '%s'", in_filename);
         goto end;
index 3c7688cd3383f5825b4b12bbf8c41352311bf616..b19349573ac59d07553ba7ead018b5c64b711e1f 100644 (file)
@@ -753,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))
index e32ab202453da90eba9896bc0942b1629e8599a2..ed1fd6411bfd1ee24993198cf55d526b367b004a 100644 (file)
@@ -517,7 +517,6 @@ int main(int argc, char **argv)
         return 1;
     }
 
-    av_register_all();
     avfilter_register_all();
 
     if ((ret = open_input_file(argv[1])) < 0)
index 6425b1c98c35412900f42c2ab9437ffc223edcdc..3bdc62bef37da87c0a247deb7646532180f73410 100644 (file)
@@ -125,8 +125,6 @@ int main(int argc, char *argv[])
         goto close;
     }
 
-    avcodec_register_all();
-
     err = av_hwdevice_ctx_create(&hw_device_ctx, AV_HWDEVICE_TYPE_VAAPI,
                                  NULL, NULL, 0);
     if (err < 0) {
index 6318895af33072e003f2faff70c44e6546a0ab97..649f48b97c3082d58f8340e56bdf29d3a4c77d37 100644 (file)
@@ -238,8 +238,6 @@ int main(int argc, char **argv)
         return -1;
     }
 
-    av_register_all();
-
     ret = av_hwdevice_ctx_create(&hw_device_ctx, AV_HWDEVICE_TYPE_VAAPI, NULL, NULL, 0);
     if (ret < 0) {
         fprintf(stderr, "Failed to create a VAAPI device. Error code: %s\n", av_err2str(ret));