mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-04 22:48:49 +00:00
libs: encoder: h264: simplify the view-ids setting
This commit is contained in:
parent
6404bd399d
commit
7dc77ebf60
1 changed files with 26 additions and 26 deletions
|
@ -3441,11 +3441,11 @@ static void
|
|||
set_view_ids (GstVaapiEncoderH264 * const encoder, const GValue * value)
|
||||
{
|
||||
guint i, j;
|
||||
gboolean use_default = TRUE;
|
||||
guint len = gst_value_array_get_size (value);
|
||||
|
||||
/* Try the user set view IDs */
|
||||
if (len > 0) {
|
||||
if (len == 0)
|
||||
goto set_default_ids;
|
||||
|
||||
if (len != encoder->num_views) {
|
||||
GST_WARNING ("The view number is %d, but %d view IDs are provided. Just "
|
||||
"fallback to use default view IDs.", encoder->num_views, len);
|
||||
|
@ -3468,14 +3468,14 @@ set_view_ids (GstVaapiEncoderH264 * const encoder, const GValue * value)
|
|||
}
|
||||
}
|
||||
|
||||
use_default = FALSE;
|
||||
}
|
||||
return;
|
||||
|
||||
set_default_ids:
|
||||
if (use_default)
|
||||
{
|
||||
for (i = 0; i < encoder->num_views; i++)
|
||||
encoder->view_ids[i] = i;
|
||||
}
|
||||
}
|
||||
|
||||
static GstVaapiEncoderStatus
|
||||
gst_vaapi_encoder_h264_set_property (GstVaapiEncoder * base_encoder,
|
||||
|
|
Loading…
Reference in a new issue