You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
avcodec/cri: Factor read_len out
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
committed by
michaelni
parent
610d368d9b
commit
d9bf3c141b
@ -218,10 +218,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