[FFmpeg-devel] [PATCH 2/2] avcodec/decode: Avoid ffcodec()

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Mon Jul 8 19:14:42 EEST 2024


Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
 libavcodec/decode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index cdb682cf69..187b5b6c85 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -1029,7 +1029,7 @@ enum AVPixelFormat avcodec_default_get_format(struct AVCodecContext *avctx,
 
     // If a device was supplied when the codec was opened, assume that the
     // user wants to use it.
-    if (avctx->hw_device_ctx && ffcodec(avctx->codec)->hw_configs) {
+    if (avctx->hw_device_ctx && codec->hw_configs) {
         AVHWDeviceContext *device_ctx =
             (AVHWDeviceContext*)avctx->hw_device_ctx->data;
         for (size_t i = 0; codec->hw_configs[i]; i++) {
-- 
2.40.1



More information about the ffmpeg-devel mailing list