| ... | ... |
@@ -101,8 +101,10 @@ static av_cold int adx_encode_init(AVCodecContext *avctx) |
| 101 | 101 |
{
|
| 102 | 102 |
ADXContext *c = avctx->priv_data; |
| 103 | 103 |
|
| 104 |
- if (avctx->channels > 2) |
|
| 105 |
- return -1; |
|
| 104 |
+ if (avctx->channels > 2) {
|
|
| 105 |
+ av_log(avctx, AV_LOG_ERROR, "Invalid number of channels\n"); |
|
| 106 |
+ return AVERROR(EINVAL); |
|
| 107 |
+ } |
|
| 106 | 108 |
avctx->frame_size = 32; |
| 107 | 109 |
|
| 108 | 110 |
avctx->coded_frame = avcodec_alloc_frame(); |