wavparse: Modify GST_RIFF_TAG_acid tag's byte-align bug for appsrc push mode(streaming)
authorGilbok Lee <gilbok.lee@samsung.com>
Mon, 28 Dec 2015 06:03:22 +0000 (15:03 +0900)
committerGilbok Lee <gilbok.lee@samsung.com>
Mon, 28 Dec 2015 06:03:25 +0000 (15:03 +0900)
Sync with tizen 2.4 fixed code (http://165.213.149.170/gerrit/#/c/34063)

Change-Id: Ic982954d517586a7473fdd48b58c449b83ae1c1e
Signed-off-by: Gilbok Lee <gilbok.lee@samsung.com>
gst/wavparse/gstwavparse.c
packaging/gst-plugins-good.spec

index b0e3423..0c035cd 100644 (file)
@@ -1375,6 +1375,9 @@ gst_wavparse_stream_headers (GstWavParse * wav)
         const gst_riff_acid *acid = NULL;
         const guint data_size = sizeof (gst_riff_acid);
         gfloat tempo;
+#ifdef GST_EXT_WAVPARSE_MODIFICATION
+        const guint8 *data = NULL;
+#endif
 
         GST_INFO_OBJECT (wav, "Have acid chunk");
         if (size < data_size) {
@@ -1391,9 +1394,17 @@ gst_wavparse_stream_headers (GstWavParse * wav)
             goto exit;
           }
           gst_adapter_flush (wav->adapter, 8);
+#ifdef GST_EXT_WAVPARSE_MODIFICATION
+          if (gst_adapter_available (wav->adapter) < 24) {
+            goto exit;
+          }
+          data = gst_adapter_map (wav->adapter, 24);
+          tempo = GST_READ_FLOAT_LE (data + 20);
+#else
           acid = (const gst_riff_acid *) gst_adapter_map (wav->adapter,
               data_size);
           tempo = acid->tempo;
+#endif
           gst_adapter_unmap (wav->adapter);
         } else {
           GstMapInfo map;
index 121c736..62fd386 100644 (file)
@@ -73,7 +73,8 @@ This package provides complementary plugins for
 # warning: failed to load external entity "xml/plugin-video4linux2.xml"
 export V=1
 NOCONFIGURE=1 ./autogen.sh
-export CFLAGS+=" -DGST_EXT_V4L2SRC_MODIFIED"
+export CFLAGS+=" -DGST_EXT_V4L2SRC_MODIFIED\
+               -DGST_EXT_WAVPARSE_MODIFICATION"
 %configure\
 %if ! 0%{?ENABLE_AALIB}
        --disable-aalib\