mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-02-04 14:30:55 +08:00
avcodec/cri: Factor read_len out
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit d9bf3c141b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -220,10 +220,11 @@ static int cri_decode_frame(AVCodecContext *avctx, AVFrame *p,
|
||||
if (bytestream2_get_le32(gb) != 0)
|
||||
return AVERROR_INVALIDDATA;
|
||||
break;
|
||||
case 102:
|
||||
bytestream2_get_buffer(gb, codec_name, FFMIN(length, sizeof(codec_name) - 1));
|
||||
length -= FFMIN(length, sizeof(codec_name) - 1);
|
||||
if (strncmp(codec_name, "cintel_craw", FFMIN(length, sizeof(codec_name) - 1)))
|
||||
case 102:;
|
||||
int read_len = FFMIN(length, sizeof(codec_name) - 1);
|
||||
bytestream2_get_buffer(gb, codec_name, read_len))
|
||||
length -= read_len;
|
||||
if (strncmp(codec_name, "cintel_craw", read_len))
|
||||
return AVERROR_INVALIDDATA;
|
||||
compressed = 1;
|
||||
goto skip;
|
||||
|
||||
Reference in New Issue
Block a user