From 7e08786e1d38bf98c3aba2ad6d3498f0dfca07d3 Mon Sep 17 00:00:00 2001 From: Olivier Crete Date: Thu, 16 Apr 2015 20:18:13 -0400 Subject: [PATCH] vaapidecode: Use the GstVideoDecoder error reporting function This way, the decoder won't stop on the first decoding error, in most cases it can recover after some glitchiness. https://bugzilla.gnome.org/show_bug.cgi?id=744620 --- gst/vaapi/gstvaapidecode.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/gst/vaapi/gstvaapidecode.c b/gst/vaapi/gstvaapidecode.c index 82b7b02925..685da6bbb0 100644 --- a/gst/vaapi/gstvaapidecode.c +++ b/gst/vaapi/gstvaapidecode.c @@ -347,9 +347,9 @@ gst_vaapidecode_push_all_decoded_frames (GstVaapiDecode * decode) case GST_VAAPI_DECODER_STATUS_ERROR_NO_DATA: return GST_FLOW_OK; default: - GST_ELEMENT_ERROR (vdec, STREAM, DECODE, ("Decoding failed"), - ("Unknown decoding error")); - return GST_FLOW_ERROR; + GST_VIDEO_DECODER_ERROR (vdec, 1, STREAM, DECODE, ("Decoding failed"), + ("Unknown decoding error"), ret); + return ret; } } g_assert_not_reached (); @@ -429,9 +429,8 @@ error_decode: ret = GST_FLOW_NOT_SUPPORTED; break; default: - GST_ELEMENT_ERROR (vdec, STREAM, DECODE, ("Decoding error"), - ("Decode error %d", status)); - ret = GST_FLOW_ERROR; + GST_VIDEO_DECODER_ERROR (vdec, 1, STREAM, DECODE, ("Decoding error"), + ("Decode error %d", status), ret); break; } gst_video_decoder_drop_frame (vdec, frame);