From 7f1baeb6a917e21d6fe46ac117b65e93a5704ecb Mon Sep 17 00:00:00 2001 From: raster Date: Fri, 15 May 2009 11:48:32 +0000 Subject: [PATCH] gstreamer fixes git-svn-id: http://svn.enlightenment.org/svn/e/trunk/emotion@40671 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/modules/gstreamer/emotion_gstreamer_pipeline.c | 9 ++++----- src/modules/gstreamer/emotion_gstreamer_pipeline_cdda.c | 2 +- src/modules/gstreamer/emotion_gstreamer_pipeline_dvd.c | 5 +++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/modules/gstreamer/emotion_gstreamer_pipeline.c b/src/modules/gstreamer/emotion_gstreamer_pipeline.c index e8f5bbf..4d3632a 100644 --- a/src/modules/gstreamer/emotion_gstreamer_pipeline.c +++ b/src/modules/gstreamer/emotion_gstreamer_pipeline.c @@ -97,7 +97,7 @@ file_new_decoded_pad_cb(GstElement *decodebin, vsink = (Emotion_Video_Sink *)calloc(1, sizeof(Emotion_Video_Sink)); if (!vsink) return; ev->video_sinks = eina_list_append(ev->video_sinks, vsink); - if (!eina_list_data_find(ev->video_sinks, vsink)) + if (eina_error_get()) { free(vsink); return; @@ -126,14 +126,13 @@ file_new_decoded_pad_cb(GstElement *decodebin, asink = (Emotion_Audio_Sink *)calloc(1, sizeof(Emotion_Audio_Sink)); if (!asink) return; ev->audio_sinks = eina_list_append(ev->audio_sinks, asink); - if (!eina_list_data_find(ev->audio_sinks, asink)) + if (eina_error_get()) { free(asink); return; } - for (index = 0; asink != eina_list_nth(ev->audio_sinks, index); index++) - ; + index = eina_list_count(ev->audio_sinks); asink->sink = emotion_audio_sink_create(ev, index); gst_bin_add(GST_BIN(ev->pipeline), asink->sink); audiopad = gst_element_get_pad(asink->sink, "sink"); @@ -155,7 +154,7 @@ emotion_video_sink_new(Emotion_Gstreamer_Video *ev) if (!vsink) return NULL; ev->video_sinks = eina_list_append(ev->video_sinks, vsink); - if (!eina_list_data_find(ev->video_sinks, vsink)) + if (eina_error_get()) { free(vsink); return NULL; diff --git a/src/modules/gstreamer/emotion_gstreamer_pipeline_cdda.c b/src/modules/gstreamer/emotion_gstreamer_pipeline_cdda.c index 655252a..b2f4736 100644 --- a/src/modules/gstreamer/emotion_gstreamer_pipeline_cdda.c +++ b/src/modules/gstreamer/emotion_gstreamer_pipeline_cdda.c @@ -108,7 +108,7 @@ _emotion_audio_sink_new(Emotion_Gstreamer_Video *ev) if (!asink) return NULL; ev->audio_sinks = eina_list_append(ev->audio_sinks, asink); - if (!eina_list_data_find(ev->audio_sinks, asink)) + if (eina_error_get()) { free(asink); return NULL; diff --git a/src/modules/gstreamer/emotion_gstreamer_pipeline_dvd.c b/src/modules/gstreamer/emotion_gstreamer_pipeline_dvd.c index ea8a6f2..48b9f00 100644 --- a/src/modules/gstreamer/emotion_gstreamer_pipeline_dvd.c +++ b/src/modules/gstreamer/emotion_gstreamer_pipeline_dvd.c @@ -101,6 +101,7 @@ emotion_pipeline_dvd_build(void *video, const char *device) GstCaps *sink_caps; asink = (Emotion_Audio_Sink *)eina_list_data_get(alist); + alist = eina_list_next(alist); sink_pad = gst_element_get_pad(gst_bin_get_by_name(GST_BIN(ev->pipeline), "a52dec"), "src"); sink_caps = gst_pad_get_caps(sink_pad); @@ -165,7 +166,7 @@ dvd_pad_added_cb(GstElement *dvddemuxer, vsink = (Emotion_Video_Sink *)malloc(sizeof(Emotion_Video_Sink)); if (!vsink) return; ev->video_sinks = eina_list_append(ev->video_sinks, vsink); - if (!eina_list_data_find(ev->video_sinks, vsink)) + if (eina_error_get()) { free(vsink); return; @@ -203,7 +204,7 @@ dvd_pad_added_cb(GstElement *dvddemuxer, asink = (Emotion_Audio_Sink *)malloc(sizeof(Emotion_Audio_Sink)); if (!asink) return; ev->audio_sinks = eina_list_append(ev->audio_sinks, asink); - if (!eina_list_data_find(ev->audio_sinks, asink)) + if (eina_error_get()) { free(asink); return; -- 2.7.4