]> git.sesse.net Git - vlc/commitdiff
* all: set pf_run *only* if we accept this stream.
authorLaurent Aimar <fenrir@videolan.org>
Wed, 24 Sep 2003 14:59:21 +0000 (14:59 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Wed, 24 Sep 2003 14:59:21 +0000 (14:59 +0000)
modules/packetizer/mpeg4audio.c
modules/packetizer/mpeg4video.c

index f7427ae7a046b2b6f90865ce0d0153695c57b1ff..f481774230aad18a23771e8fd42599107994a6f1 100644 (file)
@@ -2,7 +2,7 @@
  * mpeg4audio.c
  *****************************************************************************
  * Copyright (C) 2001, 2002 VideoLAN
- * $Id: mpeg4audio.c,v 1.7 2003/09/02 20:19:26 gbazin Exp $
+ * $Id: mpeg4audio.c,v 1.8 2003/09/24 14:59:21 fenrir Exp $
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *
@@ -102,16 +102,13 @@ static int Open( vlc_object_t *p_this )
 {
     decoder_t *p_dec = (decoder_t*)p_this;
 
-    p_dec->pf_run = Run;
-
-    if( p_dec->p_fifo->i_fourcc == VLC_FOURCC( 'm', 'p', '4', 'a') )
+    if( p_dec->p_fifo->i_fourcc != VLC_FOURCC( 'm', 'p', '4', 'a') )
     {
-        return( VLC_SUCCESS );
-    }
-    else
-    {
-        return( VLC_EGENERIC );
+        return VLC_EGENERIC;
     }
+
+    p_dec->pf_run = Run;
+    return VLC_SUCCESS;
 }
 
 /*****************************************************************************
index a29583fdd99033a6d3081554bbb4594a838eec4c..3694d097c185c48d091ee82fb00533ca6f52d008 100644 (file)
@@ -2,7 +2,7 @@
  * mpeg4video.c
  *****************************************************************************
  * Copyright (C) 2001, 2002 VideoLAN
- * $Id: mpeg4video.c,v 1.13 2003/09/02 20:19:26 gbazin Exp $
+ * $Id: mpeg4video.c,v 1.14 2003/09/24 14:59:21 fenrir Exp $
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *          Eric Petit <titer@videolan.org>
@@ -106,8 +106,6 @@ static int Open( vlc_object_t *p_this )
 {
     decoder_t *p_dec = (decoder_t*)p_this;
 
-    p_dec->pf_run = Run;
-
     switch( p_dec->p_fifo->i_fourcc )
     {
         case VLC_FOURCC( 'm', '4', 's', '2'):
@@ -123,7 +121,7 @@ static int Open( vlc_object_t *p_this )
         case VLC_FOURCC( 'D', 'X', '5', '0'):
         case VLC_FOURCC( 0x04, 0,   0,   0):
         case VLC_FOURCC( '3', 'I', 'V', '2'):
-
+            p_dec->pf_run = Run;
             return VLC_SUCCESS;
         default:
             return VLC_EGENERIC;