[vlc-devel] commit: Allowed to have access_demux without pf_demux as slave. ( Laurent Aimar )

git version control git at videolan.org
Fri Jul 17 18:48:58 CEST 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Fri Jul 17 18:45:13 2009 +0200| [93682d7ce176b4b8b3b40559dbc4a34c33fae71c] | committer: Laurent Aimar 

Allowed to have access_demux without pf_demux as slave.

It would be the proper thing to do to convert real time access_demux
to work without pf_demux callback (it includes oss,alsa,rtp,screen
at least).

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=93682d7ce176b4b8b3b40559dbc4a34c33fae71c
---

 src/input/input.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/src/input/input.c b/src/input/input.c
index 86aa025..f49e747 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -2808,6 +2808,13 @@ static void SlaveDemux( input_thread_t *p_input, bool *pb_demux_polled )
         if( in->b_eof )
             continue;
 
+        const bool b_demux_polled = in->p_demux->pf_demux != NULL;
+        if( !b_demux_polled )
+            continue;
+
+        *pb_demux_polled = true;
+
+        /* Call demux_Demux until we have read enough data */
         if( demux_Control( in->p_demux, DEMUX_SET_NEXT_DEMUX_TIME, i_time ) )
         {
             for( ;; )
@@ -2835,7 +2842,6 @@ static void SlaveDemux( input_thread_t *p_input, bool *pb_demux_polled )
         {
             i_ret = demux_Demux( in->p_demux );
         }
-        *pb_demux_polled |= in->p_demux->pf_demux != NULL;
 
         if( i_ret <= 0 )
         {




More information about the vlc-devel mailing list