<div>Dear All,</div>
<div> </div>
<div>I am using the following pipeline with gstreamer version 0.10.22 and latest plugins.</div>
<div> </div>
<div>gst-launch filesrc location=/home/testh263.3gp ! qtdemux name=demux demux.audio_00 ! queue ! amrdecoder ! navtest ! alsasink demux.video ! queue ! h263decoder ! v4l2sink</div>
<div> </div>
<div>where navtest is a simple plugin which allows user to PLAY/PAUSE/SEEK.</div>
<div> </div>
<div>Overall the pipeline is as follows from application point of view.</div>
<div> </div>
<div>                                 |----------&gt; queue ---&gt; amrdecoder ---&gt;alsasink</div>
<div>filesrc---&gt;qtdemux   ----|</div>
<div>                                 |-----------&gt;queue----&gt;h263decoder---&gt;v4l2sink</div>
<div> </div>
<div>Where I am using the open source alsasink and custom decoders. When I try to set the pipeline to PAUSED state, some times (1 out of 10 times) all the components can transition to PAUSED state, but alsasink sends a ASYNC notification, but never commits to paused state. (As the part log below shows the same.I have enabled only basesink logs)</div>

<div> </div>
<div> </div>
<div>--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</div>
<div>
<div class="Section1">
<p class="MsoNormal"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">0:02:07.538391114   865    0xcfdd0 DEBUG             basesink /home/root/x2//middleware/multimedia-framework/media-service/gstreamer/gstreamer-0.10.22/./libs/gst/base/gstbasesink.c:2911:gst_base_sink_chain_unlocked:&lt;avsysvideosink0&gt; got times start: 0:00:23.648648648, end: 0:00:23.690357023</span></font></p>

<p class="MsoNormal"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">0:02:07.538726807   865    0xcfdd0 DEBUG             basesink /home/root/x2//middleware/multimedia-framework/media-service/gstreamer/gstreamer-0.10.22/./libs/gst/base/gstbasesink.c:1534:gst_base_sink_get_sync_times:&lt;avsysvideosink0&gt; got times start: 0:00:23.648648648, stop: 0:00:23.690357023, do_sync 1</span></font></p>

<p class="MsoNormal"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">0:02:07.538970948   865    0xcfdd0 DEBUG             basesink /home/root/x2//middleware/multimedia-framework/media-service/gstreamer/gstreamer-0.10.22/./libs/gst/base/gstbasesink.c:1984:gst_base_sink_do_sync:&lt;avsysvideosink0&gt; possibly waiting for clock to reach 0:00:23.648648648, adjusted 0:00:23.648648648</span></font></p>

<p class="MsoNormal"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">0:02:07.590026856   865    0xcfe80 DEBUG             basesink /home/root/x2//middleware/multimedia-framework/media-service/gstreamer/gstreamer-0.10.22/./libs/gst/base/gstbasesink.c:4099:gst_base_sink_change_state:&lt;avsysvideosink0&gt; PLAYING to PAUSED</span></font></p>

<p class="MsoNormal"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">0:02:07.611236573   865    0xcfe80 DEBUG             basesink /home/root/x2//middleware/multimedia-framework/media-service/gstreamer/gstreamer-0.10.22/./libs/gst/base/gstbasesink.c:2846:gst_base_sink_needs_preroll:&lt;avsysvideosink0&gt; have_preroll: 0, EOS: 0 =&gt; needs preroll: 1</span></font></p>

<p class="MsoNormal"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">0:02:07.611511231   865    0xcfe80 DEBUG             basesink /home/root/x2//middleware/multimedia-framework/media-service/gstreamer/gstreamer-0.10.22/./libs/gst/base/gstbasesink.c:4131:gst_base_sink_change_state:&lt;avsysvideosink0&gt; PLAYING to PAUSED, we are not prerolled</span></font></p>

<p class="MsoNormal"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">0:02:07.611694336   865    0xcfe80 DEBUG             basesink /home/root/x2//middleware/multimedia-framework/media-service/gstreamer/gstreamer-0.10.22/./libs/gst/base/gstbasesink.c:4135:gst_base_sink_change_state:&lt;avsysvideosink0&gt; doing async state change</span></font></p>

<p class="MsoNormal"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">0:02:07.612030030   865    0xcfe80 DEBUG             basesink /home/root/x2//middleware/multimedia-framework/media-service/gstreamer/gstreamer-0.10.22/./libs/gst/base/gstbasesink.c:4144:gst_base_sink_change_state:&lt;avsysvideosink0&gt; rendered: 13, dropped: 53</span></font></p>

<p class="MsoNormal"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">[gst_avsysvideosink_change_state:835]GST_STATE_CHANGE_PLAYING_TO_PAUSED</span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">0:02:07.612487793   865    0xcfdd0 DEBUG             basesink /home/root/x2//middleware/multimedia-framework/media-service/gstreamer/gstreamer-0.10.22/./libs/gst/base/gstbasesink.c:1990:gst_base_sink_do_sync:&lt;avsysvideosink0&gt; clock returned 2</span></font></p>

<p class="MsoNormal"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">0:02:07.612731934   865    0xcfdd0 DEBUG             basesink /home/root/x2//middleware/multimedia-framework/media-service/gstreamer/gstreamer-0.10.22/./libs/gst/base/gstbasesink.c:2003:gst_base_sink_do_sync:&lt;avsysvideosink0&gt; unscheduled, waiting some more</span></font></p>

<p class="MsoNormal"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">0:02:07.612915039   865    0xcfdd0 DEBUG             basesink /home/root/x2//middleware/multimedia-framework/media-service/gstreamer/gstreamer-0.10.22/./libs/gst/base/gstbasesink.c:1943:gst_base_sink_do_sync:&lt;avsysvideosink0&gt; prerolling object 0xe2ad8</span></font></p>

<p class="MsoNormal"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">0:02:07.613098145   865    0xcfdd0 DEBUG             basesink /home/root/x2//middleware/multimedia-framework/media-service/gstreamer/gstreamer-0.10.22/./libs/gst/base/gstbasesink.c:1357:gst_base_sink_commit_state:&lt;avsysvideosink0&gt; commiting state to PAUSED</span></font></p>

<p class="MsoNormal"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">0:02:07.613281250   865    0xcfdd0 DEBUG             basesink /home/root/x2//middleware/multimedia-framework/media-service/gstreamer/gstreamer-0.10.22/./libs/gst/base/gstbasesink.c:1382:gst_base_sink_commit_state:&lt;avsysvideosink0&gt; posting PAUSED state change message</span></font></p>

<p class="MsoNormal"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">0:02:07.614196778   865    0xcfdd0 DEBUG             basesink /home/root/x2//middleware/multimedia-framework/media-service/gstreamer/gstreamer-0.10.22/./libs/gst/base/gstbasesink.c:1388:gst_base_sink_commit_state:&lt;avsysvideosink0&gt; posting async-done message</span></font></p>

<p class="MsoNormal"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">0:02:07.614532471   865    0xcfdd0 DEBUG             basesink /home/root/x2//middleware/multimedia-framework/media-service/gstreamer/gstreamer-0.10.22/./libs/gst/base/gstbasesink.c:1732:gst_base_sink_wait_preroll:&lt;avsysvideosink0&gt; waiting in preroll for flush or PLAYING</span></font></p>

<p class="MsoNormal"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><strong><font color="#ff0000">0:02:07.620910645   865    0xcfe80 DEBUG             basesink /home/root/x2//middleware/multimedia-framework/media-service/gstreamer/gstreamer-0.10.22/./libs/gst/base/gstbasesink.c:4099:gst_base_sink_change_state:&lt;alsasink0&gt; PLAYING to PAUSED</font></strong></span></font></p>

<p class="MsoNormal"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><strong><font color="#ff0000">0:02:07.621154785   865    0xcfe80 DEBUG             basesink /home/root/x2//middleware/multimedia-framework/media-service/gstreamer/gstreamer-0.10.22/./libs/gst/base/gstbasesink.c:2846:gst_base_sink_needs_preroll:&lt;alsasink0&gt; have_preroll: 0, EOS: 0 =&gt; needs preroll: 1</font></strong></span></font></p>

<p class="MsoNormal"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><strong><font color="#ff0000">0:02:07.653625489   865    0xcfe80 DEBUG             basesink /home/root/x2//middleware/multimedia-framework/media-service/gstreamer/gstreamer-0.10.22/./libs/gst/base/gstbasesink.c:4131:gst_base_sink_change_state:&lt;alsasink0&gt; PLAYING to PAUSED, we are not prerolled</font></strong></span></font></p>

<p class="MsoNormal"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><strong><font color="#ff0000">0:02:07.653900147   865    0xcfe80 DEBUG             basesink /home/root/x2//middleware/multimedia-framework/media-service/gstreamer/gstreamer-0.10.22/./libs/gst/base/gstbasesink.c:4135:gst_base_sink_change_state:&lt;alsasink0&gt; doing async state change</font></strong></span></font></p>

<p class="MsoNormal"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">0:02:07.654205323   865    0xcfe80 DEBUG             basesink /home/root/x2//middleware/multimedia-framework/media-service/gstreamer/gstreamer-0.10.22/./libs/gst/base/gstbasesink.c:4144:gst_base_sink_change_state:&lt;alsasink0&gt; rendered: 157, dropped: 0</span></font></p>

<p class="MsoNormal"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">PAUSED</span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></span></font> </p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></span></font> </p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">But after this the audio sink (alsasink) can not commit the state to pause. I understand this happens because no more buffers are pushed by amrdecoder to alsasink but somehow the qtdemux is also blocked and sends no data to amrdecoder which may cause the sink to get one buffer and get prerolled and commit the state.</span></font></p>

<p class="MsoNormal"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></span></font> </p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I want to enquire if anyone of you have faced similar issue, and how to go about this issue. Please help me resolve this issue.</span></font></p>

<p class="MsoNormal"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></span></font> </p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">BR,</span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Suresh</span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></span></font> </p></div></div>