aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2019-09-15 00:06:34 -0300
committerJames Almer <jamrial@gmail.com>2019-09-15 10:31:19 -0300
commit78f52b4fe388bb63ed2ca674f7486edc11053f70 (patch)
tree86fa276d623f10f263206bcd0925f1f00b6f8aab
parent5a9560dfc6f2151fc26c814d600ee7f074f23ae0 (diff)
downloadffmpeg-78f52b4fe388bb63ed2ca674f7486edc11053f70.tar.gz
avformat/rmdec.c: fix left shift of negative value in rm_sync()
Fixes ticket 8143. Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r--libavformat/rmdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index c9abd38d33..e95cc9f858 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -724,8 +724,8 @@ static int rm_sync(AVFormatContext *s, int64_t *timestamp, int *flags, int *stre
num = avio_rb16(pb);
*timestamp = avio_rb32(pb);
- mlti_id = (avio_r8(pb)>>1)-1<<16;
- mlti_id = FFMAX(mlti_id, 0);
+ mlti_id = avio_r8((pb) >> 1) - 1;
+ mlti_id = FFMAX(mlti_id, 0) << 16;
*flags = avio_r8(pb); /* flags */
}
for(i=0;i<s->nb_streams;i++) {