aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mpeg12enc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-11-06 17:28:06 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-11-06 17:28:40 +0100
commit98d6f0ffef30d29708b3b719be56bc84b3738b89 (patch)
tree0395bc3cc60f07ad420c46fdc598bca2996ee614 /libavcodec/mpeg12enc.c
parentc96a44d0ddb063cf5c3d5b4fb2e46d3ca2309ba0 (diff)
parent37b3361e755361d4ff14a2973df001c0140d98d6 (diff)
downloadffmpeg-98d6f0ffef30d29708b3b719be56bc84b3738b89.tar.gz
Merge commit '37b3361e755361d4ff14a2973df001c0140d98d6'
* commit '37b3361e755361d4ff14a2973df001c0140d98d6': mpeg12enc: factor out check in encode_dc Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpeg12enc.c')
-rw-r--r--libavcodec/mpeg12enc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c
index 827812ef55..9795b7f648 100644
--- a/libavcodec/mpeg12enc.c
+++ b/libavcodec/mpeg12enc.c
@@ -606,7 +606,8 @@ static void mpeg1_encode_motion(MpegEncContext *s, int val, int f_or_b_code)
static inline void encode_dc(MpegEncContext *s, int diff, int component)
{
- if (((unsigned) (diff + 255)) >= 511) {
+ unsigned int diff_u = diff + 255;
+ if (diff_u >= 511) {
int index;
if (diff < 0) {