1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-23 15:22:09 +00:00
mpv/fmt-conversion.h
Uoti Urpala 977116a0ca fmt-conversion.h: fix pixfmt.h #include; fixes latest Libav
Change fmt-conversion.h to include <libavutil/pixfmt.h> instead of
<libavutil/avutil.h> which no longer indirectly includes the former.
This fixes compilation with latest Libav. Also remove superfluous
config.h #include.

The pixfmt.h #include is needed for 'enum PixelFormat'. avutil.h
already stopped including pixfmt.h more than a year ago, but that did
not cause visible breakage at the time. AFAIK the C standard does not
allow incomplete enum types, but it seems that GCC and other relevant
compilers accept function declarations using not-yet-defined enum
types without warnings. However, Libav now renamed 'enum PixelFormat'
to 'enum AVPixelFormat', adding a '#define PixelFormat AVPixelFormat'
for backwards compatibility. We need this compatibility define because
we're still using the PixelFormat name, but it of course does not work
if pixfmt.h is not included; thus the missing include now caused a
compilation failure.
2012-10-14 21:27:02 +02:00

28 lines
969 B
C

/*
* This file is part of MPlayer.
*
* MPlayer is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* MPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with MPlayer; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef MPLAYER_FMT_CONVERSION_H
#define MPLAYER_FMT_CONVERSION_H
#include <libavutil/pixfmt.h>
enum PixelFormat imgfmt2pixfmt(int fmt);
int pixfmt2imgfmt(enum PixelFormat pix_fmt);
#endif /* MPLAYER_FMT_CONVERSION_H */