diff mbox series

[FFmpeg-devel,1/5] avcodec/avcodec: Don't suggest calling deprecated avcodec_register_all()

Message ID 20210307001601.2126517-1-andreas.rheinhardt@gmail.com
State Accepted
Commit 136dd5b592a17efdf8c05c73888d06fb4a8e0912
Headers show
Series [FFmpeg-devel,1/5] avcodec/avcodec: Don't suggest calling deprecated avcodec_register_all() | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt March 7, 2021, 12:15 a.m. UTC
Despite avcodec_register and avcodec_register_all being deprecated,
their documentation still said that one of them has to be called
before doing anything else. Clarify this confusing situation.

Furthermore, don't use avcodec_register_all in sample code for
a non-deprecated function.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavcodec/avcodec.h | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

Comments

Jun Zhao March 7, 2021, 4:13 a.m. UTC | #1
Looks good

On Sun, Mar 7, 2021 at 8:16 AM Andreas Rheinhardt
<andreas.rheinhardt@gmail.com> wrote:
>
> Despite avcodec_register and avcodec_register_all being deprecated,
> their documentation still said that one of them has to be called
> before doing anything else. Clarify this confusing situation.
>
> Furthermore, don't use avcodec_register_all in sample code for
> a non-deprecated function.
>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
> ---
>  libavcodec/avcodec.h | 17 ++---------------
>  1 file changed, 2 insertions(+), 15 deletions(-)
>
> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> index 309d9965be..46d31b34ad 100644
> --- a/libavcodec/avcodec.h
> +++ b/libavcodec/avcodec.h
> @@ -2708,25 +2708,13 @@ const char *avcodec_license(void);
>
>  #if FF_API_NEXT
>  /**
> - * Register the codec codec and initialize libavcodec.
> - *
> - * @warning either this function or avcodec_register_all() must be called
> - * before any other libavcodec functions.
> - *
> - * @see avcodec_register_all()
> + * @deprecated Calling this function is unnecessary.
>   */
>  attribute_deprecated
>  void avcodec_register(AVCodec *codec);
>
>  /**
> - * Register all the codecs, parsers and bitstream filters which were enabled at
> - * configuration time. If you do not call this function you can select exactly
> - * which formats you want to support, by using the individual registration
> - * functions.
> - *
> - * @see avcodec_register
> - * @see av_register_codec_parser
> - * @see av_register_bitstream_filter
> + * @deprecated Calling this function is unnecessary.
>   */
>  attribute_deprecated
>  void avcodec_register_all(void);
> @@ -2843,7 +2831,6 @@ int avcodec_parameters_to_context(AVCodecContext *codec,
>   * @ref avcodec_receive_frame()).
>   *
>   * @code
> - * avcodec_register_all();
>   * av_dict_set(&opts, "b", "2.5M", 0);
>   * codec = avcodec_find_decoder(AV_CODEC_ID_H264);
>   * if (!codec)
> --
> 2.27.0
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
diff mbox series

Patch

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 309d9965be..46d31b34ad 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -2708,25 +2708,13 @@  const char *avcodec_license(void);
 
 #if FF_API_NEXT
 /**
- * Register the codec codec and initialize libavcodec.
- *
- * @warning either this function or avcodec_register_all() must be called
- * before any other libavcodec functions.
- *
- * @see avcodec_register_all()
+ * @deprecated Calling this function is unnecessary.
  */
 attribute_deprecated
 void avcodec_register(AVCodec *codec);
 
 /**
- * Register all the codecs, parsers and bitstream filters which were enabled at
- * configuration time. If you do not call this function you can select exactly
- * which formats you want to support, by using the individual registration
- * functions.
- *
- * @see avcodec_register
- * @see av_register_codec_parser
- * @see av_register_bitstream_filter
+ * @deprecated Calling this function is unnecessary.
  */
 attribute_deprecated
 void avcodec_register_all(void);
@@ -2843,7 +2831,6 @@  int avcodec_parameters_to_context(AVCodecContext *codec,
  * @ref avcodec_receive_frame()).
  *
  * @code
- * avcodec_register_all();
  * av_dict_set(&opts, "b", "2.5M", 0);
  * codec = avcodec_find_decoder(AV_CODEC_ID_H264);
  * if (!codec)