diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-02-23 02:33:21 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-02-23 04:31:55 +0100 |
commit | e99f1a8cc8b90926209b7390ae3f50d519c0e63f (patch) | |
tree | b50f42ffe92fdb5fb2bc1efeaf9625d208e9c6ca /libavcodec | |
parent | 094673ff1b1a0f83584f3aeea76a3e9c9e3129bf (diff) | |
parent | 562ebc30775db243941db3c96396e7bf8a0e0a44 (diff) | |
download | ffmpeg-e99f1a8cc8b90926209b7390ae3f50d519c0e63f.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
dxva2: don't check for DXVA_PictureParameters->wDecodedPictureIndex
img2: split muxer and demuxer into separate files
rm: prevent infinite loops for index parsing.
aac: fix infinite loop on end-of-frame with sequence of 1-bits.
mov: Add more HDV and XDCAM FourCCs.
lavf: don't set AVCodecContext.has_b_frames in compute_pkt_fields().
rmdec: when using INT4 deinterleaving, error out if sub_packet_h <= 1.
cdxl: correctly synchronize video timestamps to audio
mlpdec_parser: fix a few channel layouts.
Add channel names to channel_names[] array for channels added in b2890f5
movenc: Buffer the mdat for the initial moov fragment, too
flvdec: Ignore the index if the ignidx flag is set
flvdec: Fix indentation
movdec: Don't parse all fragments if ignidx is set
movdec: Restart parsing root-level atoms at the right spot
prores: use natural integer type for the codebook index
mov: Add support for MPEG2 HDV 720p24 (hdv4)
swscale: K&R formatting cosmetics (part I)
swscale: variable declaration and placement cosmetics
Conflicts:
configure
libavcodec/aacdec.c
libavcodec/mlp_parser.c
libavformat/flvdec.c
libavformat/img2.c
libavformat/isom.h
libavformat/mov.c
libavformat/movenc.c
libswscale/rgb2rgb.c
libswscale/rgb2rgb_template.c
libswscale/yuv2rgb.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/aacdec.c | 25 | ||||
-rw-r--r-- | libavcodec/mlp_parser.c | 5 | ||||
-rw-r--r-- | libavcodec/proresdec_lgpl.c | 2 | ||||
-rw-r--r-- | libavcodec/proresenc_kostya.c | 4 |
4 files changed, 19 insertions, 17 deletions
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c index dbd91a4824..5a0fc44129 100644 --- a/libavcodec/aacdec.c +++ b/libavcodec/aacdec.c @@ -994,19 +994,20 @@ static int decode_band_types(AACContext *ac, enum BandType band_type[120], av_log(ac->avctx, AV_LOG_ERROR, "invalid band type\n"); return -1; } - while ((sect_len_incr = get_bits(gb, bits)) == (1 << bits) - 1 && get_bits_left(gb) >= bits) + do { + sect_len_incr = get_bits(gb, bits); sect_end += sect_len_incr; - sect_end += sect_len_incr; - if (get_bits_left(gb) < 0 || sect_len_incr == (1 << bits) - 1) { - av_log(ac->avctx, AV_LOG_ERROR, overread_err); - return -1; - } - if (sect_end > ics->max_sfb) { - av_log(ac->avctx, AV_LOG_ERROR, - "Number of bands (%d) exceeds limit (%d).\n", - sect_end, ics->max_sfb); - return -1; - } + if (get_bits_left(gb) < 0) { + av_log(ac->avctx, AV_LOG_ERROR, overread_err); + return -1; + } + if (sect_end > ics->max_sfb) { + av_log(ac->avctx, AV_LOG_ERROR, + "Number of bands (%d) exceeds limit (%d).\n", + sect_end, ics->max_sfb); + return -1; + } + } while (sect_len_incr == (1 << bits) - 1); for (; k < sect_end; k++) { band_type [idx] = sect_band_type; band_type_run_end[idx++] = sect_end; diff --git a/libavcodec/mlp_parser.c b/libavcodec/mlp_parser.c index 64938da932..bd18ec2152 100644 --- a/libavcodec/mlp_parser.c +++ b/libavcodec/mlp_parser.c @@ -84,7 +84,7 @@ static const uint64_t thd_layout[13] = { AV_CH_BACK_CENTER, // Cs AV_CH_TOP_CENTER, // Ts AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT, // LRsd - TODO: Surround Direct - AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER, // LRw - TODO: Wide + AV_CH_WIDE_LEFT|AV_CH_WIDE_RIGHT, // LRw AV_CH_TOP_FRONT_CENTER, // Cvh AV_CH_LOW_FREQUENCY // LFE2 }; @@ -109,7 +109,8 @@ static int truehd_channels(int chanmap) uint64_t ff_truehd_layout(int chanmap) { - int layout = 0, i; + int i; + uint64_t layout = 0; for (i = 0; i < 13; i++) layout |= thd_layout[i] * ((chanmap >> i) & 1); diff --git a/libavcodec/proresdec_lgpl.c b/libavcodec/proresdec_lgpl.c index 1070193c96..882503a129 100644 --- a/libavcodec/proresdec_lgpl.c +++ b/libavcodec/proresdec_lgpl.c @@ -289,7 +289,7 @@ static int decode_picture_header(ProresContext *ctx, const uint8_t *buf, /** * Read an unsigned rice/exp golomb codeword. */ -static inline int decode_vlc_codeword(GetBitContext *gb, uint8_t codebook) +static inline int decode_vlc_codeword(GetBitContext *gb, unsigned codebook) { unsigned int rice_order, exp_order, switch_bits; unsigned int buf, code; diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c index 8259b2a664..375dc5261c 100644 --- a/libavcodec/proresenc_kostya.c +++ b/libavcodec/proresenc_kostya.c @@ -229,7 +229,7 @@ static void get_slice_data(ProresContext *ctx, const uint16_t *src, /** * Write an unsigned rice/exp golomb codeword. */ -static inline void encode_vlc_codeword(PutBitContext *pb, uint8_t codebook, int val) +static inline void encode_vlc_codeword(PutBitContext *pb, unsigned codebook, int val) { unsigned int rice_order, exp_order, switch_bits, switch_val; int exponent; @@ -393,7 +393,7 @@ static int encode_slice(AVCodecContext *avctx, const AVFrame *pic, return total_size; } -static inline int estimate_vlc(uint8_t codebook, int val) +static inline int estimate_vlc(unsigned codebook, int val) { unsigned int rice_order, exp_order, switch_bits, switch_val; int exponent; |