mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
v4l2slh264dec: Remove double return in submit_bitstream()
This is code cleanup, no functional changes. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1395>
This commit is contained in:
parent
1f48e60bde
commit
176a860169
1 changed files with 10 additions and 10 deletions
|
@ -900,6 +900,7 @@ gst_v4l2_codec_h264_dec_submit_bitstream (GstV4l2CodecH264Dec * self,
|
||||||
GstBuffer *buffer;
|
GstBuffer *buffer;
|
||||||
GstFlowReturn flow_ret;
|
GstFlowReturn flow_ret;
|
||||||
gsize bytesused;
|
gsize bytesused;
|
||||||
|
gboolean ret = FALSE;
|
||||||
|
|
||||||
/* *INDENT-OFF* */
|
/* *INDENT-OFF* */
|
||||||
struct v4l2_ext_control control[] = {
|
struct v4l2_ext_control control[] = {
|
||||||
|
@ -936,7 +937,7 @@ gst_v4l2_codec_h264_dec_submit_bitstream (GstV4l2CodecH264Dec * self,
|
||||||
if (!request) {
|
if (!request) {
|
||||||
GST_ELEMENT_ERROR (self, RESOURCE, NO_SPACE_LEFT,
|
GST_ELEMENT_ERROR (self, RESOURCE, NO_SPACE_LEFT,
|
||||||
("Failed to allocate a media request object."), (NULL));
|
("Failed to allocate a media request object."), (NULL));
|
||||||
goto fail;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_h264_picture_set_user_data (picture, request,
|
gst_h264_picture_set_user_data (picture, request,
|
||||||
|
@ -950,7 +951,7 @@ gst_v4l2_codec_h264_dec_submit_bitstream (GstV4l2CodecH264Dec * self,
|
||||||
else
|
else
|
||||||
GST_ELEMENT_ERROR (self, RESOURCE, WRITE,
|
GST_ELEMENT_ERROR (self, RESOURCE, WRITE,
|
||||||
("No more picture buffer available."), (NULL));
|
("No more picture buffer available."), (NULL));
|
||||||
goto fail;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
frame = gst_video_decoder_get_frame (GST_VIDEO_DECODER (self),
|
frame = gst_video_decoder_get_frame (GST_VIDEO_DECODER (self),
|
||||||
|
@ -964,7 +965,7 @@ gst_v4l2_codec_h264_dec_submit_bitstream (GstV4l2CodecH264Dec * self,
|
||||||
G_N_ELEMENTS (control))) {
|
G_N_ELEMENTS (control))) {
|
||||||
GST_ELEMENT_ERROR (self, RESOURCE, WRITE,
|
GST_ELEMENT_ERROR (self, RESOURCE, WRITE,
|
||||||
("Driver did not accept the bitstream parameters."), (NULL));
|
("Driver did not accept the bitstream parameters."), (NULL));
|
||||||
goto fail;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
bytesused = self->bitstream_map.size;
|
bytesused = self->bitstream_map.size;
|
||||||
|
@ -975,28 +976,27 @@ gst_v4l2_codec_h264_dec_submit_bitstream (GstV4l2CodecH264Dec * self,
|
||||||
picture->system_frame_number, bytesused, flags)) {
|
picture->system_frame_number, bytesused, flags)) {
|
||||||
GST_ELEMENT_ERROR (self, RESOURCE, WRITE,
|
GST_ELEMENT_ERROR (self, RESOURCE, WRITE,
|
||||||
("Driver did not accept the bitstream data."), (NULL));
|
("Driver did not accept the bitstream data."), (NULL));
|
||||||
goto fail;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!gst_v4l2_decoder_queue_src_buffer (self->decoder, buffer,
|
if (!gst_v4l2_decoder_queue_src_buffer (self->decoder, buffer,
|
||||||
picture->system_frame_number)) {
|
picture->system_frame_number)) {
|
||||||
GST_ELEMENT_ERROR (self, RESOURCE, WRITE,
|
GST_ELEMENT_ERROR (self, RESOURCE, WRITE,
|
||||||
("Driver did not accept the picture buffer."), (NULL));
|
("Driver did not accept the picture buffer."), (NULL));
|
||||||
goto fail;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!gst_v4l2_request_queue (request)) {
|
if (!gst_v4l2_request_queue (request)) {
|
||||||
GST_ELEMENT_ERROR (self, RESOURCE, WRITE,
|
GST_ELEMENT_ERROR (self, RESOURCE, WRITE,
|
||||||
("Driver did not accept the decode request."), (NULL));
|
("Driver did not accept the decode request."), (NULL));
|
||||||
goto fail;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_v4l2_codec_h264_dec_reset_picture (self);
|
ret = TRUE;
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
fail:
|
done:
|
||||||
gst_v4l2_codec_h264_dec_reset_picture (self);
|
gst_v4l2_codec_h264_dec_reset_picture (self);
|
||||||
return FALSE;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
|
Loading…
Reference in a new issue