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
This commit is contained in:
Olivier Crete 2015-04-16 20:18:13 -04:00 committed by Víctor Manuel Jáquez Leal
parent bd86647970
commit 7e08786e1d

View file

@ -347,9 +347,9 @@ gst_vaapidecode_push_all_decoded_frames (GstVaapiDecode * decode)
case GST_VAAPI_DECODER_STATUS_ERROR_NO_DATA: case GST_VAAPI_DECODER_STATUS_ERROR_NO_DATA:
return GST_FLOW_OK; return GST_FLOW_OK;
default: default:
GST_ELEMENT_ERROR (vdec, STREAM, DECODE, ("Decoding failed"), GST_VIDEO_DECODER_ERROR (vdec, 1, STREAM, DECODE, ("Decoding failed"),
("Unknown decoding error")); ("Unknown decoding error"), ret);
return GST_FLOW_ERROR; return ret;
} }
} }
g_assert_not_reached (); g_assert_not_reached ();
@ -429,9 +429,8 @@ error_decode:
ret = GST_FLOW_NOT_SUPPORTED; ret = GST_FLOW_NOT_SUPPORTED;
break; break;
default: default:
GST_ELEMENT_ERROR (vdec, STREAM, DECODE, ("Decoding error"), GST_VIDEO_DECODER_ERROR (vdec, 1, STREAM, DECODE, ("Decoding error"),
("Decode error %d", status)); ("Decode error %d", status), ret);
ret = GST_FLOW_ERROR;
break; break;
} }
gst_video_decoder_drop_frame (vdec, frame); gst_video_decoder_drop_frame (vdec, frame);