v4l2videodec: Fix handle_frame error handling
This commit is contained in:
parent
e70173e28a
commit
03ed348d95
@ -530,6 +530,9 @@ gst_v4l2_video_dec_handle_frame (GstVideoDecoder * decoder,
|
|||||||
if (ret == GST_FLOW_FLUSHING) {
|
if (ret == GST_FLOW_FLUSHING) {
|
||||||
if (g_atomic_int_get (&self->processing) == FALSE)
|
if (g_atomic_int_get (&self->processing) == FALSE)
|
||||||
ret = self->output_flow;
|
ret = self->output_flow;
|
||||||
|
goto drop;
|
||||||
|
} else if (ret != GST_FLOW_OK) {
|
||||||
|
goto process_failed;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* No need to keep input arround */
|
/* No need to keep input arround */
|
||||||
@ -551,13 +554,22 @@ activate_failed:
|
|||||||
GST_ELEMENT_ERROR (self, RESOURCE, SETTINGS,
|
GST_ELEMENT_ERROR (self, RESOURCE, SETTINGS,
|
||||||
(_("Failed to allocate required memory.")),
|
(_("Failed to allocate required memory.")),
|
||||||
("Buffer pool activation failed"));
|
("Buffer pool activation failed"));
|
||||||
return GST_FLOW_ERROR;
|
ret = GST_FLOW_ERROR;
|
||||||
|
goto drop;
|
||||||
}
|
}
|
||||||
flushing:
|
flushing:
|
||||||
{
|
{
|
||||||
ret = GST_FLOW_FLUSHING;
|
ret = GST_FLOW_FLUSHING;
|
||||||
goto drop;
|
goto drop;
|
||||||
}
|
}
|
||||||
|
process_failed:
|
||||||
|
{
|
||||||
|
GST_ELEMENT_ERROR (self, RESOURCE, FAILED,
|
||||||
|
(_("Failed to process frame.")),
|
||||||
|
("Maybe be due to not enough memory or failing driver"));
|
||||||
|
ret = GST_FLOW_ERROR;
|
||||||
|
goto drop;
|
||||||
|
}
|
||||||
drop:
|
drop:
|
||||||
{
|
{
|
||||||
gst_video_decoder_drop_frame (decoder, frame);
|
gst_video_decoder_drop_frame (decoder, frame);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user