History

lav*,tests: remove several register_all calls

avdevice_register_all() is still required to register devices into lavf (this is required due to lavd being somewhat of a hack).

Josh de Kock committed 8 years ago

Commit 89029bd1 parent d1221f328 files · +0 −58Browse files

Unified · Split

28 files
  1. doc/examples/filter_audio.c +0 −2
  2. doc/examples/filtering_audio.c +0 −2
  3. doc/examples/filtering_video.c +0 −2
  4. doc/examples/transcoding.c +0 −2
  5. fftools/ffmpeg.c +0 −3
  6. fftools/ffplay.c +0 −4
  7. fftools/ffprobe.c +0 −1
  8. libavcodec/tests/utils.c +0 −1
  9. libavdevice/lavfi.c +0 −2
  10. libavfilter/lavfutils.c +0 −2
  11. libavfilter/src_movie.c +0 −2
  12. libavfilter/tests/filtfmts.c +0 −2
  13. libavformat/tests/movenc.c +0 −2
  14. libavformat/tests/seek.c +0 −3
  15. tests/api/api-band-test.c +0 −2
  16. tests/api/api-codec-param-test.c +0 −2
  17. tests/api/api-flac-test.c +0 −2
  18. tests/api/api-h264-test.c +0 −2
  19. tests/api/api-seek-test.c +0 −2
  20. tools/aviocat.c +0 −1
  21. tools/enum_options.c +0 −2
  22. tools/graph2dot.c +0 −2
  23. tools/ismindex.c +0 −2
  24. tools/pktdumper.c +0 −3
  25. tools/probetest.c +0 −3
  26. tools/seek_print.c +0 −1
  27. tools/sidxindex.c +0 −2
  28. tools/uncoded_frame.c +0 −2
doc/examples/filter_audio.c+0−2
@@ -289,8 +289,6 @@ int main(int argc, char *argv[]) · 288 unmodified lines
289289 return 1;
290290 }
291291
292− avfilter_register_all();
293−
294292 /* Allocate the frame we will be using to store the data. */
295293 frame = av_frame_alloc();
296294 if (!frame) {
doc/examples/filtering_audio.c+0−2
@@ -228,8 +228,6 @@ int main(int argc, char **argv) · 227 unmodified lines
228228 exit(1);
229229 }
230230
231− avfilter_register_all();
232−
233231 if ((ret = open_input_file(argv[1])) < 0)
234232 goto end;
235233 if ((ret = init_filters(filter_descr)) < 0)
doc/examples/filtering_video.c+0−2
@@ -222,8 +222,6 @@ int main(int argc, char **argv) · 221 unmodified lines
222222 exit(1);
223223 }
224224
225− avfilter_register_all();
226−
227225 if ((ret = open_input_file(argv[1])) < 0)
228226 goto end;
229227 if ((ret = init_filters(filter_descr)) < 0)
doc/examples/transcoding.c+0−2
@@ -517,8 +517,6 @@ int main(int argc, char **argv) · 516 unmodified lines
517517 return 1;
518518 }
519519
520− avfilter_register_all();
521−
522520 if ((ret = open_input_file(argv[1])) < 0)
523521 goto end;
524522 if ((ret = open_output_file(argv[2])) < 0)
fftools/ffmpeg.c+0−3
@@ -4776,12 +4776,9 @@ int main(int argc, char **argv) · 4775 unmodified lines
47764776 argv++;
47774777 }
47784778
4779− avcodec_register_all();
47804779 #if CONFIG_AVDEVICE
47814780 avdevice_register_all();
47824781 #endif
4783− avfilter_register_all();
4784− av_register_all();
47854782 avformat_network_init();
47864783
47874784 show_banner(argc, argv, options);
fftools/ffplay.c+0−4
@@ -3655,10 +3655,6 @@ int main(int argc, char **argv) · 3654 unmodified lines
36553655 #if CONFIG_AVDEVICE
36563656 avdevice_register_all();
36573657 #endif
3658−#if CONFIG_AVFILTER
3659− avfilter_register_all();
3660−#endif
3661− av_register_all();
36623658 avformat_network_init();
36633659
36643660 init_opts();
fftools/ffprobe.c+0−1
@@ -3567,7 +3567,6 @@ int main(int argc, char **argv) · 3566 unmodified lines
35673567
35683568 options = real_options;
35693569 parse_loglevel(argc, argv, options);
3570− av_register_all();
35713570 avformat_network_init();
35723571 init_opts();
35733572 #if CONFIG_AVDEVICE
libavcodec/tests/utils.c+0−1
@@ -21,7 +21,6 @@ · 20 unmodified lines
2121 int main(void){
2222 AVCodec *codec = NULL;
2323 int ret = 0;
24− avcodec_register_all();
2524
2625 while (codec = av_codec_next(codec)) {
2726 if (av_codec_is_encoder(codec)) {
libavdevice/lavfi.c+0−2
@@ -130,8 +130,6 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx) · 129 unmodified lines
130130 if (!pix_fmts)
131131 FAIL(AVERROR(ENOMEM));
132132
133− avfilter_register_all();
134−
135133 buffersink = avfilter_get_by_name("buffersink");
136134 abuffersink = avfilter_get_by_name("abuffersink");
137135
libavfilter/lavfutils.c+0−2
@@ -37,8 +37,6 @@ int ff_load_image(uint8_t *data[4], int linesize[4], · 36 unmodified lines
3737
3838 av_init_packet(&pkt);
3939
40− av_register_all();
41−
4240 iformat = av_find_input_format("image2pipe");
4341 if ((ret = avformat_open_input(&format_ctx, filename, iformat, NULL)) < 0) {
4442 av_log(log_ctx, AV_LOG_ERROR,
libavfilter/src_movie.c+0−2
@@ -239,8 +239,6 @@ static av_cold int movie_common_init(AVFilterContext *ctx) · 238 unmodified lines
239239 return AVERROR_PATCHWELCOME;
240240 }
241241
242− av_register_all();
243−
244242 // Try to find the movie format (container)
245243 iformat = movie->format_name ? av_find_input_format(movie->format_name) : NULL;
246244
libavfilter/tests/filtfmts.c+0−2
@@ -97,8 +97,6 @@ int main(int argc, char **argv) · 96 unmodified lines
9797 if (!graph_ctx)
9898 return 1;
9999
100− avfilter_register_all();
101−
102100 /* get a corresponding filter and open it */
103101 if (!(filter = avfilter_get_by_name(filter_name))) {
104102 fprintf(stderr, "Unrecognized filter with name '%s'\n", filter_name);
libavformat/tests/movenc.c+0−2
@@ -379,8 +379,6 @@ int main(int argc, char **argv) · 378 unmodified lines
379379 }
380380 }
381381
382− av_register_all();
383−
384382 md5 = av_md5_alloc();
385383 if (!md5)
386384 return 1;
libavformat/tests/seek.c+0−3
@@ -91,9 +91,6 @@ int main(int argc, char **argv) · 90 unmodified lines
9191 av_dict_set(&format_opts, "channels", "1", 0);
9292 av_dict_set(&format_opts, "sample_rate", "22050", 0);
9393
94− /* initialize libavcodec, and register all codecs and formats */
95− av_register_all();
96−
9794 if (argc < 2) {
9895 printf("usage: %s input_file\n"
9996 "\n", argv[0]);
tests/api/api-band-test.c+0−2
@@ -214,8 +214,6 @@ int main(int argc, char **argv) · 213 unmodified lines
214214 return 1;
215215 }
216216
217− av_register_all();
218−
219217 if (video_decode(argv[1]) != 0)
220218 return 1;
221219
tests/api/api-codec-param-test.c+0−2
@@ -231,8 +231,6 @@ int main(int argc, char* argv[]) · 230 unmodified lines
231231 AVFormatContext *fmt_ctx = NULL;
232232 AVFormatContext *fmt_ctx_no_decode = NULL;
233233
234− av_register_all();
235−
236234 if (argc < 2) {
237235 av_log(NULL, AV_LOG_ERROR, "Usage: %s <input>\n", argv[0]);
238236 return -1;
tests/api/api-flac-test.c+0−2
@@ -245,8 +245,6 @@ int main(void) · 244 unmodified lines
245245 int sample_rates[] = {8000, 44100, 48000, 192000};
246246 int cl, sr;
247247
248− avcodec_register_all();
249−
250248 enc = avcodec_find_encoder(AV_CODEC_ID_FLAC);
251249 if (!enc) {
252250 av_log(NULL, AV_LOG_ERROR, "Can't find encoder\n");
tests/api/api-h264-test.c+0−2
@@ -158,8 +158,6 @@ int main(int argc, char **argv) · 157 unmodified lines
158158 return 1;
159159 }
160160
161− av_register_all();
162−
163161 if (video_decode_example(argv[1]) != 0)
164162 return 1;
165163
tests/api/api-seek-test.c+0−2
@@ -279,8 +279,6 @@ int main(int argc, char **argv) · 278 unmodified lines
279279 return 1;
280280 }
281281
282− av_register_all();
283−
284282 if (seek_test(argv[1], argv[2], argv[3]) != 0)
285283 return 1;
286284
tools/aviocat.c+0−1
@@ -42,7 +42,6 @@ int main(int argc, char **argv) · 41 unmodified lines
4242 AVDictionary *in_opts = NULL;
4343 AVDictionary *out_opts = NULL;
4444
45− av_register_all();
4645 avformat_network_init();
4746
4847 for (i = 1; i < argc; i++) {
tools/enum_options.c+0−2
@@ -130,8 +130,6 @@ int main(int argc, char **argv) · 129 unmodified lines
130130 if (argc < 2)
131131 print_usage();
132132
133− av_register_all();
134−
135133 if (!strcmp(argv[1], "format"))
136134 show_format_opts();
137135 else if (!strcmp(argv[1], "codec"))
tools/graph2dot.c+0−2
@@ -189,8 +189,6 @@ int main(int argc, char **argv) · 188 unmodified lines
189189 *p = '\0';
190190 }
191191
192− avfilter_register_all();
193−
194192 if (avfilter_graph_parse(graph, graph_string, NULL, NULL, NULL) < 0) {
195193 fprintf(stderr, "Failed to parse the graph description\n");
196194 return 1;
tools/ismindex.c+0−2
@@ -791,8 +791,6 @@ int main(int argc, char **argv) · 790 unmodified lines
791791 int split = 0, ismf = 0, i;
792792 struct Tracks tracks = { 0, .video_track = -1, .audio_track = -1 };
793793
794− av_register_all();
795−
796794 for (i = 1; i < argc; i++) {
797795 if (!strcmp(argv[i], "-n")) {
798796 basename = argv[i + 1];
tools/pktdumper.c+0−3
@@ -89,9 +89,6 @@ int main(int argc, char **argv) · 88 unmodified lines
8989 strcat(fntemplate, PKTFILESUFF);
9090 printf("FNTEMPLATE: '%s'\n", fntemplate);
9191
92− // register all file formats
93− av_register_all();
94−
9592 err = avformat_open_input(&fctx, argv[1], NULL, NULL);
9693 if (err < 0) {
9794 fprintf(stderr, "cannot open input: error %d\n", err);
tools/probetest.c+0−3
@@ -124,9 +124,6 @@ int main(int argc, char **argv) · 123 unmodified lines
124124 return 1;
125125 }
126126
127− avcodec_register_all();
128− av_register_all();
129−
130127 av_lfg_init(&state, 0xdeadbeef);
131128
132129 pd.buf = NULL;
tools/seek_print.c+0−1
@@ -65,7 +65,6 @@ int main(int argc, char **argv) · 64 unmodified lines
6565 argv++;
6666 argc--;
6767
68− av_register_all();
6968 if ((ret = avformat_open_input(&avf, filename, NULL, NULL)) < 0) {
7069 fprintf(stderr, "%s: %s\n", filename, av_err2str(ret));
7170 return 1;
tools/sidxindex.c+0−2
@@ -363,8 +363,6 @@ int main(int argc, char **argv) · 362 unmodified lines
363363 struct Tracks tracks = { 0 };
364364 int i;
365365
366− av_register_all();
367−
368366 for (i = 1; i < argc; i++) {
369367 if (!strcmp(argv[i], "-out")) {
370368 out = argv[i + 1];
tools/uncoded_frame.c+0−2
@@ -62,9 +62,7 @@ int main(int argc, char **argv) · 61 unmodified lines
6262 out_dev_name = argv + 2;
6363 nb_out_dev = argc - 2;
6464
65− av_register_all();
6665 avdevice_register_all();
67− avfilter_register_all();
6866
6967 /* Create input graph */
7068 if (!(in_graph = avfilter_graph_alloc())) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t