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:
Peter von Kaenel
2026-04-16 17:19:28 -03:00
committed by James Almer
co-authored by James Almer
parent 9ab37ef918
commit d013863f00
+3 -1
View File
@@ -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;