summaryrefslogtreecommitdiff
path: root/chromium/third_party/ffmpeg/libavcodec/diracdec.c
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/ffmpeg/libavcodec/diracdec.c')
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/diracdec.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/chromium/third_party/ffmpeg/libavcodec/diracdec.c b/chromium/third_party/ffmpeg/libavcodec/diracdec.c
index a5bb6d5f344..7b9e0099dfc 100644
--- a/chromium/third_party/ffmpeg/libavcodec/diracdec.c
+++ b/chromium/third_party/ffmpeg/libavcodec/diracdec.c
@@ -1433,8 +1433,8 @@ static void global_mv(DiracContext *s, DiracBlock *block, int x, int y, int ref)
int *c = s->globalmc[ref].perspective;
int64_t m = (1<<ep) - (c[0]*(int64_t)x + c[1]*(int64_t)y);
- int64_t mx = m * (int64_t)((A[0][0] * (int64_t)x + A[0][1]*(int64_t)y) + (1<<ez) * b[0]);
- int64_t my = m * (int64_t)((A[1][0] * (int64_t)x + A[1][1]*(int64_t)y) + (1<<ez) * b[1]);
+ int64_t mx = m * (int64_t)((A[0][0] * (int64_t)x + A[0][1]*(int64_t)y) + (1LL<<ez) * b[0]);
+ int64_t my = m * (int64_t)((A[1][0] * (int64_t)x + A[1][1]*(int64_t)y) + (1LL<<ez) * b[1]);
block->u.mv[ref][0] = (mx + (1<<(ez+ep))) >> (ez+ep);
block->u.mv[ref][1] = (my + (1<<(ez+ep))) >> (ez+ep);
@@ -1551,6 +1551,11 @@ static int dirac_unpack_block_motion_data(DiracContext *s)
}
}
+ for (i = 0; i < 4 + 2*s->num_refs; i++) {
+ if (arith[i].error)
+ return arith[i].error;
+ }
+
return 0;
}