[FFmpeg-cvslog] avformat/hls_sample_encryption: Fix precedence

Andreas Rheinhardt git at videolan.org
Tue Nov 9 17:14:24 EET 2021


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Sun Nov  7 08:35:08 2021 +0100| [945b2dcc631a891fcc8c911891fd6730a40b8248] | committer: Andreas Rheinhardt

avformat/hls_sample_encryption: Fix precedence

Fixes Coverity ticket #1492869.

Reviewed-by: Steven Liu <lingjiujianke at gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=945b2dcc631a891fcc8c911891fd6730a40b8248
---

 libavformat/hls_sample_encryption.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/hls_sample_encryption.c b/libavformat/hls_sample_encryption.c
index 396fe97921..38795c7fb0 100644
--- a/libavformat/hls_sample_encryption.c
+++ b/libavformat/hls_sample_encryption.c
@@ -268,7 +268,7 @@ static int get_next_adts_frame(CodecParserContext *ctx, AudioFrame *frame)
 
     /* Find next sync word 0xFFF */
     while (ctx->buf_ptr < ctx->buf_end - 1) {
-        if (*ctx->buf_ptr == 0xFF && *(ctx->buf_ptr + 1) & 0xF0 == 0xF0)
+        if (*ctx->buf_ptr == 0xFF && (*(ctx->buf_ptr + 1) & 0xF0) == 0xF0)
             break;
         ctx->buf_ptr++;
     }



More information about the ffmpeg-cvslog mailing list