summaryrefslogtreecommitdiff
path: root/wrapper
diff options
context:
space:
mode:
Diffstat (limited to 'wrapper')
-rw-r--r--wrapper/XvMCWrapper.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/wrapper/XvMCWrapper.c b/wrapper/XvMCWrapper.c
index 7a07634..35c74ee 100644
--- a/wrapper/XvMCWrapper.c
+++ b/wrapper/XvMCWrapper.c
@@ -222,13 +222,14 @@ dlopenversion(const char *lib, const char *version, int flag)
void *ret;
int curLen, verLen;
char *curName;
- const char *tail;
curLen = strlen(lib) + (verLen = strlen(version)) + 1;
curName = (char *) malloc(curLen * sizeof(char));
strncpy(curName, lib, curLen);
if (verLen > 1) {
- if (NULL != (tail = strstr(version + 1, "."))) {
+ const char *tail = strstr(version + 1, ".");
+
+ if (NULL != tail) {
strncat(curName, version, tail - version);
}
else {
@@ -279,13 +280,9 @@ initW(Display *dpy, XvPortID port)
{
char nameBuffer[BUFLEN];
void *handle;
- int tmp;
char *clientName = NULL;
char *err;
- FILE *configFile;
int nameLen = 0;
- int major, minor, patchLevel, isLocal;
- char *busID = NULL;
wrapperInit = 1;
xW.initialised = 0;
@@ -302,6 +299,9 @@ initW(Display *dpy, XvPortID port)
dlsym(handle2, "XvMCGetDRInfo");
if ((err = dlerror()) == NULL) {
+ int major, minor, patchLevel, isLocal;
+ char *busID = NULL;
+
if (0 == xW.XvMCGetDRInfo(dpy, port, &clientName, &busID, &major,
&minor, &patchLevel, &isLocal)) {
nameLen = strlen(clientName);
@@ -332,6 +332,9 @@ initW(Display *dpy, XvPortID port)
* No. Try to obtain it from the config file.
*/
+ int tmp;
+ FILE *configFile;
+
if (clientName)
XFree(clientName);