lavc/mjpegdec: use ptrdiff_t instead of ssize_t
authorMatthieu Bouron <matthieu.bouron@stupeflix.com>
Wed, 27 Jan 2016 20:59:14 +0000 (21:59 +0100)
committerMatthieu Bouron <matthieu.bouron@stupeflix.com>
Thu, 28 Jan 2016 08:25:59 +0000 (09:25 +0100)
Fixes build on msvc.

libavcodec/mjpegdec.c

index 0aedc9d..69c9cf3 100644 (file)
@@ -1925,7 +1925,7 @@ int ff_mjpeg_find_marker(MJpegDecodeContext *s,
         uint8_t *dst = s->buffer;
 
         #define copy_data_segment(skip) do {       \
-            ssize_t length = (ptr - src) - (skip); \
+            ptrdiff_t length = (ptr - src) - (skip);  \
             if (length > 0) {                         \
                 memcpy(dst, src, length);             \
                 dst += length;                        \
@@ -1941,7 +1941,7 @@ int ff_mjpeg_find_marker(MJpegDecodeContext *s,
                 uint8_t x = *(ptr++);
 
                 if (x == 0xff) {
-                    ssize_t skip = 0;
+                    ptrdiff_t skip = 0;
                     while (ptr < buf_end && x == 0xff) {
                         x = *(ptr++);
                         skip++;