Skip to content

Commit 9f697ed

Browse files
committedMay 10, 2019
Fix disposal method issue
1 parent d199ea7 commit 9f697ed

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎libavcodec/gif.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ static void gif_crop_translucent(AVCodecContext *avctx,
191191

192192
*height = y_end + 1 - *y_start;
193193
*width = x_end + 1 - *x_start;
194+
194195
av_log(avctx, AV_LOG_DEBUG,"%dx%d image at pos (%d;%d) [area:%dx%d]\n",
195196
*width, *height, *x_start, *y_start, avctx->width, avctx->height);
196197
}
@@ -267,7 +268,7 @@ static int gif_image_write_image(AVCodecContext *avctx,
267268
int bcid = -1, honor_transparency = (s->flags & GF_TRANSDIFF) && s->last_frame && !palette;
268269
const uint8_t *ptr;
269270

270-
if (!s->image && avctx->frame_number && is_image_translucent(avctx, buf, linesize)) {
271+
if (!s->image && is_image_translucent(avctx, buf, linesize)) {
271272
gif_crop_translucent(avctx, buf, linesize, &width, &height, &x_start, &y_start);
272273
honor_transparency = 0;
273274
disposal = GCE_DISPOSAL_BACKGROUND;

0 commit comments

Comments
 (0)