Remove channel and rate from creating caps to generate correct caps for RAW format 75/202475/4 submit/tizen/20190401.045827
authorHyunil <hyunil46.park@samsung.com>
Fri, 29 Mar 2019 04:23:31 +0000 (13:23 +0900)
committerHyunil <hyunil46.park@samsung.com>
Mon, 1 Apr 2019 04:42:01 +0000 (13:42 +0900)
Change-Id: I3180f026c1e44626694b849ba1d63c04830cec33
Signed-off-by: Hyunil <hyunil46.park@samsung.com>
src/media_streamer_gst.c

index 3c98be4..63e5999 100644 (file)
@@ -2285,10 +2285,9 @@ GstCaps *__ms_create_caps_from_fmt(media_format_h fmt)
        ms_debug_fenter();
 
        if (!media_format_get_audio_info(fmt, &mime, &channel, &samplerate, &bit, &avg_bps)) {
-               if (MEDIA_FORMAT_RAW == (mime & MEDIA_FORMAT_RAW))
-                       caps = gst_caps_new_simple("audio/x-raw", "channels", G_TYPE_INT, channel, "format",
-                                                               G_TYPE_STRING, __ms_convert_mime_to_string_format(mime), "rate", G_TYPE_INT, samplerate, NULL);
-               else if (MEDIA_FORMAT_ENCODED == (mime & MEDIA_FORMAT_ENCODED)) {
+               if (MEDIA_FORMAT_RAW == (mime & MEDIA_FORMAT_RAW)) {
+                       caps = gst_caps_new_simple("audio/x-raw", "format", G_TYPE_STRING, __ms_convert_mime_to_string_format(mime), NULL);
+               } else if (MEDIA_FORMAT_ENCODED == (mime & MEDIA_FORMAT_ENCODED)) {
                        if (mime == MEDIA_FORMAT_AAC)
                                caps = gst_caps_new_simple(__ms_convert_mime_to_string_format(mime), "mpegversion", G_TYPE_INT, 4, NULL);
                        else if (mime == MEDIA_FORMAT_MP3)