mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
va: baseenc: No need to check the frame pointer in handle_frame().
No need to check the NULL pointer of "frame" in error handling, it is assured non-NULL by base class and we already use it everywhere in this function. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2471>
This commit is contained in:
parent
de5952bc83
commit
fc75e38496
1 changed files with 4 additions and 8 deletions
|
@ -564,20 +564,16 @@ error_new_frame:
|
|||
{
|
||||
GST_ELEMENT_ERROR (venc, STREAM, ENCODE,
|
||||
("Failed to create the input frame."), (NULL));
|
||||
if (frame) {
|
||||
gst_clear_buffer (&frame->output_buffer);
|
||||
gst_video_encoder_finish_frame (venc, frame);
|
||||
}
|
||||
gst_clear_buffer (&frame->output_buffer);
|
||||
gst_video_encoder_finish_frame (venc, frame);
|
||||
return GST_FLOW_ERROR;
|
||||
}
|
||||
error_reorder:
|
||||
{
|
||||
GST_ELEMENT_ERROR (venc, STREAM, ENCODE,
|
||||
("Failed to reorder the input frame."), (NULL));
|
||||
if (frame) {
|
||||
gst_clear_buffer (&frame->output_buffer);
|
||||
gst_video_encoder_finish_frame (venc, frame);
|
||||
}
|
||||
gst_clear_buffer (&frame->output_buffer);
|
||||
gst_video_encoder_finish_frame (venc, frame);
|
||||
return GST_FLOW_ERROR;
|
||||
}
|
||||
error_encode:
|
||||
|
|
Loading…
Reference in a new issue