You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
avcodec/ffv1enc: avoid repeating the same warning forever
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
committed by
Michael Niedermayer
parent
c818c67991
commit
0c28059b81
@ -151,6 +151,7 @@ typedef struct FFV1Context {
|
|||||||
int flt;
|
int flt;
|
||||||
int remap_mode;
|
int remap_mode;
|
||||||
int remap_optimizer;
|
int remap_optimizer;
|
||||||
|
int maxsize_warned;
|
||||||
|
|
||||||
int use32bit;
|
int use32bit;
|
||||||
|
|
||||||
|
@ -1749,7 +1749,11 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
|||||||
maxsize = ff_ffv1_encode_buffer_size(avctx);
|
maxsize = ff_ffv1_encode_buffer_size(avctx);
|
||||||
|
|
||||||
if (maxsize > INT_MAX - AV_INPUT_BUFFER_PADDING_SIZE - 32) {
|
if (maxsize > INT_MAX - AV_INPUT_BUFFER_PADDING_SIZE - 32) {
|
||||||
av_log(avctx, AV_LOG_WARNING, "Cannot allocate worst case packet size, the encoding could fail\n");
|
FFV1Context *f = avctx->priv_data;
|
||||||
|
if (!f->maxsize_warned) {
|
||||||
|
av_log(avctx, AV_LOG_WARNING, "Cannot allocate worst case packet size, the encoding could fail\n");
|
||||||
|
f->maxsize_warned++;
|
||||||
|
}
|
||||||
maxsize = INT_MAX - AV_INPUT_BUFFER_PADDING_SIZE - 32;
|
maxsize = INT_MAX - AV_INPUT_BUFFER_PADDING_SIZE - 32;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user