Commit 78f52b4f authored by James Almer's avatar James Almer

avformat/rmdec.c: fix left shift of negative value in rm_sync()

Fixes ticket 8143.
Reviewed-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent 5a9560df
...@@ -724,8 +724,8 @@ static int rm_sync(AVFormatContext *s, int64_t *timestamp, int *flags, int *stre ...@@ -724,8 +724,8 @@ static int rm_sync(AVFormatContext *s, int64_t *timestamp, int *flags, int *stre
num = avio_rb16(pb); num = avio_rb16(pb);
*timestamp = avio_rb32(pb); *timestamp = avio_rb32(pb);
mlti_id = (avio_r8(pb)>>1)-1<<16; mlti_id = avio_r8((pb) >> 1) - 1;
mlti_id = FFMAX(mlti_id, 0); mlti_id = FFMAX(mlti_id, 0) << 16;
*flags = avio_r8(pb); /* flags */ *flags = avio_r8(pb); /* flags */
} }
for(i=0;i<s->nb_streams;i++) { for(i=0;i<s->nb_streams;i++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment