summaryrefslogtreecommitdiff
path: root/libavcodec/vaapi_mpeg2.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-07-16 19:40:35 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-07-16 19:43:35 +0200
commit15285d8fc528483aebf4ae7c522ea33c558f503c (patch)
tree0c6e05a3593224ab22b88d2ab5d979e4f608d8f6 /libavcodec/vaapi_mpeg2.c
parentc31a5b23b4cd566724743685e5ea158b0c818647 (diff)
parent8342a82680966055af8cbc48e0ad129411df7c44 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: (22 commits) arm: remove disabled function dct_unquantize_h263_inter_iwmmxt() Remove commented-out call to non-existing function print_pow1(). Do not decode RV30 files if the extradata is too small flashsv: split flashsv_decode_block() off from flashsv_decode_frame(). ppc: remove disabled code libspeexdec: Drop const qualifier to silence compiler warning. libopenjpeg: Drop const qualifier to silence compiler warning. alac: Remove unused dummy code. Remove unused structs and tables. vaapi: do not assert on value read from input bitstream flashsvenc: replace bitstream description by a link to the specification flashsvenc: drop unnecessary cast flashsvenc: improve some variable names and fix corresponding comments flashsvenc: merge two consecutive if-conditions flashsvenc: merge variable declarations and initializations flashsvenc: convert some debug av_log() to av_dlog() flashsvenc: whitespace cosmetics flashsvenc: drop some unnecessary parentheses flashsvenc: fix some comment typos aacps: skip some memcpy() if src and dst would be equal ... Conflicts: libavcodec/vaapi_mpeg2.c libavformat/aviobuf.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vaapi_mpeg2.c')
-rw-r--r--libavcodec/vaapi_mpeg2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/vaapi_mpeg2.c b/libavcodec/vaapi_mpeg2.c
index 6c92a0ff72..dbe1d1296c 100644
--- a/libavcodec/vaapi_mpeg2.c
+++ b/libavcodec/vaapi_mpeg2.c
@@ -109,14 +109,14 @@ static int vaapi_mpeg2_decode_slice(AVCodecContext *avctx, const uint8_t *buffer
MpegEncContext * const s = avctx->priv_data;
VASliceParameterBufferMPEG2 *slice_param;
GetBitContext gb;
- uint32_t start_code av_unused, quantiser_scale_code, intra_slice_flag, macroblock_offset;
+ uint32_t quantiser_scale_code, intra_slice_flag, macroblock_offset;
av_dlog(avctx, "vaapi_mpeg2_decode_slice(): buffer %p, size %d\n", buffer, size);
/* Determine macroblock_offset */
init_get_bits(&gb, buffer, 8 * size);
- start_code = get_bits(&gb, 32);
- assert((start_code & 0xffffff00) == 0x00000100);
+ if (get_bits_long(&gb, 32) >> 8 != 1) /* start code */
+ return AVERROR_INVALIDDATA;
quantiser_scale_code = get_bits(&gb, 5);
intra_slice_flag = get_bits1(&gb);
if (intra_slice_flag) {