omxvideodec: earlier return if downstream_flow_ret is not OK

There is no point to (re)start the src thread if, for example, we are
flushing.

https://bugzilla.gnome.org/show_bug.cgi?id=785967
This commit is contained in:
Guillaume Desmottes 2017-07-25 14:07:30 +02:00 committed by Nicolas Dufresne
parent 352184dd09
commit 7916bd53ab

View file

@ -2394,6 +2394,11 @@ gst_omx_video_dec_handle_frame (GstVideoDecoder * decoder,
GST_DEBUG_OBJECT (self, "Handling frame");
if (self->downstream_flow_ret != GST_FLOW_OK) {
gst_video_codec_frame_unref (frame);
return self->downstream_flow_ret;
}
if (!self->started) {
if (!GST_VIDEO_CODEC_FRAME_IS_SYNC_POINT (frame)) {
gst_video_decoder_drop_frame (GST_VIDEO_DECODER (self), frame);
@ -2407,11 +2412,6 @@ gst_omx_video_dec_handle_frame (GstVideoDecoder * decoder,
timestamp = frame->pts;
duration = frame->duration;
if (self->downstream_flow_ret != GST_FLOW_OK) {
gst_video_codec_frame_unref (frame);
return self->downstream_flow_ret;
}
if (klass->prepare_frame) {
GstFlowReturn ret;