Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Added ability to call ogg_validate as library function #1

Open
wants to merge 1 commit into from

1 participant

@jberkel

So it can be integrated easily in other applications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 20, 2012
  1. @jberkel
This page is out of date. Refresh to see the latest.
Showing with 14 additions and 0 deletions.
  1. +8 −0 src/tools/oggz-validate.c
  2. +6 −0 src/tools/oggz-validate.h
View
8 src/tools/oggz-validate.c
@@ -47,6 +47,7 @@
#include "oggz/oggz.h"
#include "oggz_tools.h"
+#include "oggz-validate.h"
#define MAX_ERRORS 10
@@ -594,3 +595,10 @@ main (int argc, char ** argv)
exit_err:
exit (1);
}
+
+int validate_ogg(const char *filename) {
+ exit_status = 0;
+ max_errors = 0;
+ int ret = validate((char *)filename);
+ return exit_status != 0 ? exit_status : ret;
+}
View
6 src/tools/oggz-validate.h
@@ -0,0 +1,6 @@
+#ifndef __OGGZ_VALIDATE_H__
+#define __OGGZ_VALIDATE_H__
+
+int validate_ogg(const char *filename);
+
+#endif
Something went wrong with that request. Please try again.