This code looks clumsy, and an assert would probably be more welcome.
Unified · Split
| @@ -155,7 +155,7 @@ static int denoise_depth(HQDN3DContext *s, · 154 unmodified lines | ||
| 155 | 155 | |
| 156 | 156 | #define denoise(...) \ |
| 157 | 157 | do { \ |
| 158 | − int ret = AVERROR_INVALIDDATA; \ | |
| 158 | + int ret = AVERROR_BUG; \ | |
| 159 | 159 | switch (s->depth) { \ |
| 160 | 160 | case 8: ret = denoise_depth(__VA_ARGS__, 8); break; \ |
| 161 | 161 | case 9: ret = denoise_depth(__VA_ARGS__, 9); break; \ |