From patchwork Wed Feb 7 19:44:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Thompson X-Patchwork-Id: 7525 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.150.1 with SMTP id c1csp985173jai; Wed, 7 Feb 2018 11:44:45 -0800 (PST) X-Google-Smtp-Source: AH8x226iPl/qbqOnRkDeHvIwtgR27AyXCN00wUSfis32ElnrzyuWXP++wpgqs3m8RW7+/ST9ISYo X-Received: by 10.28.107.134 with SMTP id a6mr5746943wmi.136.1518032685031; Wed, 07 Feb 2018 11:44:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518032684; cv=none; d=google.com; s=arc-20160816; b=iH6RI9HLduV+Cvxh26t6cbEpht6TuZKzDQ5OVbJrXAXrgrhR840zXlLzeZNG44H0ue RsXxMpa00xJQaU4KKt4YUgy7VkPQl+jlvffUn5Kkro/ARryaCMj482A6S4xjARM4A9ZJ SorA+L58TJhCaRCv30JxfuQijZpV47ruklUWKG/Gp/2EN+5mCKm2N7bSimbJZ/fEBuc6 huQHXS/iSthviQcKJX87gPlNXgphCWWFNNOCK4Adv/oFts3sUptOGQAmWgfDbRzCaNWV YGv1sjKiZAhTMi+nn03JGee6UKmfn6wkAvLfcFMqfgLuA+lhM7G1Y/tzMmilCZ1ZS3Pl hYuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:content-language:mime-version:user-agent:date :message-id:from:to:dkim-signature:delivered-to :arc-authentication-results; bh=dzhv7Nbycjq9qWaLvoiNHKJRMfKzCeo3dJGfMgWlFd0=; b=p4kmSDCTIz4OMPIwGzXcUltnqMa9LhHooxkwZeK0F8mjZ+gKmaJrvgTClvn3wV2tPH GEdwFsXRMAejx30E2K6+tl23BIi9jIuwgmKrMXskzflnxJiwvwI37b1NjWwo4D06F4sU 3hWf9h/SVaLW+85vKQp32wS+WJJn22KY9NxmnadLJ6XnhheP3UY6Ap7VyoGP6ge60oEW Tz7N9oPIw5seudzjmWrPAPCE/cus/l/PLQpIV+ONtvf0BbDob0UE3cMWC5wwyKSJneAy kMMFZg2v4JsyShXXWQm6bHfw6MrJG0Fqn3ss5i7onZVzywPA95FfRnGF/BxObEsJOySu tg/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@jkqxz-net.20150623.gappssmtp.com header.s=20150623 header.b=Gz+LLkYK; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id r29si1771206wrc.334.2018.02.07.11.44.43; Wed, 07 Feb 2018 11:44:44 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@jkqxz-net.20150623.gappssmtp.com header.s=20150623 header.b=Gz+LLkYK; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4350D68043D; Wed, 7 Feb 2018 21:44:34 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr0-f195.google.com (mail-wr0-f195.google.com [209.85.128.195]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 91C1B68039D for ; Wed, 7 Feb 2018 21:44:27 +0200 (EET) Received: by mail-wr0-f195.google.com with SMTP id a43so2335130wrc.4 for ; Wed, 07 Feb 2018 11:44:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jkqxz-net.20150623.gappssmtp.com; s=20150623; h=to:from:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=cV/fgRftjOLAXn/q3aULk1mKQisTjzPPjNmIIgOGlko=; b=Gz+LLkYK1hhHzCs1qBdOB2en49lFQ4bIHHpkwi97npNj7B1eQqaCqUAcWSeUs1wCkg ECgiuB3AvowkPurht1/m61pQQHKVZQlzhyxnv8sYBwQ7iqf1ZW1lHOC5NIg+YVf4NNFL LrlnrjIOCXKXzs/+25r6BtO/DYztggyV3Gk3r134+1fbtLmkKgDGRexJGhPf6+zxynKx pJm/UB9SIZiKmZtku6rS+7n7KcvlZ6Dbzcmqz4NyR5jCqsa8cO7RcyFtiZiEimv6E1RX CZAK4IqVDsi1PwXCv10G5MXu7e0sHI6dP0eX+dkFqYfzH+rCYKQVUq18dm+ffsmOCntp bYxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=cV/fgRftjOLAXn/q3aULk1mKQisTjzPPjNmIIgOGlko=; b=KomwU2klW1Jz+evfYClgHikUHaiGUs/qtDq9a6KS6FR2iVmo7MCtYpEzP3C8kqUxMw +tiWuUZmKszFQimFPAKxvwihKTihqOYTw2ZQUtlL7x9SprYKAa3pAklUlfasG4hHKT9K 4GUK3IGoOjozJlaJCc9ivaRVn6scoU8Yq2dqfJ4zH9NZq7fvcT8yuqsAmRbWUemAn2FU wRYFh0fBhm8ocv+R87WLb8Sm3RxbfjO+Sph8IFPADNl9UFOFSke1bDLRYFicK52gXK+p 1kQ0Vmve7jSB83CLbSlS+GfrQkRlwbRRf3WuhIftNQlpmGI+4bX1qqCuQmFicLtJ0vfv wicg== X-Gm-Message-State: APf1xPAG77uDeh+MIXQMgGZeRyTE5+1ktTn1mLEkLj3100F69vFrkLNR w1Tc7eOV1wUPcH/sgFg5UfDD3fzB X-Received: by 10.223.133.212 with SMTP id 20mr7047661wru.167.1518032675542; Wed, 07 Feb 2018 11:44:35 -0800 (PST) Received: from [192.168.0.3] (cpc91242-cmbg18-2-0-cust650.5-4.cable.virginm.net. [82.8.130.139]) by smtp.gmail.com with ESMTPSA id d195sm2631331wmd.2.2018.02.07.11.44.34 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Feb 2018 11:44:34 -0800 (PST) To: FFmpeg development discussions and patches From: Mark Thompson Message-ID: <69f7492f-17b1-28f2-d0bb-9d1232e8e4b5@jkqxz.net> Date: Wed, 7 Feb 2018 19:44:33 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 Content-Language: en-US Subject: [FFmpeg-devel] [PATCH] examples: Don't call deprecated functions which don't do anything X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" --- doc/examples/avio_dir_cmd.c | 2 -- doc/examples/avio_reading.c | 3 --- doc/examples/decode_audio.c | 3 --- doc/examples/decode_video.c | 2 -- doc/examples/demuxing_decoding.c | 3 --- doc/examples/encode_audio.c | 3 --- doc/examples/encode_video.c | 2 -- doc/examples/extract_mvs.c | 2 -- doc/examples/filtering_audio.c | 1 - doc/examples/filtering_video.c | 1 - doc/examples/http_multiclient.c | 1 - doc/examples/hw_decode.c | 2 -- doc/examples/metadata.c | 1 - doc/examples/muxing.c | 3 --- doc/examples/qsvdec.c | 2 -- doc/examples/remuxing.c | 2 -- doc/examples/transcode_aac.c | 2 -- doc/examples/transcoding.c | 1 - doc/examples/vaapi_encode.c | 2 -- doc/examples/vaapi_transcode.c | 2 -- 20 files changed, 40 deletions(-) diff --git a/doc/examples/avio_dir_cmd.c b/doc/examples/avio_dir_cmd.c index 50c435cf8f..0722bd9ab1 100644 --- a/doc/examples/avio_dir_cmd.c +++ b/doc/examples/avio_dir_cmd.c @@ -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]; diff --git a/doc/examples/avio_reading.c b/doc/examples/avio_reading.c index 7860fd5e2f..cbfeb174b8 100644 --- a/doc/examples/avio_reading.c +++ b/doc/examples/avio_reading.c @@ -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) diff --git a/doc/examples/decode_audio.c b/doc/examples/decode_audio.c index fb9a9af2f6..19dcafd2c8 100644 --- a/doc/examples/decode_audio.c +++ b/doc/examples/decode_audio.c @@ -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 */ diff --git a/doc/examples/decode_video.c b/doc/examples/decode_video.c index 4377fd49e0..5a9d43f689 100644 --- a/doc/examples/decode_video.c +++ b/doc/examples/decode_video.c @@ -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); diff --git a/doc/examples/demuxing_decoding.c b/doc/examples/demuxing_decoding.c index b1a216abb4..69a31a8935 100644 --- a/doc/examples/demuxing_decoding.c +++ b/doc/examples/demuxing_decoding.c @@ -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); diff --git a/doc/examples/encode_audio.c b/doc/examples/encode_audio.c index d1ef105d9d..ab3586be7f 100644 --- a/doc/examples/encode_audio.c +++ b/doc/examples/encode_audio.c @@ -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) { diff --git a/doc/examples/encode_video.c b/doc/examples/encode_video.c index 8cd13219bb..6731b2ad19 100644 --- a/doc/examples/encode_video.c +++ b/doc/examples/encode_video.c @@ -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) { diff --git a/doc/examples/extract_mvs.c b/doc/examples/extract_mvs.c index 7ae934ead3..de31ccd2b9 100644 --- a/doc/examples/extract_mvs.c +++ b/doc/examples/extract_mvs.c @@ -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); diff --git a/doc/examples/filtering_audio.c b/doc/examples/filtering_audio.c index 18d6ca275c..73a00e814c 100644 --- a/doc/examples/filtering_audio.c +++ b/doc/examples/filtering_audio.c @@ -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) diff --git a/doc/examples/filtering_video.c b/doc/examples/filtering_video.c index 9b607ba016..01d6644620 100644 --- a/doc/examples/filtering_video.c +++ b/doc/examples/filtering_video.c @@ -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) diff --git a/doc/examples/http_multiclient.c b/doc/examples/http_multiclient.c index e2c2201a08..831e89c60a 100644 --- a/doc/examples/http_multiclient.c +++ b/doc/examples/http_multiclient.c @@ -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) { diff --git a/doc/examples/hw_decode.c b/doc/examples/hw_decode.c index 83a5808bf7..14fe08b374 100644 --- a/doc/examples/hw_decode.c +++ b/doc/examples/hw_decode.c @@ -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]); diff --git a/doc/examples/metadata.c b/doc/examples/metadata.c index f73c267369..e330d077a9 100644 --- a/doc/examples/metadata.c +++ b/doc/examples/metadata.c @@ -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; diff --git a/doc/examples/muxing.c b/doc/examples/muxing.c index 6b98a3b2a0..08da98e574 100644 --- a/doc/examples/muxing.c +++ b/doc/examples/muxing.c @@ -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" diff --git a/doc/examples/qsvdec.c b/doc/examples/qsvdec.c index cede6153be..7415eefca5 100644 --- a/doc/examples/qsvdec.c +++ b/doc/examples/qsvdec.c @@ -150,8 +150,6 @@ int main(int argc, char **argv) int ret, i; - av_register_all(); - if (argc < 3) { fprintf(stderr, "Usage: %s \n", argv[0]); return 1; diff --git a/doc/examples/remuxing.c b/doc/examples/remuxing.c index 59594181a7..9e4d1031b4 100644 --- a/doc/examples/remuxing.c +++ b/doc/examples/remuxing.c @@ -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; diff --git a/doc/examples/transcode_aac.c b/doc/examples/transcode_aac.c index 3c7688cd33..b19349573a 100644 --- a/doc/examples/transcode_aac.c +++ b/doc/examples/transcode_aac.c @@ -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)) diff --git a/doc/examples/transcoding.c b/doc/examples/transcoding.c index e32ab20245..ed1fd6411b 100644 --- a/doc/examples/transcoding.c +++ b/doc/examples/transcoding.c @@ -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) diff --git a/doc/examples/vaapi_encode.c b/doc/examples/vaapi_encode.c index 6425b1c98c..3bdc62bef3 100644 --- a/doc/examples/vaapi_encode.c +++ b/doc/examples/vaapi_encode.c @@ -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) { diff --git a/doc/examples/vaapi_transcode.c b/doc/examples/vaapi_transcode.c index 6318895af3..649f48b97c 100644 --- a/doc/examples/vaapi_transcode.c +++ b/doc/examples/vaapi_transcode.c @@ -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));