[longomatch] Don't expose the audio branch if the current item playback rate is not 1x
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Don't expose the audio branch if the current item playback rate is not 1x
- Date: Sat, 7 Feb 2015 10:12:44 +0000 (UTC)
commit 58ea3b4cead25fde5a58b7342165b047520a44c6
Author: Julien Moutte <julien fluendo com>
Date: Fri Feb 6 16:42:33 2015 +0100
Don't expose the audio branch if the current item playback rate is not 1x
libcesarplayer/gst-nle-source.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/libcesarplayer/gst-nle-source.c b/libcesarplayer/gst-nle-source.c
index 3b8541c..0bb4d53 100644
--- a/libcesarplayer/gst-nle-source.c
+++ b/libcesarplayer/gst-nle-source.c
@@ -516,6 +516,9 @@ gst_nle_source_pad_added_cb (GstElement * element, GstPad * pad,
GstElement *appsink = NULL;
GstPad *sink_pad;
GstAppSinkCallbacks appsink_cbs;
+ GstNleSrcItem *item;
+
+ item = (GstNleSrcItem *) g_list_nth_data (nlesrc->queue, nlesrc->index);
caps = gst_pad_get_caps_reffed (pad);
s = gst_caps_get_structure (caps, 0);
@@ -538,7 +541,7 @@ gst_nle_source_pad_added_cb (GstElement * element, GstPad * pad,
(GCallback) gst_nle_source_video_pad_probe_cb, nlesrc);
nlesrc->video_eos = FALSE;
} else if (g_strrstr (mime, "audio") && nlesrc->with_audio
- && !nlesrc->audio_linked) {
+ && !nlesrc->audio_linked && (item ? item->rate == 1.0 : TRUE)) {
appsink = gst_element_factory_make ("appsink", NULL);
memset (&appsink_cbs, 0, sizeof (appsink_cbs));
appsink_cbs.eos = gst_nle_source_on_audio_eos;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]