Commit 741d02ee authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Should add atrac3 support in rm files. Patch by Benjamin Larsson (real.c) and me (ffmpeg.c)

parent 4c2466aa
...@@ -1110,6 +1110,11 @@ static struct ...@@ -1110,6 +1110,11 @@ static struct
AUDIO_ES, "Microsoft GSM Audio" }, AUDIO_ES, "Microsoft GSM Audio" },
#endif #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 */ /* PCM */
{ VLC_FOURCC('s','8',' ',' '), CODEC_ID_PCM_S8, { VLC_FOURCC('s','8',' ',' '), CODEC_ID_PCM_S8,
AUDIO_ES, "PCM S8" }, AUDIO_ES, "PCM S8" },
......
...@@ -507,6 +507,7 @@ static int Demux( demux_t *p_demux ) ...@@ -507,6 +507,7 @@ static int Demux( demux_t *p_demux )
} }
} }
else if( tk->fmt.i_codec == VLC_FOURCC( 'c', 'o', 'o', 'k' ) || 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') ) tk->fmt.i_codec == VLC_FOURCC('2','8','_','8') )
{ {
uint8_t *p_buf = p_sys->buffer; uint8_t *p_buf = p_sys->buffer;
...@@ -516,7 +517,8 @@ static int Demux( demux_t *p_demux ) ...@@ -516,7 +517,8 @@ static int Demux( demux_t *p_demux )
/* Sanity check */ /* Sanity check */
if( i_flags & 2 ) y = tk->i_subpacket = 0; 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++ ) 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 ); 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 ) ...@@ -1059,6 +1061,7 @@ static int ReadCodecSpecificData( demux_t *p_demux, int i_len, int i_num )
break; break;
case VLC_FOURCC('c','o','o','k'): case VLC_FOURCC('c','o','o','k'):
case VLC_FOURCC('a','t','r','c'):
fmt.audio.i_blockalign = i_subpacket_size; fmt.audio.i_blockalign = i_subpacket_size;
if( !(fmt.i_extra = GetDWBE( p_peek )) ) break; if( !(fmt.i_extra = GetDWBE( p_peek )) ) break;
fmt.p_extra = malloc( fmt.i_extra ); fmt.p_extra = malloc( fmt.i_extra );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment