Browse code

avfilter/hqdn3d: an invalid bit depth means a bug, not invalid read data

This code looks clumsy, and an assert would probably be more welcome.

Clément Bœsch authored on 2015/02/09 01:16:21
Showing 1 changed files
... ...
@@ -155,7 +155,7 @@ static int denoise_depth(HQDN3DContext *s,
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;             \