diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index ee0b571..d169dc3 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -323,17 +323,26 @@ static int update_frame_pool(AVCodecContext *avctx, AVFrame *frame)
             pool->width == frame->width && pool->height == frame->height)
             return 0;
 
+        printf("frame %dx%d\n", frame->width, frame->height);
+
         avcodec_align_dimensions2(avctx, &w, &h, pool->stride_align);
 
+        printf("aligned %dx%d stride align %d-%d-%d\n", w, h,
+               pool->stride_align[0], pool->stride_align[1], pool->stride_align[2]);
+
         if (!(avctx->flags & CODEC_FLAG_EMU_EDGE)) {
             w += EDGE_WIDTH * 2;
             h += EDGE_WIDTH * 2;
         }
 
+        printf("with edge %dx%d\n", w, h);
+
         do {
             // NOTE: do not align linesizes individually, this breaks e.g. assumptions
             // that linesize[0] == 2*linesize[1] in the MPEG-encoder for 4:2:2
             av_image_fill_linesizes(picture.linesize, avctx->pix_fmt, w);
+            printf("strides for width %d: %d-%d-%d\n", w,
+                   picture.linesize[0], picture.linesize[1], picture.linesize[2]);
             // increase alignment of w for next try (rhs gives the lowest bit set in w)
             w += w & ~(w - 1);
 
@@ -351,6 +360,9 @@ static int update_frame_pool(AVCodecContext *avctx, AVFrame *frame)
             size[i] = picture.data[i + 1] - picture.data[i];
         size[i] = tmpsize - (picture.data[i] - picture.data[0]);
 
+        for (i = 0; i < 3; i++)
+                printf("data[%d] = %-8lu  size=%d\n", i, picture.data[i], size[i]);
+
         for (i = 0; i < 4; i++) {
             av_buffer_pool_uninit(&pool->pools[i]);
             pool->linesize[i] = picture.linesize[i];
