]> git.sesse.net Git - vlc/blobdiff - modules/demux/pva.c
Don't include config.h from the headers - refs #297.
[vlc] / modules / demux / pva.c
index a5622bfc3ac2246975ca69d656b10fb346846e79..9ac9b91515a113696a41d2f0c8762d053b048d78 100644 (file)
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include <stdlib.h>                                      /* malloc(), free() */
 
-#include <vlc/vlc.h>
-#include <vlc/input.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
 
-/* TODO:
- *  - ...
- */
+#include <vlc/vlc.h>
+#include <vlc_demux.h>
 
 /*****************************************************************************
  * Module descriptor
@@ -82,16 +81,14 @@ static int Open( vlc_object_t *p_this )
     demux_t     *p_demux = (demux_t*)p_this;
     demux_sys_t *p_sys;
     es_format_t  fmt;
-    uint8_t     *p_peek;
+    const uint8_t *p_peek;
 
     if( stream_Peek( p_demux->s, &p_peek, 5 ) < 5 ) return VLC_EGENERIC;
     if( p_peek[0] != 'A' || p_peek[1] != 'V' || p_peek[4] != 0x55 )
     {
         /* In case we had forced this demuxer we try to resynch */
-        if( strcasecmp( p_demux->psz_demux, "pva" ) || ReSynch( p_demux ) )
-        {
+        if( !p_demux->b_force || ReSynch( p_demux ) )
             return VLC_EGENERIC;
-        }
     }
 
     /* Fill p_demux field */
@@ -138,7 +135,7 @@ static int Demux( demux_t *p_demux )
 {
     demux_sys_t *p_sys = p_demux->p_sys;
 
-    uint8_t     *p_peek;
+    const uint8_t *p_peek;
     int         i_size;
     block_t     *p_frame;
     int64_t     i_pts;
@@ -342,7 +339,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
  *****************************************************************************/
 static int ReSynch( demux_t *p_demux )
 {
-    uint8_t *p_peek;
+    const uint8_t *p_peek;
     int      i_skip;
     int      i_peek;