git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9c7662a
)
avcodec/vaapi_mpeg2: Use skip_1stop_8data_bits()
author
Michael Niedermayer
<michaelni@gmx.at>
Wed, 30 Oct 2013 17:28:00 +0000
(18:28 +0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Wed, 30 Oct 2013 17:28:00 +0000
(18:28 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/vaapi_mpeg2.c
patch
|
blob
|
history
diff --git
a/libavcodec/vaapi_mpeg2.c
b/libavcodec/vaapi_mpeg2.c
index
d626f24
..
cdc70ee
100644
(file)
--- a/
libavcodec/vaapi_mpeg2.c
+++ b/
libavcodec/vaapi_mpeg2.c
@@
-115,8
+115,8
@@
static int vaapi_mpeg2_decode_slice(AVCodecContext *avctx, const uint8_t *buffer
intra_slice_flag = get_bits1(&gb);
if (intra_slice_flag) {
skip_bits(&gb, 8);
-
while (get_bits1(&gb) !=
0)
-
skip_bits(&gb, 8)
;
+
if (skip_1stop_8data_bits(&gb) <
0)
+
return AVERROR_INVALIDDATA
;
}
macroblock_offset = get_bits_count(&gb);