diff --git a/libavcodec/dct-test.c b/libavcodec/dct-test.c
index 16b750c0d3bd8b85c38252587fac26df79a835c4..0e4684bd9b92ff648f2b67d076c56033a63c5fa1 100644
--- a/libavcodec/dct-test.c
+++ b/libavcodec/dct-test.c
@@ -461,7 +461,6 @@ void help(void)
            "            2 -> do 3. test from mpeg4 std\n"
            "-i          test IDCT implementations\n"
            "-4          test IDCT248 implementations\n");
-    exit(1);
 }
 
 int main(int argc, char **argv)
@@ -493,7 +492,7 @@ int main(int argc, char **argv)
         default :
         case 'h':
             help();
-            break;
+            return 0;
         }
     }