Skip to content
Snippets Groups Projects
Commit 9c0fe487 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

avcodec/h264_parser: fix order of operations


Fixes CID1108576

Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
parent 62533eab
No related branches found
No related tags found
No related merge requests found
......@@ -249,7 +249,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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment