Skip to content

Commit

Permalink
define own set of AV_PIX_FMT_* for libavutils older than (51,42,0)
Browse files Browse the repository at this point in the history
  • Loading branch information
i-rinat committed Jan 20, 2014
1 parent 7e06740 commit d215695
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/api-video-surface.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <GL/gl.h>
#include <GL/glu.h>
#include <libswscale/swscale.h>
#include "pixfmt_compat.h"
#include "shaders.h"
#include <stdlib.h>
#include <string.h>
Expand Down
24 changes: 24 additions & 0 deletions src/pixfmt_compat.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Copyright 2013 Rinat Ibragimov
*
* This file is part of libvdpau-va-gl
*
* libvdpau-va-gl is distributed under the terms of the LGPLv3. See COPYING for details.
*/

#ifndef VA_GL_SRC_PIXFMT_COMPAT_H
#define VA_GL_SRC_PIXFMT_COMPAT_H

#include <libavutil/pixfmt.h>

#if LIBAVUTIL_VERSION_INT < AV_VERSION_INT(51, 42, 0)

#define AV_PIX_FMT_NONE PIX_FMT_NONE
#define AV_PIX_FMT_NV12 PIX_FMT_NV12
#define AV_PIX_FMT_YUV420P PIX_FMT_YUV420P
#define AV_PIX_FMT_UYVY422 PIX_FMT_UYVY422
#define AV_PIX_FMT_YUYV422 PIX_FMT_YUYV422

#endif // old libavutil version

#endif // VA_GL_SRC_PIXFMT_COMPAT_H

0 comments on commit d215695

Please sign in to comment.