avcodec/ffv1enc: avoid repeating the same warning forever
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
c818c67991
commit
0c28059b81
2 changed files with 6 additions and 1 deletions
|
|
@ -151,6 +151,7 @@ typedef struct FFV1Context {
|
|||
int flt;
|
||||
int remap_mode;
|
||||
int remap_optimizer;
|
||||
int maxsize_warned;
|
||||
|
||||
int use32bit;
|
||||
|
||||
|
|
|
|||
|
|
@ -1749,7 +1749,11 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
|||
maxsize = ff_ffv1_encode_buffer_size(avctx);
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue