- if (!height || height > s->screen_height || top >= s->screen_height) {
- av_log(s->avctx, AV_LOG_ERROR, "Invalid image height.\n");
+ if (!height || height > s->screen_height) {
+ av_log(s->avctx, AV_LOG_WARNING, "Invalid image height: %d, truncating.\n", height);
+ height = s->screen_height;
+ }
+ if (top >= s->screen_height) {
+ av_log(s->avctx, AV_LOG_ERROR, "Invalid top position: %d.\n", top);