Commit 44de39f9 authored by Michael Niedermayer's avatar Michael Niedermayer

flv/swf do not have a big endian codec id, they only support

little endian and native endian.

Originally committed as revision 12183 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 7bb8d51c
...@@ -71,7 +71,7 @@ enum { ...@@ -71,7 +71,7 @@ enum {
}; };
enum { enum {
FLV_CODECID_PCM_BE = 0, FLV_CODECID_PCM = 0,
FLV_CODECID_ADPCM = 1 << FLV_AUDIO_CODECID_OFFSET, FLV_CODECID_ADPCM = 1 << FLV_AUDIO_CODECID_OFFSET,
FLV_CODECID_MP3 = 2 << FLV_AUDIO_CODECID_OFFSET, FLV_CODECID_MP3 = 2 << FLV_AUDIO_CODECID_OFFSET,
FLV_CODECID_PCM_LE = 3 << FLV_AUDIO_CODECID_OFFSET, FLV_CODECID_PCM_LE = 3 << FLV_AUDIO_CODECID_OFFSET,
......
...@@ -41,7 +41,7 @@ static void flv_set_audio_codec(AVFormatContext *s, AVStream *astream, int flv_c ...@@ -41,7 +41,7 @@ static void flv_set_audio_codec(AVFormatContext *s, AVStream *astream, int flv_c
AVCodecContext *acodec = astream->codec; AVCodecContext *acodec = astream->codec;
switch(flv_codecid) { switch(flv_codecid) {
//no distinction between S16 and S8 PCM codec flags //no distinction between S16 and S8 PCM codec flags
case FLV_CODECID_PCM_BE: case FLV_CODECID_PCM:
acodec->codec_id = acodec->bits_per_sample == 8 ? CODEC_ID_PCM_S8 : CODEC_ID_PCM_S16BE; break; acodec->codec_id = acodec->bits_per_sample == 8 ? CODEC_ID_PCM_S8 : CODEC_ID_PCM_S16BE; break;
case FLV_CODECID_PCM_LE: case FLV_CODECID_PCM_LE:
acodec->codec_id = acodec->bits_per_sample == 8 ? CODEC_ID_PCM_S8 : CODEC_ID_PCM_S16LE; break; acodec->codec_id = acodec->bits_per_sample == 8 ? CODEC_ID_PCM_S8 : CODEC_ID_PCM_S16LE; break;
......
...@@ -35,8 +35,8 @@ static const AVCodecTag flv_video_codec_ids[] = { ...@@ -35,8 +35,8 @@ static const AVCodecTag flv_video_codec_ids[] = {
static const AVCodecTag flv_audio_codec_ids[] = { static const AVCodecTag flv_audio_codec_ids[] = {
{CODEC_ID_MP3, FLV_CODECID_MP3 >> FLV_AUDIO_CODECID_OFFSET}, {CODEC_ID_MP3, FLV_CODECID_MP3 >> FLV_AUDIO_CODECID_OFFSET},
{CODEC_ID_PCM_S8, FLV_CODECID_PCM_BE >> FLV_AUDIO_CODECID_OFFSET}, {CODEC_ID_PCM_S8, FLV_CODECID_PCM >> FLV_AUDIO_CODECID_OFFSET},
{CODEC_ID_PCM_S16BE, FLV_CODECID_PCM_BE >> FLV_AUDIO_CODECID_OFFSET}, {CODEC_ID_PCM_S16BE, FLV_CODECID_PCM >> FLV_AUDIO_CODECID_OFFSET},
{CODEC_ID_PCM_S16LE, FLV_CODECID_PCM_LE >> FLV_AUDIO_CODECID_OFFSET}, {CODEC_ID_PCM_S16LE, FLV_CODECID_PCM_LE >> FLV_AUDIO_CODECID_OFFSET},
{CODEC_ID_ADPCM_SWF, FLV_CODECID_ADPCM >> FLV_AUDIO_CODECID_OFFSET}, {CODEC_ID_ADPCM_SWF, FLV_CODECID_ADPCM >> FLV_AUDIO_CODECID_OFFSET},
{CODEC_ID_NONE, 0} {CODEC_ID_NONE, 0}
...@@ -84,10 +84,10 @@ static int get_audio_flags(AVCodecContext *enc){ ...@@ -84,10 +84,10 @@ static int get_audio_flags(AVCodecContext *enc){
flags |= FLV_CODECID_MP3 | FLV_SAMPLESSIZE_16BIT; flags |= FLV_CODECID_MP3 | FLV_SAMPLESSIZE_16BIT;
break; break;
case CODEC_ID_PCM_S8: case CODEC_ID_PCM_S8:
flags |= FLV_CODECID_PCM_BE | FLV_SAMPLESSIZE_8BIT; flags |= FLV_CODECID_PCM | FLV_SAMPLESSIZE_8BIT;
break; break;
case CODEC_ID_PCM_S16BE: case CODEC_ID_PCM_S16BE:
flags |= FLV_CODECID_PCM_BE | FLV_SAMPLESSIZE_16BIT; flags |= FLV_CODECID_PCM | FLV_SAMPLESSIZE_16BIT;
break; break;
case CODEC_ID_PCM_S16LE: case CODEC_ID_PCM_S16LE:
flags |= FLV_CODECID_PCM_LE | FLV_SAMPLESSIZE_16BIT; flags |= FLV_CODECID_PCM_LE | FLV_SAMPLESSIZE_16BIT;
......
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