Unified · Split
| @@ -143,8 +143,6 @@ int main(int argc, char *argv[]) · 142 unmodified lines | ||
| 143 | 143 | return 1; |
| 144 | 144 | } |
| 145 | 145 | |
| 146 | − /* register codecs and formats and other lavf/lavc components*/ | |
| 147 | − av_register_all(); | |
| 148 | 146 | avformat_network_init(); |
| 149 | 147 | |
| 150 | 148 | op = argv[1]; |
| @@ -74,9 +74,6 @@ int main(int argc, char *argv[]) · 73 unmodified lines | ||
| 74 | 74 | } |
| 75 | 75 | input_filename = argv[1]; |
| 76 | 76 | |
| 77 | − /* register codecs and formats and other lavf/lavc components*/ | |
| 78 | − av_register_all(); | |
| 79 | − | |
| 80 | 77 | /* slurp file content into buffer */ |
| 81 | 78 | ret = av_file_map(input_filename, &buffer, &buffer_size, 0, NULL); |
| 82 | 79 | if (ret < 0) |
| @@ -94,9 +94,6 @@ int main(int argc, char **argv) · 93 unmodified lines | ||
| 94 | 94 | filename = argv[1]; |
| 95 | 95 | outfilename = argv[2]; |
| 96 | 96 | |
| 97 | − /* register all the codecs */ | |
| 98 | − avcodec_register_all(); | |
| 99 | − | |
| 100 | 97 | pkt = av_packet_alloc(); |
| 101 | 98 | |
| 102 | 99 | /* find the MPEG audio decoder */ |
| @@ -101,8 +101,6 @@ int main(int argc, char **argv) · 100 unmodified lines | ||
| 101 | 101 | filename = argv[1]; |
| 102 | 102 | outfilename = argv[2]; |
| 103 | 103 | |
| 104 | − avcodec_register_all(); | |
| 105 | − | |
| 106 | 104 | pkt = av_packet_alloc(); |
| 107 | 105 | if (!pkt) |
| 108 | 106 | exit(1); |
| @@ -252,9 +252,6 @@ int main (int argc, char **argv) · 251 unmodified lines | ||
| 252 | 252 | video_dst_filename = argv[2]; |
| 253 | 253 | audio_dst_filename = argv[3]; |
| 254 | 254 | |
| 255 | − /* register all formats and codecs */ | |
| 256 | − av_register_all(); | |
| 257 | − | |
| 258 | 255 | /* open input file, and allocate format context */ |
| 259 | 256 | if (avformat_open_input(&fmt_ctx, src_filename, NULL, NULL) < 0) { |
| 260 | 257 | fprintf(stderr, "Could not open source file %s\n", src_filename); |
| @@ -138,9 +138,6 @@ int main(int argc, char **argv) · 137 unmodified lines | ||
| 138 | 138 | } |
| 139 | 139 | filename = argv[1]; |
| 140 | 140 | |
| 141 | − /* register all the codecs */ | |
| 142 | − avcodec_register_all(); | |
| 143 | − | |
| 144 | 141 | /* find the MP2 encoder */ |
| 145 | 142 | codec = avcodec_find_encoder(AV_CODEC_ID_MP2); |
| 146 | 143 | if (!codec) { |
| @@ -84,8 +84,6 @@ int main(int argc, char **argv) · 83 unmodified lines | ||
| 84 | 84 | filename = argv[1]; |
| 85 | 85 | codec_name = argv[2]; |
| 86 | 86 | |
| 87 | − avcodec_register_all(); | |
| 88 | − | |
| 89 | 87 | /* find the mpeg1video encoder */ |
| 90 | 88 | codec = avcodec_find_encoder_by_name(codec_name); |
| 91 | 89 | if (!codec) { |
| @@ -129,8 +129,6 @@ int main(int argc, char **argv) · 128 unmodified lines | ||
| 129 | 129 | } |
| 130 | 130 | src_filename = argv[1]; |
| 131 | 131 | |
| 132 | − av_register_all(); | |
| 133 | − | |
| 134 | 132 | if (avformat_open_input(&fmt_ctx, src_filename, NULL, NULL) < 0) { |
| 135 | 133 | fprintf(stderr, "Could not open source file %s\n", src_filename); |
| 136 | 134 | exit(1); |
| @@ -228,7 +228,6 @@ int main(int argc, char **argv) · 227 unmodified lines | ||
| 228 | 228 | exit(1); |
| 229 | 229 | } |
| 230 | 230 | |
| 231 | − av_register_all(); | |
| 232 | 231 | avfilter_register_all(); |
| 233 | 232 | |
| 234 | 233 | if ((ret = open_input_file(argv[1])) < 0) |
| @@ -222,7 +222,6 @@ int main(int argc, char **argv) · 221 unmodified lines | ||
| 222 | 222 | exit(1); |
| 223 | 223 | } |
| 224 | 224 | |
| 225 | − av_register_all(); | |
| 226 | 225 | avfilter_register_all(); |
| 227 | 226 | |
| 228 | 227 | if ((ret = open_input_file(argv[1])) < 0) |
| @@ -114,7 +114,6 @@ int main(int argc, char **argv) · 113 unmodified lines | ||
| 114 | 114 | in_uri = argv[1]; |
| 115 | 115 | out_uri = argv[2]; |
| 116 | 116 | |
| 117 | − av_register_all(); | |
| 118 | 117 | avformat_network_init(); |
| 119 | 118 | |
| 120 | 119 | if ((ret = av_dict_set(&options, "listen", "2", 0)) < 0) { |
| @@ -163,8 +163,6 @@ int main(int argc, char *argv[]) · 162 unmodified lines | ||
| 163 | 163 | return -1; |
| 164 | 164 | } |
| 165 | 165 | |
| 166 | − av_register_all(); | |
| 167 | − | |
| 168 | 166 | type = av_hwdevice_find_type_by_name(argv[1]); |
| 169 | 167 | if (type == AV_HWDEVICE_TYPE_NONE) { |
| 170 | 168 | fprintf(stderr, "Device type %s is not supported.\n", argv[1]); |
| @@ -44,7 +44,6 @@ int main (int argc, char **argv) · 43 unmodified lines | ||
| 44 | 44 | return 1; |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | − av_register_all(); | |
| 48 | 47 | if ((ret = avformat_open_input(&fmt_ctx, argv[1], NULL, NULL))) |
| 49 | 48 | return ret; |
| 50 | 49 | |
| @@ -564,9 +564,6 @@ int main(int argc, char **argv) · 563 unmodified lines | ||
| 564 | 564 | AVDictionary *opt = NULL; |
| 565 | 565 | int i; |
| 566 | 566 | |
| 567 | − /* Initialize libavcodec, and register all codecs and formats. */ | |
| 568 | − av_register_all(); | |
| 569 | − | |
| 570 | 567 | if (argc < 2) { |
| 571 | 568 | printf("usage: %s output_file\n" |
| 572 | 569 | "API example program to output a media file with libavformat.\n" |
| @@ -150,8 +150,6 @@ int main(int argc, char **argv) · 149 unmodified lines | ||
| 150 | 150 | |
| 151 | 151 | int ret, i; |
| 152 | 152 | |
| 153 | − av_register_all(); | |
| 154 | − | |
| 155 | 153 | if (argc < 3) { |
| 156 | 154 | fprintf(stderr, "Usage: %s <input file> <output file>\n", argv[0]); |
| 157 | 155 | return 1; |
| @@ -65,8 +65,6 @@ int main(int argc, char **argv) · 64 unmodified lines | ||
| 65 | 65 | in_filename = argv[1]; |
| 66 | 66 | out_filename = argv[2]; |
| 67 | 67 | |
| 68 | − av_register_all(); | |
| 69 | − | |
| 70 | 68 | if ((ret = avformat_open_input(&ifmt_ctx, in_filename, 0, 0)) < 0) { |
| 71 | 69 | fprintf(stderr, "Could not open input file '%s'", in_filename); |
| 72 | 70 | goto end; |
| @@ -753,8 +753,6 @@ int main(int argc, char **argv) · 752 unmodified lines | ||
| 753 | 753 | exit(1); |
| 754 | 754 | } |
| 755 | 755 | |
| 756 | − /* Register all codecs and formats so that they can be used. */ | |
| 757 | − av_register_all(); | |
| 758 | 756 | /* Open the input file for reading. */ |
| 759 | 757 | if (open_input_file(argv[1], &input_format_context, |
| 760 | 758 | &input_codec_context)) |
| @@ -517,7 +517,6 @@ int main(int argc, char **argv) · 516 unmodified lines | ||
| 517 | 517 | return 1; |
| 518 | 518 | } |
| 519 | 519 | |
| 520 | − av_register_all(); | |
| 521 | 520 | avfilter_register_all(); |
| 522 | 521 | |
| 523 | 522 | if ((ret = open_input_file(argv[1])) < 0) |
| @@ -125,8 +125,6 @@ int main(int argc, char *argv[]) · 124 unmodified lines | ||
| 125 | 125 | goto close; |
| 126 | 126 | } |
| 127 | 127 | |
| 128 | − avcodec_register_all(); | |
| 129 | − | |
| 130 | 128 | err = av_hwdevice_ctx_create(&hw_device_ctx, AV_HWDEVICE_TYPE_VAAPI, |
| 131 | 129 | NULL, NULL, 0); |
| 132 | 130 | if (err < 0) { |
| @@ -238,8 +238,6 @@ int main(int argc, char **argv) · 237 unmodified lines | ||
| 238 | 238 | return -1; |
| 239 | 239 | } |
| 240 | 240 | |
| 241 | − av_register_all(); | |
| 242 | − | |
| 243 | 241 | ret = av_hwdevice_ctx_create(&hw_device_ctx, AV_HWDEVICE_TYPE_VAAPI, NULL, NULL, 0); |
| 244 | 242 | if (ret < 0) { |
| 245 | 243 | fprintf(stderr, "Failed to create a VAAPI device. Error code: %s\n", av_err2str(ret)); |