1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

avcodec/dpx: return different error code for unsupported depths

Also give better message in such cases.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
Paul B Mahol 2013-10-07 09:10:00 +00:00
parent ad934bc353
commit 62078f25ee

View File

@ -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;
}