mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 06:58:56 +00:00
jpeg: fix end-of-image (EOI) handler.
decode_current_picture() was converted to return a gboolean instead of a GstVaapiDecoderStatus, so we were not getting out of the decode loop as expected, or could cause an error instead. Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
This commit is contained in:
parent
1fb8f4791f
commit
f2741a88cc
1 changed files with 7 additions and 1 deletions
|
@ -540,7 +540,12 @@ decode_buffer(GstVaapiDecoderJpeg *decoder, GstBuffer *buffer)
|
||||||
status = GST_VAAPI_DECODER_STATUS_SUCCESS;
|
status = GST_VAAPI_DECODER_STATUS_SUCCESS;
|
||||||
break;
|
break;
|
||||||
case GST_JPEG_MARKER_EOI:
|
case GST_JPEG_MARKER_EOI:
|
||||||
status = decode_current_picture(decoder);
|
if (decode_current_picture(decoder)) {
|
||||||
|
/* Get out of the loop, trailing data is not needed */
|
||||||
|
status = GST_VAAPI_DECODER_STATUS_SUCCESS;
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
|
status = GST_VAAPI_DECODER_STATUS_ERROR_UNKNOWN;
|
||||||
break;
|
break;
|
||||||
case GST_JPEG_MARKER_DHT:
|
case GST_JPEG_MARKER_DHT:
|
||||||
status = decode_huffman_table(decoder, buf + seg.offset, seg.size);
|
status = decode_huffman_table(decoder, buf + seg.offset, seg.size);
|
||||||
|
@ -601,6 +606,7 @@ decode_buffer(GstVaapiDecoderJpeg *decoder, GstBuffer *buffer)
|
||||||
if (status != GST_VAAPI_DECODER_STATUS_SUCCESS)
|
if (status != GST_VAAPI_DECODER_STATUS_SUCCESS)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
end:
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue