diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-04-06 22:52:01 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-04-06 22:52:01 +0200 |
commit | 2e0c360abd74b94991aa9a271cadc72aae1471c2 (patch) | |
tree | cbea40b59f334f8f7447a79b6fbdf514f0dd2e0c /libavcodec | |
parent | bd128e9bff8aaec97ce7dcd414717c214536c7d9 (diff) | |
parent | 20234a4bd7e187ae31f9a66b5c40e98666bc30e4 (diff) | |
download | ffmpeg-2e0c360abd74b94991aa9a271cadc72aae1471c2.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
cosmetics: Align muxer/demuxer declarations
mpeg12: Do not change frame_pred_frame_dct flag and demote error into a warning
avcodec: remove avcodec_guess_channel_layout()
avutil: Add av_get_default_channel_layout()
Conflicts:
doc/APIchanges
libavcodec/mpeg12.c
libavformat/cdg.c
libavformat/matroskaenc.c
libavformat/mpegts.c
libavformat/nuv.c
libavformat/wav.c
libavutil/audioconvert.c
libavutil/audioconvert.h
libavutil/avutil.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/ac3enc.c | 2 | ||||
-rw-r--r-- | libavcodec/audioconvert.c | 14 | ||||
-rw-r--r-- | libavcodec/audioconvert.h | 9 | ||||
-rw-r--r-- | libavcodec/mpeg12.c | 2 |
4 files changed, 2 insertions, 25 deletions
diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c index 3d01249285..e04e70d8bc 100644 --- a/libavcodec/ac3enc.c +++ b/libavcodec/ac3enc.c @@ -2071,7 +2071,7 @@ static av_cold int set_channel_info(AC3EncodeContext *s, int channels, return AVERROR(EINVAL); ch_layout = *channel_layout; if (!ch_layout) - ch_layout = avcodec_guess_channel_layout(channels, CODEC_ID_AC3, NULL); + ch_layout = av_get_default_channel_layout(channels); s->lfe_on = !!(ch_layout & AV_CH_LOW_FREQUENCY); s->channels = channels; diff --git a/libavcodec/audioconvert.c b/libavcodec/audioconvert.c index 2cf36bd1ab..74c6600849 100644 --- a/libavcodec/audioconvert.c +++ b/libavcodec/audioconvert.c @@ -31,20 +31,6 @@ #include "avcodec.h" #include "audioconvert.h" -uint64_t avcodec_guess_channel_layout(int nb_channels, enum CodecID codec_id, const char *fmt_name) -{ - switch(nb_channels) { - case 1: return AV_CH_LAYOUT_MONO; - case 2: return AV_CH_LAYOUT_STEREO; - case 3: return AV_CH_LAYOUT_SURROUND; - case 4: return AV_CH_LAYOUT_QUAD; - case 5: return AV_CH_LAYOUT_5POINT0; - case 6: return AV_CH_LAYOUT_5POINT1; - case 8: return AV_CH_LAYOUT_7POINT1; - default: return 0; - } -} - struct AVAudioConvert { int in_channels, out_channels; int fmt_pair; diff --git a/libavcodec/audioconvert.h b/libavcodec/audioconvert.h index 93b9ef1ed7..03b196bdf8 100644 --- a/libavcodec/audioconvert.h +++ b/libavcodec/audioconvert.h @@ -33,15 +33,6 @@ #include "avcodec.h" #include "libavutil/audioconvert.h" -/** - * Guess the channel layout - * @param nb_channels - * @param codec_id Codec identifier, or CODEC_ID_NONE if unknown - * @param fmt_name Format name, or NULL if unknown - * @return Channel layout mask - */ -uint64_t avcodec_guess_channel_layout(int nb_channels, enum CodecID codec_id, const char *fmt_name); - struct AVAudioConvert; typedef struct AVAudioConvert AVAudioConvert; diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index 548e26d9bc..535c795899 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -1559,7 +1559,7 @@ static void mpeg_decode_picture_coding_extension(Mpeg1Context *s1) } if (s->progressive_sequence && !s->frame_pred_frame_dct) { - av_log(s->avctx, AV_LOG_ERROR, "invalid frame_pred_frame_dct\n"); + av_log(s->avctx, AV_LOG_WARNING, "invalid frame_pred_frame_dct\n"); } if (s->picture_structure == PICT_FRAME) { |