mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
androidmedia: Don't query supported color formats for non-video codecs
This commit is contained in:
parent
95dd8d9662
commit
90c4a6ecd0
1 changed files with 39 additions and 38 deletions
|
@ -1605,10 +1605,8 @@ scan_codecs (GstPlugin * plugin)
|
|||
const gchar *supported_type_str = NULL;
|
||||
jobject capabilities = NULL;
|
||||
jclass capabilities_class = NULL;
|
||||
jfieldID color_formats_id, profile_levels_id;
|
||||
jobject color_formats = NULL;
|
||||
jfieldID profile_levels_id, color_formats_id;
|
||||
jobject profile_levels = NULL;
|
||||
jint *color_formats_elems = NULL;
|
||||
jsize n_elems, k;
|
||||
|
||||
gst_codec_type = &gst_codec_info->supported_types[j];
|
||||
|
@ -1668,6 +1666,10 @@ scan_codecs (GstPlugin * plugin)
|
|||
goto next_supported_type;
|
||||
}
|
||||
|
||||
if (g_str_has_prefix (gst_codec_type->mime, "video/")) {
|
||||
jobject color_formats = NULL;
|
||||
jint *color_formats_elems = NULL;
|
||||
|
||||
color_formats =
|
||||
(*env)->GetObjectField (env, capabilities, color_formats_id);
|
||||
if ((*env)->ExceptionCheck (env)) {
|
||||
|
@ -1703,7 +1705,6 @@ scan_codecs (GstPlugin * plugin)
|
|||
gst_codec_type->color_formats[k] = color_formats_elems[k];
|
||||
}
|
||||
|
||||
if (g_str_has_prefix (gst_codec_type->mime, "video/")) {
|
||||
if (!n_elems) {
|
||||
GST_ERROR ("No supported color formats for video codec");
|
||||
valid_codec = FALSE;
|
||||
|
|
Loading…
Reference in a new issue