mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
amc/videodec: only retrieve the stride/slice-height for raw output
When outputting to a surface, these values may not exist. As found on a Google Pixel 3. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1284>
This commit is contained in:
parent
3f16353d64
commit
8403d97587
1 changed files with 8 additions and 8 deletions
|
@ -758,14 +758,6 @@ gst_amc_video_dec_set_src_caps (GstAmcVideoDec * self, GstAmcFormat * format)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
if (!gst_amc_format_get_int (format, "stride", &stride, &err) ||
|
||||
!gst_amc_format_get_int (format, "slice-height", &slice_height, &err)) {
|
||||
GST_ERROR_OBJECT (self, "Failed to get stride and slice-height: %s",
|
||||
err->message);
|
||||
g_clear_error (&err);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (gst_amc_format_get_int (format, "crop-left", &crop_left, NULL) &&
|
||||
gst_amc_format_get_int (format, "crop-right", &crop_right, NULL)) {
|
||||
width = crop_right + 1 - crop_left;
|
||||
|
@ -835,6 +827,14 @@ gst_amc_video_dec_set_src_caps (GstAmcVideoDec * self, GstAmcFormat * format)
|
|||
goto out;
|
||||
}
|
||||
|
||||
if (!gst_amc_format_get_int (format, "stride", &stride, &err) ||
|
||||
!gst_amc_format_get_int (format, "slice-height", &slice_height, &err)) {
|
||||
GST_ERROR_OBJECT (self, "Failed to get stride and slice-height: %s",
|
||||
err->message);
|
||||
g_clear_error (&err);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
self->format = gst_format;
|
||||
self->width = width;
|
||||
self->height = height;
|
||||
|
|
Loading…
Reference in a new issue