summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/pngdec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index 16c4c3a283..3c00007907 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -1044,7 +1044,9 @@ static void handle_p_frame_png(PNGDecContext *s, AVFrame *p)
int i, j;
uint8_t *pd = p->data[0];
uint8_t *pd_last = s->last_picture.f->data[0];
- int ls = FFMIN(av_image_get_linesize(p->format, s->width, 0), s->width * s->bpp);
+ int ls = av_image_get_linesize(p->format, s->width, 0);
+
+ ls = FFMIN(ls, s->width * s->bpp);
ff_thread_await_progress(&s->last_picture, INT_MAX, 0);
for (j = 0; j < s->height; j++) {