Skip to content

Commit

Permalink
Merge pull request #7 from Logarithmus/master
Browse files Browse the repository at this point in the history
Fix error: unknown type name "pthread_mutex_t"
  • Loading branch information
xtknight authored Jun 9, 2021
2 parents 257f9ca + e321b40 commit 4aaca67
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
3 changes: 3 additions & 0 deletions src/object_heap.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
#ifndef VA_OBJECT_HEAP_H
#define VA_OBJECT_HEAP_H

#include <sys/types.h>
#include <pthread.h>

#define OBJECT_HEAP_OFFSET_MASK 0x7f000000
#define OBJECT_HEAP_ID_MASK 0x00ffffff

Expand Down
16 changes: 10 additions & 6 deletions src/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,17 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/

#if __STDC_VERSION__ >= 199901L
#define _XOPEN_SOURCE 700
#else
#define _XOPEN_SOURCE 500
#endif /* __STDC_VERSION__ */

#include "sysdeps.h"
#include "utils.h"
#include <time.h>
#include <errno.h>
#include <sys/time.h>

#define DEBUG 1
#include "debug.h"
Expand Down Expand Up @@ -186,16 +193,13 @@ realloc_buffer(
// Lookup for substring NAME in string EXT using SEP as separators
int find_string(const char *name, const char *ext, const char *sep)
{
const char *end;
int name_len, n;

if (name == NULL || ext == NULL)
return 0;

end = ext + strlen(ext);
name_len = strlen(name);
const char *end = ext + strlen(ext);
int name_len = strlen(name);
while (ext < end) {
n = strcspn(ext, sep);
int n = strcspn(ext, sep);
if (n == name_len && strncmp(name, ext, n) == 0)
return 1;
ext += (n + 1);
Expand Down
3 changes: 3 additions & 0 deletions src/vdpau_mixer.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
#include "sysdeps.h"
#include "vdpau_mixer.h"
#include "vdpau_video.h"
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
#include <math.h>

#define VDPAU_MAX_VIDEO_MIXER_PARAMS 4
Expand Down
1 change: 1 addition & 0 deletions src/vdpau_video.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

#include "vdpau_driver.h"
#include "vdpau_decode.h"
#include <linux/videodev2.h>

typedef struct SubpictureAssociation *SubpictureAssociationP;
struct SubpictureAssociation {
Expand Down

0 comments on commit 4aaca67

Please sign in to comment.