History

examples: Don't call deprecated functions which don't do anything

Mark Thompson committed 8 years ago

Commit 10bcc411 parent c69054f20 files · +0 −40Browse files

Unified · Split

20 files
  1. doc/examples/avio_dir_cmd.c +0 −2
  2. doc/examples/avio_reading.c +0 −3
  3. doc/examples/decode_audio.c +0 −3
  4. doc/examples/decode_video.c +0 −2
  5. doc/examples/demuxing_decoding.c +0 −3
  6. doc/examples/encode_audio.c +0 −3
  7. doc/examples/encode_video.c +0 −2
  8. doc/examples/extract_mvs.c +0 −2
  9. doc/examples/filtering_audio.c +0 −1
  10. doc/examples/filtering_video.c +0 −1
  11. doc/examples/http_multiclient.c +0 −1
  12. doc/examples/hw_decode.c +0 −2
  13. doc/examples/metadata.c +0 −1
  14. doc/examples/muxing.c +0 −3
  15. doc/examples/qsvdec.c +0 −2
  16. doc/examples/remuxing.c +0 −2
  17. doc/examples/transcode_aac.c +0 −2
  18. doc/examples/transcoding.c +0 −1
  19. doc/examples/vaapi_encode.c +0 −2
  20. doc/examples/vaapi_transcode.c +0 −2
doc/examples/avio_dir_cmd.c+0−2
@@ -143,8 +143,6 @@ int main(int argc, char *argv[]) · 142 unmodified lines
143143 return 1;
144144 }
145145
146− /* register codecs and formats and other lavf/lavc components*/
147− av_register_all();
148146 avformat_network_init();
149147
150148 op = argv[1];
doc/examples/avio_reading.c+0−3
@@ -74,9 +74,6 @@ int main(int argc, char *argv[]) · 73 unmodified lines
7474 }
7575 input_filename = argv[1];
7676
77− /* register codecs and formats and other lavf/lavc components*/
78− av_register_all();
79−
8077 /* slurp file content into buffer */
8178 ret = av_file_map(input_filename, &buffer, &buffer_size, 0, NULL);
8279 if (ret < 0)
doc/examples/decode_audio.c+0−3
@@ -94,9 +94,6 @@ int main(int argc, char **argv) · 93 unmodified lines
9494 filename = argv[1];
9595 outfilename = argv[2];
9696
97− /* register all the codecs */
98− avcodec_register_all();
99−
10097 pkt = av_packet_alloc();
10198
10299 /* find the MPEG audio decoder */
doc/examples/decode_video.c+0−2
@@ -101,8 +101,6 @@ int main(int argc, char **argv) · 100 unmodified lines
101101 filename = argv[1];
102102 outfilename = argv[2];
103103
104− avcodec_register_all();
105−
106104 pkt = av_packet_alloc();
107105 if (!pkt)
108106 exit(1);
doc/examples/demuxing_decoding.c+0−3
@@ -252,9 +252,6 @@ int main (int argc, char **argv) · 251 unmodified lines
252252 video_dst_filename = argv[2];
253253 audio_dst_filename = argv[3];
254254
255− /* register all formats and codecs */
256− av_register_all();
257−
258255 /* open input file, and allocate format context */
259256 if (avformat_open_input(&fmt_ctx, src_filename, NULL, NULL) < 0) {
260257 fprintf(stderr, "Could not open source file %s\n", src_filename);
doc/examples/encode_audio.c+0−3
@@ -138,9 +138,6 @@ int main(int argc, char **argv) · 137 unmodified lines
138138 }
139139 filename = argv[1];
140140
141− /* register all the codecs */
142− avcodec_register_all();
143−
144141 /* find the MP2 encoder */
145142 codec = avcodec_find_encoder(AV_CODEC_ID_MP2);
146143 if (!codec) {
doc/examples/encode_video.c+0−2
@@ -84,8 +84,6 @@ int main(int argc, char **argv) · 83 unmodified lines
8484 filename = argv[1];
8585 codec_name = argv[2];
8686
87− avcodec_register_all();
88−
8987 /* find the mpeg1video encoder */
9088 codec = avcodec_find_encoder_by_name(codec_name);
9189 if (!codec) {
doc/examples/extract_mvs.c+0−2
@@ -129,8 +129,6 @@ int main(int argc, char **argv) · 128 unmodified lines
129129 }
130130 src_filename = argv[1];
131131
132− av_register_all();
133−
134132 if (avformat_open_input(&fmt_ctx, src_filename, NULL, NULL) < 0) {
135133 fprintf(stderr, "Could not open source file %s\n", src_filename);
136134 exit(1);
doc/examples/filtering_audio.c+0−1
@@ -228,7 +228,6 @@ int main(int argc, char **argv) · 227 unmodified lines
228228 exit(1);
229229 }
230230
231− av_register_all();
232231 avfilter_register_all();
233232
234233 if ((ret = open_input_file(argv[1])) < 0)
doc/examples/filtering_video.c+0−1
@@ -222,7 +222,6 @@ int main(int argc, char **argv) · 221 unmodified lines
222222 exit(1);
223223 }
224224
225− av_register_all();
226225 avfilter_register_all();
227226
228227 if ((ret = open_input_file(argv[1])) < 0)
doc/examples/http_multiclient.c+0−1
@@ -114,7 +114,6 @@ int main(int argc, char **argv) · 113 unmodified lines
114114 in_uri = argv[1];
115115 out_uri = argv[2];
116116
117− av_register_all();
118117 avformat_network_init();
119118
120119 if ((ret = av_dict_set(&options, "listen", "2", 0)) < 0) {
doc/examples/hw_decode.c+0−2
@@ -163,8 +163,6 @@ int main(int argc, char *argv[]) · 162 unmodified lines
163163 return -1;
164164 }
165165
166− av_register_all();
167−
168166 type = av_hwdevice_find_type_by_name(argv[1]);
169167 if (type == AV_HWDEVICE_TYPE_NONE) {
170168 fprintf(stderr, "Device type %s is not supported.\n", argv[1]);
doc/examples/metadata.c+0−1
@@ -44,7 +44,6 @@ int main (int argc, char **argv) · 43 unmodified lines
4444 return 1;
4545 }
4646
47− av_register_all();
4847 if ((ret = avformat_open_input(&fmt_ctx, argv[1], NULL, NULL)))
4948 return ret;
5049
doc/examples/muxing.c+0−3
@@ -564,9 +564,6 @@ int main(int argc, char **argv) · 563 unmodified lines
564564 AVDictionary *opt = NULL;
565565 int i;
566566
567− /* Initialize libavcodec, and register all codecs and formats. */
568− av_register_all();
569−
570567 if (argc < 2) {
571568 printf("usage: %s output_file\n"
572569 "API example program to output a media file with libavformat.\n"
doc/examples/qsvdec.c+0−2
@@ -150,8 +150,6 @@ int main(int argc, char **argv) · 149 unmodified lines
150150
151151 int ret, i;
152152
153− av_register_all();
154−
155153 if (argc < 3) {
156154 fprintf(stderr, "Usage: %s <input file> <output file>\n", argv[0]);
157155 return 1;
doc/examples/remuxing.c+0−2
@@ -65,8 +65,6 @@ int main(int argc, char **argv) · 64 unmodified lines
6565 in_filename = argv[1];
6666 out_filename = argv[2];
6767
68− av_register_all();
69−
7068 if ((ret = avformat_open_input(&ifmt_ctx, in_filename, 0, 0)) < 0) {
7169 fprintf(stderr, "Could not open input file '%s'", in_filename);
7270 goto end;
doc/examples/transcode_aac.c+0−2
@@ -753,8 +753,6 @@ int main(int argc, char **argv) · 752 unmodified lines
753753 exit(1);
754754 }
755755
756− /* Register all codecs and formats so that they can be used. */
757− av_register_all();
758756 /* Open the input file for reading. */
759757 if (open_input_file(argv[1], &input_format_context,
760758 &input_codec_context))
doc/examples/transcoding.c+0−1
@@ -517,7 +517,6 @@ int main(int argc, char **argv) · 516 unmodified lines
517517 return 1;
518518 }
519519
520− av_register_all();
521520 avfilter_register_all();
522521
523522 if ((ret = open_input_file(argv[1])) < 0)
doc/examples/vaapi_encode.c+0−2
@@ -125,8 +125,6 @@ int main(int argc, char *argv[]) · 124 unmodified lines
125125 goto close;
126126 }
127127
128− avcodec_register_all();
129−
130128 err = av_hwdevice_ctx_create(&hw_device_ctx, AV_HWDEVICE_TYPE_VAAPI,
131129 NULL, NULL, 0);
132130 if (err < 0) {
doc/examples/vaapi_transcode.c+0−2
@@ -238,8 +238,6 @@ int main(int argc, char **argv) · 237 unmodified lines
238238 return -1;
239239 }
240240
241− av_register_all();
242−
243241 ret = av_hwdevice_ctx_create(&hw_device_ctx, AV_HWDEVICE_TYPE_VAAPI, NULL, NULL, 0);
244242 if (ret < 0) {
245243 fprintf(stderr, "Failed to create a VAAPI device. Error code: %s\n", av_err2str(ret));

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