提交 19f53840 编写于 作者: M Michael Niedermayer 提交者: Luca Barbato

h264_parser: Fix order of operations

Signed-off-by: NMichael Niedermayer <michaelni@gmx.at>
Signed-off-by: NLuca Barbato <lu_zero@gentoo.org>
上级 f825d42b
......@@ -201,7 +201,7 @@ static inline int parse_nal_units(AVCodecParserContext *s,
case NAL_SLICE:
case NAL_IDR_SLICE:
// Do not walk the whole buffer just to decode slice header
if (state & 0x1f == NAL_IDR_SLICE || (state >> 5) & 0x3 == 0) {
if ((state & 0x1f) == NAL_IDR_SLICE || ((state >> 5) & 0x3) == 0) {
/* IDR or disposable slice
* No need to decode many bytes because MMCOs shall not be present. */
if (src_length > 60)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册