avdevice_register_all() is still required to register devices into lavf (this is required due to lavd being somewhat of a hack).
Unified · Split
| @@ -289,8 +289,6 @@ int main(int argc, char *argv[]) · 288 unmodified lines | ||
| 289 | 289 | return 1; |
| 290 | 290 | } |
| 291 | 291 | |
| 292 | − avfilter_register_all(); | |
| 293 | − | |
| 294 | 292 | /* Allocate the frame we will be using to store the data. */ |
| 295 | 293 | frame = av_frame_alloc(); |
| 296 | 294 | if (!frame) { |
| @@ -228,8 +228,6 @@ int main(int argc, char **argv) · 227 unmodified lines | ||
| 228 | 228 | exit(1); |
| 229 | 229 | } |
| 230 | 230 | |
| 231 | − avfilter_register_all(); | |
| 232 | − | |
| 233 | 231 | if ((ret = open_input_file(argv[1])) < 0) |
| 234 | 232 | goto end; |
| 235 | 233 | if ((ret = init_filters(filter_descr)) < 0) |
| @@ -222,8 +222,6 @@ int main(int argc, char **argv) · 221 unmodified lines | ||
| 222 | 222 | exit(1); |
| 223 | 223 | } |
| 224 | 224 | |
| 225 | − avfilter_register_all(); | |
| 226 | − | |
| 227 | 225 | if ((ret = open_input_file(argv[1])) < 0) |
| 228 | 226 | goto end; |
| 229 | 227 | if ((ret = init_filters(filter_descr)) < 0) |
| @@ -517,8 +517,6 @@ int main(int argc, char **argv) · 516 unmodified lines | ||
| 517 | 517 | return 1; |
| 518 | 518 | } |
| 519 | 519 | |
| 520 | − avfilter_register_all(); | |
| 521 | − | |
| 522 | 520 | if ((ret = open_input_file(argv[1])) < 0) |
| 523 | 521 | goto end; |
| 524 | 522 | if ((ret = open_output_file(argv[2])) < 0) |
| @@ -4776,12 +4776,9 @@ int main(int argc, char **argv) · 4775 unmodified lines | ||
| 4776 | 4776 | argv++; |
| 4777 | 4777 | } |
| 4778 | 4778 | |
| 4779 | − avcodec_register_all(); | |
| 4780 | 4779 | #if CONFIG_AVDEVICE |
| 4781 | 4780 | avdevice_register_all(); |
| 4782 | 4781 | #endif |
| 4783 | − avfilter_register_all(); | |
| 4784 | − av_register_all(); | |
| 4785 | 4782 | avformat_network_init(); |
| 4786 | 4783 | |
| 4787 | 4784 | show_banner(argc, argv, options); |
| @@ -3655,10 +3655,6 @@ int main(int argc, char **argv) · 3654 unmodified lines | ||
| 3655 | 3655 | #if CONFIG_AVDEVICE |
| 3656 | 3656 | avdevice_register_all(); |
| 3657 | 3657 | #endif |
| 3658 | −#if CONFIG_AVFILTER | |
| 3659 | − avfilter_register_all(); | |
| 3660 | −#endif | |
| 3661 | − av_register_all(); | |
| 3662 | 3658 | avformat_network_init(); |
| 3663 | 3659 | |
| 3664 | 3660 | init_opts(); |
| @@ -3567,7 +3567,6 @@ int main(int argc, char **argv) · 3566 unmodified lines | ||
| 3567 | 3567 | |
| 3568 | 3568 | options = real_options; |
| 3569 | 3569 | parse_loglevel(argc, argv, options); |
| 3570 | − av_register_all(); | |
| 3571 | 3570 | avformat_network_init(); |
| 3572 | 3571 | init_opts(); |
| 3573 | 3572 | #if CONFIG_AVDEVICE |
| @@ -21,7 +21,6 @@ · 20 unmodified lines | ||
| 21 | 21 | int main(void){ |
| 22 | 22 | AVCodec *codec = NULL; |
| 23 | 23 | int ret = 0; |
| 24 | − avcodec_register_all(); | |
| 25 | 24 | |
| 26 | 25 | while (codec = av_codec_next(codec)) { |
| 27 | 26 | if (av_codec_is_encoder(codec)) { |
| @@ -130,8 +130,6 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx) · 129 unmodified lines | ||
| 130 | 130 | if (!pix_fmts) |
| 131 | 131 | FAIL(AVERROR(ENOMEM)); |
| 132 | 132 | |
| 133 | − avfilter_register_all(); | |
| 134 | − | |
| 135 | 133 | buffersink = avfilter_get_by_name("buffersink"); |
| 136 | 134 | abuffersink = avfilter_get_by_name("abuffersink"); |
| 137 | 135 | |
| @@ -37,8 +37,6 @@ int ff_load_image(uint8_t *data[4], int linesize[4], · 36 unmodified lines | ||
| 37 | 37 | |
| 38 | 38 | av_init_packet(&pkt); |
| 39 | 39 | |
| 40 | − av_register_all(); | |
| 41 | − | |
| 42 | 40 | iformat = av_find_input_format("image2pipe"); |
| 43 | 41 | if ((ret = avformat_open_input(&format_ctx, filename, iformat, NULL)) < 0) { |
| 44 | 42 | av_log(log_ctx, AV_LOG_ERROR, |
| @@ -239,8 +239,6 @@ static av_cold int movie_common_init(AVFilterContext *ctx) · 238 unmodified lines | ||
| 239 | 239 | return AVERROR_PATCHWELCOME; |
| 240 | 240 | } |
| 241 | 241 | |
| 242 | − av_register_all(); | |
| 243 | − | |
| 244 | 242 | // Try to find the movie format (container) |
| 245 | 243 | iformat = movie->format_name ? av_find_input_format(movie->format_name) : NULL; |
| 246 | 244 | |
| @@ -97,8 +97,6 @@ int main(int argc, char **argv) · 96 unmodified lines | ||
| 97 | 97 | if (!graph_ctx) |
| 98 | 98 | return 1; |
| 99 | 99 | |
| 100 | − avfilter_register_all(); | |
| 101 | − | |
| 102 | 100 | /* get a corresponding filter and open it */ |
| 103 | 101 | if (!(filter = avfilter_get_by_name(filter_name))) { |
| 104 | 102 | fprintf(stderr, "Unrecognized filter with name '%s'\n", filter_name); |
| @@ -379,8 +379,6 @@ int main(int argc, char **argv) · 378 unmodified lines | ||
| 379 | 379 | } |
| 380 | 380 | } |
| 381 | 381 | |
| 382 | − av_register_all(); | |
| 383 | − | |
| 384 | 382 | md5 = av_md5_alloc(); |
| 385 | 383 | if (!md5) |
| 386 | 384 | return 1; |
| @@ -91,9 +91,6 @@ int main(int argc, char **argv) · 90 unmodified lines | ||
| 91 | 91 | av_dict_set(&format_opts, "channels", "1", 0); |
| 92 | 92 | av_dict_set(&format_opts, "sample_rate", "22050", 0); |
| 93 | 93 | |
| 94 | − /* initialize libavcodec, and register all codecs and formats */ | |
| 95 | − av_register_all(); | |
| 96 | − | |
| 97 | 94 | if (argc < 2) { |
| 98 | 95 | printf("usage: %s input_file\n" |
| 99 | 96 | "\n", argv[0]); |
| @@ -214,8 +214,6 @@ int main(int argc, char **argv) · 213 unmodified lines | ||
| 214 | 214 | return 1; |
| 215 | 215 | } |
| 216 | 216 | |
| 217 | − av_register_all(); | |
| 218 | − | |
| 219 | 217 | if (video_decode(argv[1]) != 0) |
| 220 | 218 | return 1; |
| 221 | 219 | |
| @@ -231,8 +231,6 @@ int main(int argc, char* argv[]) · 230 unmodified lines | ||
| 231 | 231 | AVFormatContext *fmt_ctx = NULL; |
| 232 | 232 | AVFormatContext *fmt_ctx_no_decode = NULL; |
| 233 | 233 | |
| 234 | − av_register_all(); | |
| 235 | − | |
| 236 | 234 | if (argc < 2) { |
| 237 | 235 | av_log(NULL, AV_LOG_ERROR, "Usage: %s <input>\n", argv[0]); |
| 238 | 236 | return -1; |
| @@ -245,8 +245,6 @@ int main(void) · 244 unmodified lines | ||
| 245 | 245 | int sample_rates[] = {8000, 44100, 48000, 192000}; |
| 246 | 246 | int cl, sr; |
| 247 | 247 | |
| 248 | − avcodec_register_all(); | |
| 249 | − | |
| 250 | 248 | enc = avcodec_find_encoder(AV_CODEC_ID_FLAC); |
| 251 | 249 | if (!enc) { |
| 252 | 250 | av_log(NULL, AV_LOG_ERROR, "Can't find encoder\n"); |
| @@ -158,8 +158,6 @@ int main(int argc, char **argv) · 157 unmodified lines | ||
| 158 | 158 | return 1; |
| 159 | 159 | } |
| 160 | 160 | |
| 161 | − av_register_all(); | |
| 162 | − | |
| 163 | 161 | if (video_decode_example(argv[1]) != 0) |
| 164 | 162 | return 1; |
| 165 | 163 | |
| @@ -279,8 +279,6 @@ int main(int argc, char **argv) · 278 unmodified lines | ||
| 279 | 279 | return 1; |
| 280 | 280 | } |
| 281 | 281 | |
| 282 | − av_register_all(); | |
| 283 | − | |
| 284 | 282 | if (seek_test(argv[1], argv[2], argv[3]) != 0) |
| 285 | 283 | return 1; |
| 286 | 284 | |
| @@ -42,7 +42,6 @@ int main(int argc, char **argv) · 41 unmodified lines | ||
| 42 | 42 | AVDictionary *in_opts = NULL; |
| 43 | 43 | AVDictionary *out_opts = NULL; |
| 44 | 44 | |
| 45 | − av_register_all(); | |
| 46 | 45 | avformat_network_init(); |
| 47 | 46 | |
| 48 | 47 | for (i = 1; i < argc; i++) { |
| @@ -130,8 +130,6 @@ int main(int argc, char **argv) · 129 unmodified lines | ||
| 130 | 130 | if (argc < 2) |
| 131 | 131 | print_usage(); |
| 132 | 132 | |
| 133 | − av_register_all(); | |
| 134 | − | |
| 135 | 133 | if (!strcmp(argv[1], "format")) |
| 136 | 134 | show_format_opts(); |
| 137 | 135 | else if (!strcmp(argv[1], "codec")) |
| @@ -189,8 +189,6 @@ int main(int argc, char **argv) · 188 unmodified lines | ||
| 189 | 189 | *p = '\0'; |
| 190 | 190 | } |
| 191 | 191 | |
| 192 | − avfilter_register_all(); | |
| 193 | − | |
| 194 | 192 | if (avfilter_graph_parse(graph, graph_string, NULL, NULL, NULL) < 0) { |
| 195 | 193 | fprintf(stderr, "Failed to parse the graph description\n"); |
| 196 | 194 | return 1; |
| @@ -791,8 +791,6 @@ int main(int argc, char **argv) · 790 unmodified lines | ||
| 791 | 791 | int split = 0, ismf = 0, i; |
| 792 | 792 | struct Tracks tracks = { 0, .video_track = -1, .audio_track = -1 }; |
| 793 | 793 | |
| 794 | − av_register_all(); | |
| 795 | − | |
| 796 | 794 | for (i = 1; i < argc; i++) { |
| 797 | 795 | if (!strcmp(argv[i], "-n")) { |
| 798 | 796 | basename = argv[i + 1]; |
| @@ -89,9 +89,6 @@ int main(int argc, char **argv) · 88 unmodified lines | ||
| 89 | 89 | strcat(fntemplate, PKTFILESUFF); |
| 90 | 90 | printf("FNTEMPLATE: '%s'\n", fntemplate); |
| 91 | 91 | |
| 92 | − // register all file formats | |
| 93 | − av_register_all(); | |
| 94 | − | |
| 95 | 92 | err = avformat_open_input(&fctx, argv[1], NULL, NULL); |
| 96 | 93 | if (err < 0) { |
| 97 | 94 | fprintf(stderr, "cannot open input: error %d\n", err); |
| @@ -124,9 +124,6 @@ int main(int argc, char **argv) · 123 unmodified lines | ||
| 124 | 124 | return 1; |
| 125 | 125 | } |
| 126 | 126 | |
| 127 | − avcodec_register_all(); | |
| 128 | − av_register_all(); | |
| 129 | − | |
| 130 | 127 | av_lfg_init(&state, 0xdeadbeef); |
| 131 | 128 | |
| 132 | 129 | pd.buf = NULL; |
| @@ -65,7 +65,6 @@ int main(int argc, char **argv) · 64 unmodified lines | ||
| 65 | 65 | argv++; |
| 66 | 66 | argc--; |
| 67 | 67 | |
| 68 | − av_register_all(); | |
| 69 | 68 | if ((ret = avformat_open_input(&avf, filename, NULL, NULL)) < 0) { |
| 70 | 69 | fprintf(stderr, "%s: %s\n", filename, av_err2str(ret)); |
| 71 | 70 | return 1; |
| @@ -363,8 +363,6 @@ int main(int argc, char **argv) · 362 unmodified lines | ||
| 363 | 363 | struct Tracks tracks = { 0 }; |
| 364 | 364 | int i; |
| 365 | 365 | |
| 366 | − av_register_all(); | |
| 367 | − | |
| 368 | 366 | for (i = 1; i < argc; i++) { |
| 369 | 367 | if (!strcmp(argv[i], "-out")) { |
| 370 | 368 | out = argv[i + 1]; |
| @@ -62,9 +62,7 @@ int main(int argc, char **argv) · 61 unmodified lines | ||
| 62 | 62 | out_dev_name = argv + 2; |
| 63 | 63 | nb_out_dev = argc - 2; |
| 64 | 64 | |
| 65 | − av_register_all(); | |
| 66 | 65 | avdevice_register_all(); |
| 67 | − avfilter_register_all(); | |
| 68 | 66 | |
| 69 | 67 | /* Create input graph */ |
| 70 | 68 | if (!(in_graph = avfilter_graph_alloc())) { |