From 31329727eb0f4520e53b6aa331d1b1c26f8cd22b Mon Sep 17 00:00:00 2001 From: Gilbok Lee Date: Mon, 28 Dec 2015 15:03:22 +0900 Subject: [PATCH] wavparse: Modify GST_RIFF_TAG_acid tag's byte-align bug for appsrc push mode(streaming) Sync with tizen 2.4 fixed code (http://165.213.149.170/gerrit/#/c/34063) Change-Id: Ic982954d517586a7473fdd48b58c449b83ae1c1e Signed-off-by: Gilbok Lee --- gst/wavparse/gstwavparse.c | 11 +++++++++++ packaging/gst-plugins-good.spec | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/gst/wavparse/gstwavparse.c b/gst/wavparse/gstwavparse.c index b0e3423..0c035cd 100644 --- a/gst/wavparse/gstwavparse.c +++ b/gst/wavparse/gstwavparse.c @@ -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; diff --git a/packaging/gst-plugins-good.spec b/packaging/gst-plugins-good.spec index 121c736..62fd386 100644 --- a/packaging/gst-plugins-good.spec +++ b/packaging/gst-plugins-good.spec @@ -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\ -- 2.7.4