Quoting Leo Izen (2022-04-12 07:53:32)
> +
> +    while (1) {
> +        jret = JxlEncoderProcessOutput(ctx->encoder, &next_out, &available);
> +        if (jret == JXL_ENC_ERROR) {
> +            av_log(avctx, AV_LOG_ERROR, "Unspecified libjxl error 
> occurred\n");
> +            return AVERROR_EXTERNAL;
> +        }
> +        bytes_written = ctx->buffer_size - available;
> +        /* all data passed has been encoded */
> +        if (jret == JXL_ENC_SUCCESS)
> +            break;
> +        if (jret == JXL_ENC_NEED_MORE_OUTPUT) {

Is it possible for the encoder to return anything other than the three
codes you're handling? Won't you get into an infinite loop if it does?

-- 
Anton Khirnov
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to