[vlc-commits] mp4: use vlc_fourcc_GetCodec()
Frédéric Yhuel
git at videolan.org
Sun Oct 7 21:01:38 CEST 2012
vlc | branch: master | Frédéric Yhuel <yhuelf at gmail.com> | Sat Oct 6 15:16:44 2012 +0200| [4b2d5cd7230ade2b0e2cd3883ab26432a31fd7b3] | committer: Jean-Baptiste Kempf
mp4: use vlc_fourcc_GetCodec()
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4b2d5cd7230ade2b0e2cd3883ab26432a31fd7b3
---
modules/demux/mp4/mp4.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index e210d4d..b34a0ef 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -3152,6 +3152,9 @@ static int MP4_frg_TrackCreate( demux_t *p_demux, mp4_track_t *p_track, MP4_Box_
/* Set language FIXME */
fmt->psz_language = strdup( "en" );
+ fmt->i_original_fourcc = p_data->FourCC;
+ fmt->i_codec = vlc_fourcc_GetCodec( fmt->i_cat, p_data->FourCC );
+
uint8_t **p_extra = (uint8_t **)&fmt->p_extra;
/* See http://msdn.microsoft.com/en-us/library/ff728116%28v=vs.90%29.aspx
* for MS weird use of FourCC*/
@@ -3164,11 +3167,9 @@ static int MP4_frg_TrackCreate( demux_t *p_demux, mp4_track_t *p_track, MP4_Box_
{
fmt->i_extra = build_raw_avcC( p_extra,
p_data->CodecPrivateData, p_data->cpd_len );
- fmt->i_codec = VLC_CODEC_H264;
}
else
{
- fmt->i_codec = p_data->FourCC;
ret = MP4_SetCodecExtraData( fmt, p_data );
if( ret != VLC_SUCCESS )
return ret;
@@ -3195,13 +3196,6 @@ static int MP4_frg_TrackCreate( demux_t *p_demux, mp4_track_t *p_track, MP4_Box_
break;
case AUDIO_ES:
- if( p_data->FourCC == VLC_FOURCC( 'A', 'A', 'C', 'H' ) ||
- p_data->FourCC == VLC_FOURCC( 'A', 'A', 'C', 'L' ) )
- fmt->i_codec = VLC_CODEC_MP4A;
-
- else
- fmt->i_codec = p_data->FourCC;
-
fmt->audio.i_channels = p_data->Channels;
fmt->audio.i_rate = p_data->SamplingRate;
fmt->audio.i_bitspersample = p_data->BitsPerSample;
More information about the vlc-commits
mailing list