]> git.sesse.net Git - vlc/blobdiff - modules/demux/mp4/mp4.c
mp4: Cosmetic.
[vlc] / modules / demux / mp4 / mp4.c
index 8d66f45d69a8f397d3551df5bb183212bbc2a3ae..592dd9461bb7e7deea1e72f3a5a380cbb0b86abf 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * mp4.c : MP4 file input module for vlc
  *****************************************************************************
- * Copyright (C) 2001-2004 the VideoLAN team
+ * Copyright (C) 2001-2004, 2010 the VideoLAN team
  * $Id$
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *
@@ -402,7 +402,7 @@ static int Open( vlc_object_t * p_this )
                 else
                 {
                     char *psz_absolute;
-                    char *psz_path = strdup( p_demux->psz_path );
+                    char *psz_path = strdup( p_demux->psz_location );
                     char *end = strrchr( psz_path, '/' );
                     if( end ) end[1] = '\0';
                     else *psz_path = '\0';
@@ -495,7 +495,7 @@ static int Open( vlc_object_t * p_this )
             p_sys->p_tref_chap = p_chap;
     }
 
-    /* now process each track and extract all usefull information */
+    /* now process each track and extract all useful information */
     for( i = 0; i < p_sys->i_tracks; i++ )
     {
         p_trak = MP4_BoxGet( p_sys->p_root, "/moov/trak[%d]", i );
@@ -941,7 +941,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
                     break;
                 }
 #undef SET
-                static const struct { uint32_t xa9_type; char metadata[25]; } xa9typetoextrameta[] = 
+                static const struct { uint32_t xa9_type; char metadata[25]; } xa9typetoextrameta[] =
                 {
                     { FOURCC_0xa9wrt, N_("Writer") },
                     { FOURCC_0xa9com, N_("Composr") },
@@ -1895,9 +1895,10 @@ static int TrackCreateES( demux_t *p_demux, mp4_track_t *p_track,
                             p_track->fmt.i_extra);
                 }
                 break;
+            case VLC_FOURCC( 's', 'a', 'm', 'r' ):
+                p_track->fmt.audio.i_rate = 8000;
             case VLC_FOURCC( 'Q', 'D', 'M', 'C' ):
             case VLC_FOURCC( 'Q', 'D', 'M', '2' ):
-            case VLC_FOURCC( 's', 'a', 'm', 'r' ):
             case VLC_FOURCC( 'a', 'l', 'a', 'c' ):
                 p_track->fmt.i_extra =
                     p_sample->data.p_sample_soun->i_qt_description;