androidmedia: fix hevc codec profile registration
authorThomas Schneider <thomas.schneider@voliro.ch>
Tue, 5 Sep 2023 12:15:04 +0000 (14:15 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 12 Sep 2023 17:27:44 +0000 (17:27 +0000)
Fix the codec registration logic such that all supported
profiles are available instead of just the first in the
list.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5313>

subprojects/gst-plugins-bad/sys/androidmedia/gstamc.c

index f72fd83..264e453 100644 (file)
@@ -2372,18 +2372,13 @@ gst_amc_codec_info_to_caps (const GstAmcCodecInfo * codec_info,
                   g_value_reset (&v);
 
                   encoded_ret = gst_caps_merge_structure (encoded_ret, tmp3);
-
                   have_profile_level = TRUE;
                 }
-              }
-
-              if (have_profile_level) {
                 gst_structure_free (tmp2);
               } else {
                 encoded_ret = gst_caps_merge_structure (encoded_ret, tmp2);
+                have_profile_level = TRUE;
               }
-
-              have_profile_level = TRUE;
             }
           }