Commit 1a24c916 authored by Gwenole Beauchesne's avatar Gwenole Beauchesne Committed by Austin Yuan

Fix build of vainfo.

commit f8aebf54e0d6b2411cb495f9fab71dc8a05c245c
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
Date:   Thu Jun 25 14:06:38 2009 +0000

    Further fixes to vainfo: use strrchr() instead of rindex(), make
    profile_string() and entrypoint_string() always return a value.

commit 4e6d19d5588998b5a9da30500ce727410b5787ef
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
Date:   Wed Jun 24 12:43:55 2009 +0000

    Fix vainfo error messages.
Signed-off-by: default avatarAustin Yuan <shengquan.yuan@intel.com>
parent 7dcb5b1c
......@@ -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)
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment