mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-11 08:13:06 +00:00
avcodec/lcevcdec: poll on LCEVC_Again from LCEVC_ReceiveDecoderPicture
The V-Nova LCEVC pipeline processes frames on internal background worker threads. LCEVC_ReceiveDecoderPicture returns LCEVC_Again (-1) when the worker has not yet completed the frame, which is the documented "not ready, try again" response. The original code treated any non-zero return as a fatal error (AVERROR_EXTERNAL), causing decode to abort mid-stream. Poll until LCEVC_Success or a genuine error is returned. Signed-off-by: Peter von Kaenel <Peter.vonKaenel@harmonicinc.com> Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
committed by
James Almer
co-authored by
James Almer
parent
9ab37ef918
commit
d013863f00
@@ -199,7 +199,9 @@ static int generate_output(void *logctx, FFLCEVCFrame *frame_ctx, AVFrame *out)
|
||||
LCEVC_PictureHandle picture;
|
||||
LCEVC_ReturnCode res;
|
||||
|
||||
res = LCEVC_ReceiveDecoderPicture(lcevc->decoder, &picture, &info);
|
||||
do {
|
||||
res = LCEVC_ReceiveDecoderPicture(lcevc->decoder, &picture, &info);
|
||||
} while (res == LCEVC_Again);
|
||||
if (res != LCEVC_Success)
|
||||
return AVERROR_EXTERNAL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user