Merge commit 'e7cd53bf662a93330810981f1d057bdf2ead669e'
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 1 Apr 2014 01:37:02 +0000 (03:37 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 1 Apr 2014 01:37:27 +0000 (03:37 +0200)
* commit 'e7cd53bf662a93330810981f1d057bdf2ead669e':
  sgi: check maximum supported resolution

Conflicts:
libavcodec/sgienc.c

See: 59352cc219c4f933c9a83b45043ec4810c2a51ee
Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/sgienc.c

  static av_cold int encode_init(AVCodecContext *avctx)
  {
      if (avctx->width > 65535 || avctx->height > 65535) {
-         return -1;
+         av_log(avctx, AV_LOG_ERROR,
+                "Unsupported resolution %dx%d.\n", avctx->width, avctx->height);
 +        av_log(avctx, AV_LOG_ERROR, "SGI does not support resolutions above 65535x65535\n");
+         return AVERROR_INVALIDDATA;
      }
      avctx->coded_frame = av_frame_alloc();
      if (!avctx->coded_frame)
          return AVERROR(ENOMEM);