[FFmpeg-cvslog] avcodec/dpx: return different error code for unsupported depths
Paul B Mahol
git at videolan.org
Mon Oct 7 11:13:43 CEST 2013
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Mon Oct 7 09:10:00 2013 +0000| [62078f25ee9a012b09eeea0940f3290cea4a653b] | committer: Paul B Mahol
avcodec/dpx: return different error code for unsupported depths
Also give better message in such cases.
Signed-off-by: Paul B Mahol <onemda at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=62078f25ee9a012b09eeea0940f3290cea4a653b
---
libavcodec/dpx.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libavcodec/dpx.c b/libavcodec/dpx.c
index 47906d7..1cfc258 100644
--- a/libavcodec/dpx.c
+++ b/libavcodec/dpx.c
@@ -193,8 +193,12 @@ static int decode_frame(AVCodecContext *avctx,
}
total_size = 2 * avctx->width * avctx->height * elements;
break;
+ case 1:
+ case 32:
+ case 64:
+ avpriv_report_missing_feature(avctx, "Depth %d", bits_per_color);
+ return AVERROR_PATCHWELCOME;
default:
- av_log(avctx, AV_LOG_ERROR, "Unsupported color depth : %d\n", bits_per_color);
return AVERROR_INVALIDDATA;
}
More information about the ffmpeg-cvslog
mailing list