diff mbox series

[FFmpeg-devel,1/7] avcodec/options: Fix AVClassCategory of decoders with .receive_frame

Message ID AS1PR01MB9564689747476370E572CE338F1F9@AS1PR01MB9564.eurprd01.prod.exchangelabs.com
State Accepted
Commit 1c3c29d07d7e0b7f5bec13cb0214f90e26604aee
Headers show
Series [FFmpeg-devel,1/7] avcodec/options: Fix AVClassCategory of decoders with .receive_frame | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished

Commit Message

Andreas Rheinhardt March 30, 2022, 10:28 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/options.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andreas Rheinhardt April 5, 2022, 2:31 p.m. UTC | #1
Andreas Rheinhardt:
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
>  libavcodec/options.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/options.c b/libavcodec/options.c
> index 91ab994994..2e05d29e1e 100644
> --- a/libavcodec/options.c
> +++ b/libavcodec/options.c
> @@ -68,7 +68,7 @@ static const AVClass *codec_child_class_iterate(void **iter)
>  static AVClassCategory get_category(void *ptr)
>  {
>      AVCodecContext* avctx = ptr;
> -    if (avctx->codec && ffcodec(avctx->codec)->decode)
> +    if (avctx->codec && av_codec_is_decoder(avctx->codec))
>          return AV_CLASS_CATEGORY_DECODER;
>      else
>          return AV_CLASS_CATEGORY_ENCODER;

Will apply the first five patches of this patchset tonight unless there
are objections.

- Andreas
diff mbox series

Patch

diff --git a/libavcodec/options.c b/libavcodec/options.c
index 91ab994994..2e05d29e1e 100644
--- a/libavcodec/options.c
+++ b/libavcodec/options.c
@@ -68,7 +68,7 @@  static const AVClass *codec_child_class_iterate(void **iter)
 static AVClassCategory get_category(void *ptr)
 {
     AVCodecContext* avctx = ptr;
-    if (avctx->codec && ffcodec(avctx->codec)->decode)
+    if (avctx->codec && av_codec_is_decoder(avctx->codec))
         return AV_CLASS_CATEGORY_DECODER;
     else
         return AV_CLASS_CATEGORY_ENCODER;