mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-04-05 04:04:40 +00:00
vcomp/jpegxs: when send fail, release the buffer
The error triggered <https://github.com/CESNET/UltraGrid/issues/492> causes freeze on svt_jpeg_xs_frame_pool_get(). It doesn't work, anyways - perhaps incorrect handling in SVT-JPEG-XS. At least when `enc_input.image.ready_to_release` is not set to 1, current impl of svt_jpeg_xs_frame_pool_release() doesn't release anything. But even if set to 1, it still doesn't help. So at least fixing our use and hopefully it will get also fixed upstram. This shouldn't happen, anyways, unless passwdd wrong parameters as in the #492.
This commit is contained in:
@@ -210,6 +210,8 @@ static void jpegxs_worker_send(state_video_compress_jpegxs *s) {
|
||||
err = svt_jpeg_xs_encoder_send_picture(&s->encoder, &enc_input, /*blocking*/ 1);
|
||||
if (err != SvtJxsErrorNone) {
|
||||
print_svt_jxs_error(err, "Failed to send frame to encoder");
|
||||
free(enc_input.user_prv_ctx_ptr);
|
||||
svt_jpeg_xs_frame_pool_release(s->frame_pool, &enc_input);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user