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

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2023-09-30 11:14:32 -03:00
parent ead1426a68
commit 5ba06ad0b8

View file

@ -1476,10 +1476,11 @@ FF_ENABLE_DEPRECATION_WARNINGS
int ff_decode_frame_props(AVCodecContext *avctx, AVFrame *frame) int ff_decode_frame_props(AVCodecContext *avctx, AVFrame *frame)
{ {
const AVPacket *pkt = avctx->internal->last_pkt_props;
int ret; int ret;
if (!(ffcodec(avctx->codec)->caps_internal & FF_CODEC_CAP_SETS_FRAME_PROPS)) { 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); ret = ff_decode_frame_props_from_pkt(avctx, frame, pkt);
if (ret < 0) if (ret < 0)
return ret; return ret;