Commit d33c1fc3 authored by Gildas Bazin's avatar Gildas Bazin

* modules/stream_out/transcode.c: get decoder specific info from the audio encoder (useful for MPEG AAC).
parent d434d7a9
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* transcode.c * transcode.c
***************************************************************************** *****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN * Copyright (C) 2001, 2002 VideoLAN
* $Id: transcode.c,v 1.32 2003/10/01 12:01:46 gbazin Exp $ * $Id: transcode.c,v 1.33 2003/10/03 18:17:55 gbazin Exp $
* *
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
...@@ -735,6 +735,11 @@ static int transcode_audio_ffmpeg_new( sout_stream_t *p_stream, ...@@ -735,6 +735,11 @@ static int transcode_audio_ffmpeg_new( sout_stream_t *p_stream,
id->ff_enc_c->sample_rate = id->f_dst.i_sample_rate; id->ff_enc_c->sample_rate = id->f_dst.i_sample_rate;
id->ff_enc_c->channels = id->f_dst.i_channels; id->ff_enc_c->channels = id->f_dst.i_channels;
/* Make sure we get extradata filled by the encoder */
id->ff_enc_c->extradata_size = 0;
id->ff_enc_c->extradata = NULL;
id->ff_enc_c->flags |= CODEC_FLAG_GLOBAL_HEADER;
if( avcodec_open( id->ff_enc_c, id->ff_enc ) ) if( avcodec_open( id->ff_enc_c, id->ff_enc ) )
{ {
if( id->ff_enc_c->channels > 2 ) if( id->ff_enc_c->channels > 2 )
...@@ -755,6 +760,10 @@ static int transcode_audio_ffmpeg_new( sout_stream_t *p_stream, ...@@ -755,6 +760,10 @@ static int transcode_audio_ffmpeg_new( sout_stream_t *p_stream,
} }
} }
id->f_dst.i_extra_data = id->ff_enc_c->extradata_size;
id->f_dst.p_extra_data = id->ff_enc_c->extradata;
id->ff_enc_c->flags &= ~CODEC_FLAG_GLOBAL_HEADER;
return VLC_SUCCESS; return VLC_SUCCESS;
} }
......
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