[FFmpeg-cvslog] avcodec/decode: reduce scope of a variable in ff_decode_frame_props()

James Almer git at videolan.org
Sat Sep 30 17:15:04 EEST 2023


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Sat Sep 30 11:14:32 2023 -0300| [5ba06ad0b87740080a7bc7ddf58c5a65c24c9262] | committer: James Almer

avcodec/decode: reduce scope of a variable in ff_decode_frame_props()

Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5ba06ad0b87740080a7bc7ddf58c5a65c24c9262
---

 libavcodec/decode.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index 466c393c1e..e708d74cbf 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -1476,10 +1476,11 @@ FF_ENABLE_DEPRECATION_WARNINGS
 
 int ff_decode_frame_props(AVCodecContext *avctx, AVFrame *frame)
 {
-    const AVPacket *pkt = avctx->internal->last_pkt_props;
     int ret;
 
     if (!(ffcodec(avctx->codec)->caps_internal & FF_CODEC_CAP_SETS_FRAME_PROPS)) {
+        const AVPacket *pkt = avctx->internal->last_pkt_props;
+
         ret = ff_decode_frame_props_from_pkt(avctx, frame, pkt);
         if (ret < 0)
             return ret;



More information about the ffmpeg-cvslog mailing list