mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-01-12 00:06:51 +08:00
avcodec/amfdec: Check correct value, return error upon error
Found via an unused-variable warning from GCC.
Also just forward the error from amf_init_frames_context().
This bug has been introduced in
4479d28103.
Reviewed-by: Jan Ekström <jeebjp@gmail.com>
Reviewed-by: Mikhail Mironov <mikhail.mironov@amd.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -644,9 +644,8 @@ static int amf_decode_frame(AVCodecContext *avctx, struct AVFrame *frame)
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
int ret = amf_init_frames_context(avctx, av_amf_to_av_format(format_var.int64Value), avctx->coded_width, avctx->coded_height);
|
||||
|
||||
if (res < 0)
|
||||
return AVERROR(EINVAL);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}else
|
||||
return AVERROR_EOF;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user