diff options
-rw-r--r-- | test/Makefile.am | 2 | ||||
-rw-r--r-- | test/vainfo.c | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/test/Makefile.am b/test/Makefile.am index 37b3f06..6554962 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -23,7 +23,7 @@ check_PROGRAMS = test_01 test_02 test_03 test_04 test_05 test_06 \ test_07 test_08 test_09 test_10 test_11 test_12 -bin_PROGRAMS = +bin_PROGRAMS = vainfo testdir = $(bindir) diff --git a/test/vainfo.c b/test/vainfo.c index a886815..ed05881 100644 --- a/test/vainfo.c +++ b/test/vainfo.c @@ -22,7 +22,7 @@ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include <X11/va_x11.h> +#include <va_x11.h> #include <stdarg.h> #include <stdio.h> @@ -32,7 +32,7 @@ #define CHECK_VASTATUS(va_status,func, ret) \ if (va_status != VA_STATUS_SUCCESS) { \ - fprintf(stderr,"%s failed with error code %d (%s),exit\n",func, vaErrorStr(va_status)); \ + fprintf(stderr,"%s failed with error code %d (%s),exit\n",func, va_status, vaErrorStr(va_status)); \ exit(ret); \ } @@ -52,6 +52,7 @@ static char * profile_string(VAProfile profile) case VAProfileVC1Advanced: return "VAProfileVC1Advanced"; case VAProfileH263Baseline: return "VAProfileH263Baseline"; } + return "<unknown profile>"; } @@ -65,6 +66,7 @@ static char * entrypoint_string(VAEntrypoint entrypoint) case VAEntrypointDeblocking:return "VAEntrypointDeblocking"; case VAEntrypointEncSlice:return "VAEntrypointEncSlice"; } + return "<unknown entrypoint>"; } int main(int argc, const char* argv[]) @@ -75,7 +77,7 @@ int main(int argc, const char* argv[]) int major_version, minor_version; const char *driver; const char *display = getenv("DISPLAY"); - const char *name = rindex(argv[0], '/'); + const char *name = strrchr(argv[0], '/'); VAProfile profile; VAEntrypoint entrypoint, entrypoints[10]; int num_entrypoint; |