mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
lavc/libvpxenc: prevent fifo from filling up
Prevent the fifo used in encoding VPx videos from filling up and
stopping encode when it reaches 21845 items, which happens when the
video has more than that number of frames.
Incorporated suggestion from James Zern to prevent calling
frame_data_submit() at all when performing the first pass of a 2-pass
encode so the fifo is not filled at all; replaces original patch which
drained the fifo after filling to prevent it from becoming full.
Fixes the regression originally introduced in
5bda4ec6c3
Co-authored-by: James Zern <jzern@google.com>
Signed-off-by: David Lemler <david@lemler.family>
Signed-off-by: James Zern <jzern@google.com>
This commit is contained in:
parent
374184a4dc
commit
357a863299
@ -1780,9 +1780,11 @@ static int vpx_encode(AVCodecContext *avctx, AVPacket *pkt,
|
||||
}
|
||||
}
|
||||
|
||||
res = frame_data_submit(avctx, ctx->fifo, frame);
|
||||
if (res < 0)
|
||||
return res;
|
||||
if (!(avctx->flags & AV_CODEC_FLAG_PASS1)) {
|
||||
res = frame_data_submit(avctx, ctx->fifo, frame);
|
||||
if (res < 0)
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
// this is for encoding with preset temporal layering patterns defined in
|
||||
|
Loading…
Reference in New Issue
Block a user