]> git.sesse.net Git - vlc/commitdiff
Should add atrac3 support in rm files. Patch by Benjamin Larsson (real.c) and me...
authorJean-Baptiste Kempf <jb@videolan.org>
Wed, 2 May 2007 22:59:49 +0000 (22:59 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Wed, 2 May 2007 22:59:49 +0000 (22:59 +0000)
modules/codec/ffmpeg/ffmpeg.c
modules/demux/real.c

index c4c7967598f65adfa1a4e108f42ec93bddbc8643..d83ca02bc8c6f9d3eab65b63fd5427562f451a50 100644 (file)
@@ -1110,6 +1110,11 @@ static struct
       AUDIO_ES, "Microsoft GSM Audio" },
 #endif
 
+#if LIBAVCODEC_VERSION_INT >= ((51<<16)+(40<<8)+4)
+    { VLC_FOURCC('a','t','r','c'), CODEC_ID_ATRAC3,
+      AUDIO_ES, "atrac 3" },
+#endif
+
     /* PCM */
     { VLC_FOURCC('s','8',' ',' '), CODEC_ID_PCM_S8,
       AUDIO_ES, "PCM S8" },
index 441d93174063ccb56554eb9ea8031f2c52d98cff..79ed1b03c7b262405ee1d1f3436abfb0e6255053 100644 (file)
@@ -507,6 +507,7 @@ static int Demux( demux_t *p_demux )
             }
         }
         else if( tk->fmt.i_codec == VLC_FOURCC( 'c', 'o', 'o', 'k' ) ||
+                 tk->fmt.i_codec == VLC_FOURCC( 'a', 't', 'r', 'c') ||
                  tk->fmt.i_codec == VLC_FOURCC('2','8','_','8') )
         {
             uint8_t *p_buf = p_sys->buffer;
@@ -516,7 +517,8 @@ static int Demux( demux_t *p_demux )
             /* Sanity check */
             if( i_flags & 2 ) y = tk->i_subpacket = 0;
 
-            if( tk->fmt.i_codec == VLC_FOURCC( 'c', 'o', 'o', 'k' ) )
+            if(( tk->fmt.i_codec == VLC_FOURCC( 'c', 'o', 'o', 'k' ) ||
+                  tk->fmt.i_codec == VLC_FOURCC( 'a', 't', 'r', 'c' ))
             for( i = 0; i < tk->i_frame_size / tk->i_subpacket_size; i++ )
             {
                 block_t *p_block = block_New( p_demux, tk->i_subpacket_size );
@@ -1059,6 +1061,7 @@ static int ReadCodecSpecificData( demux_t *p_demux, int i_len, int i_num )
             break;
 
         case VLC_FOURCC('c','o','o','k'):
+        case VLC_FOURCC('a','t','r','c'):
             fmt.audio.i_blockalign = i_subpacket_size;
             if( !(fmt.i_extra = GetDWBE( p_peek )) ) break;
             fmt.p_extra = malloc( fmt.i_extra );