Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2013-04-18 17:29:44 +0400
committerClément Bœsch <ubitux@gmail.com>2013-04-18 17:30:02 +0400
commit90a56ebbe586f659ca33292e1a915cc66dff47ff (patch)
tree24d1f33bc76d839e49257d3dd1811e247bab4c8d /libavcodec/gif.c
parent9db1c6455e47e4deb7e584642f06276e9ecf833d (diff)
lavc/gif: avoid encoding 0x0 images.
It seems browsers don't like it very much.
Diffstat (limited to 'libavcodec/gif.c')
-rw-r--r--libavcodec/gif.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/gif.c b/libavcodec/gif.c
index f30297b5f8..b35cfd1b46 100644
--- a/libavcodec/gif.c
+++ b/libavcodec/gif.c
@@ -87,7 +87,7 @@ static int gif_image_write_image(AVCodecContext *avctx,
y_end = avctx->height - 1;
/* skip common lines */
- while (y_start < height) {
+ while (y_start < y_end) {
if (memcmp(ref + y_start*ref_linesize, buf + y_start*linesize, width))
break;
y_start++;
@@ -100,7 +100,7 @@ static int gif_image_write_image(AVCodecContext *avctx,
height = y_end + 1 - y_start;
/* skip common columns */
- while (x_start < width) {
+ while (x_start < x_end) {
int same_column = 1;
for (y = y_start; y < y_end; y++) {
if (ref[y*ref_linesize + x_start] != buf[y*linesize + x_start]) {