summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Bradshaw <mbradshaw@sorensonmedia.com>2012-01-17 11:47:08 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2012-01-17 11:47:08 +0100
commit0abe25aa7bfa017a18832c6d4b0f59e4fd18f7d5 (patch)
treeaaaa7f18af65a7872cb0c3a484c6a32d51223963 /libavcodec
parentee33eb40fc007fe354d381d253625157aa73c525 (diff)
libopenjpegenc: Add error messages.
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/libopenjpegenc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/libopenjpegenc.c b/libavcodec/libopenjpegenc.c
index f91689460a..154409db70 100644
--- a/libavcodec/libopenjpegenc.c
+++ b/libavcodec/libopenjpegenc.c
@@ -207,6 +207,7 @@ static int libopenjpeg_copy_packed8(AVCodecContext *avctx, AVFrame *frame, opj_i
for (compno = 0; compno < numcomps; ++compno) {
if (image->comps[compno].w > frame->linesize[0] / numcomps) {
+ av_log(avctx, AV_LOG_ERROR, "Error: frame's linesize is too small for the image\n");
return 0;
}
}
@@ -233,6 +234,7 @@ static int libopenjpeg_copy_packed16(AVCodecContext *avctx, AVFrame *frame, opj_
for (compno = 0; compno < numcomps; ++compno) {
if (image->comps[compno].w > frame->linesize[0] / numcomps) {
+ av_log(avctx, AV_LOG_ERROR, "Error: frame's linesize is too small for the image\n");
return 0;
}
}
@@ -259,6 +261,7 @@ static int libopenjpeg_copy_unpacked8(AVCodecContext *avctx, AVFrame *frame, opj
for (compno = 0; compno < numcomps; ++compno) {
if (image->comps[compno].w > frame->linesize[compno]) {
+ av_log(avctx, AV_LOG_ERROR, "Error: frame's linesize is too small for the image\n");
return 0;
}
}
@@ -288,6 +291,7 @@ static int libopenjpeg_copy_unpacked16(AVCodecContext *avctx, AVFrame *frame, op
for (compno = 0; compno < numcomps; ++compno) {
if (image->comps[compno].w > frame->linesize[compno]) {
+ av_log(avctx, AV_LOG_ERROR, "Error: frame's linesize is too small for the image\n");
return 0;
}
}