<meta http-equiv="content-type" content="text/html; charset=utf-8"><div>Hello,</div><div><br></div><div>After setting uri property of uridecodebin for the second time I get &quot;Internal data stream error&quot; right after calling play(), but it works fine with playbin2. What am I missing? There is my code example:</div>

<div><br></div><div>static GstElement *playbin;</div><div>#define USE_DECODEBIN</div><div><br></div><div>void init()</div><div>{</div><div>[..]</div><div>#ifdef USE_DECODEBIN</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>playbin = gst_parse_launch(&quot;uridecodebin name=my-decodebin ! autoaudiosink&quot;, NULL);</div>

<div>#else</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>playbin = gst_element_factory_make(&quot;playbin2&quot;, NULL);</div><div>#endif</div><div>[..]</div><div>}</div><div><br></div><div>void setMedia(char *file)</div>

<div>{</div><div>[..]</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>gchar *uri = g_filename_to_uri(file, NULL, NULL);</div><div>#ifdef USE_DECODEBIN</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>GstElement *decodebin = gst_bin_get_by_name(GST_BIN(playbin), &quot;my-decodebin&quot;);</div>

<div><span class="Apple-tab-span" style="white-space:pre">        </span>g_object_set(decodebin, &quot;uri&quot;, uri, NULL);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>gst_object_unref(decodebin);</div>

<div>#else</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>g_object_set(playbin, &quot;uri&quot;, uri, NULL);</div><div>#endif</div><div>[..]</div><div>}</div><div><br></div><div>void play()</div><div>

{</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>gst_element_set_state(playbin, GST_STATE_PLAYING);</div><div>}</div><div><br></div><div>void stop()</div><div>{</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>gst_element_set_state(playbin, GST_STATE_NULL);</div>

<div>}</div><div><br></div><div>void main()</div><div>{</div><div>[..]</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>init();</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>setMedia(&quot;1.mp3&quot;);</div>

<div><span class="Apple-tab-span" style="white-space:pre">        </span>play();</div><div>[..]</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>stop();</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>setMedia(&quot;2.mp3&quot;);</div>

<div><span class="Apple-tab-span" style="white-space:pre">        </span>play();</div><div>[..]</div><div>}</div><div><br></div><div>--</div><div>Sergey</div>