@@ -34,6 +34,7 @@
#include "avcodec.h"
#include "mpegvideo.h"
#include "mpeg12.h"
+#include "mpeg12codecs.h"
#include "mpeg12data.h"
#include "mpeg12dec.h"
#include "startcode.h"
@@ -22,7 +22,7 @@
#ifndef AVCODEC_MPEG12_H
#define AVCODEC_MPEG12_H
-#include "mpegvideo.h"
+#include "libavutil/rational.h"
/* Start codes. */
#define SEQ_END_CODE 0x000001b7
@@ -34,9 +34,13 @@
#define EXT_START_CODE 0x000001b5
#define USER_START_CODE 0x000001b2
-void ff_mpeg1_clean_buffers(MpegEncContext *s);
+#include "version_major.h"
#if FF_API_FLAG_TRUNCATED
-int ff_mpeg1_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size, AVCodecParserContext *s);
+#include <stdint.h>
+
+struct ParseContext;
+struct AVCodecParserContext;
+int ff_mpeg1_find_frame_end(struct ParseContext *pc, const uint8_t *buf, int buf_size, struct AVCodecParserContext *s);
#endif
void ff_mpeg12_find_best_frame_rate(AVRational frame_rate,
new file mode 100644
@@ -0,0 +1,29 @@
+/*
+ * MPEG-1/2 codecs common code
+ * Copyright (c) 2007 Aurelien Jacobs <aurel@gnuage.org>
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVCODEC_MPEG12CODECS_H
+#define AVCODEC_MPEG12CODECS_H
+
+#include "mpegvideo.h"
+
+void ff_mpeg1_clean_buffers(MpegEncContext *s);
+
+#endif /* AVCODEC_MPEG12CODECS_H */
@@ -47,6 +47,7 @@
#include "internal.h"
#include "mpeg_er.h"
#include "mpeg12.h"
+#include "mpeg12codecs.h"
#include "mpeg12data.h"
#include "mpeg12dec.h"
#include "mpegutils.h"
@@ -46,7 +46,7 @@
#include "dct.h"
#include "encode.h"
#include "idctdsp.h"
-#include "mpeg12.h"
+#include "mpeg12codecs.h"
#include "mpeg12data.h"
#include "mpeg12enc.h"
#include "mpegvideo.h"
@@ -16,6 +16,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <stddef.h>
+
+#include "libavutil/log.h"
#include "libavcodec/mpeg12.h"
#include "libavcodec/mpeg12data.h"
It allows to avoid including mpegvideo.h when including mpeg12.h. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavcodec/mpeg12.c | 1 + libavcodec/mpeg12.h | 10 +++++++--- libavcodec/mpeg12codecs.h | 29 +++++++++++++++++++++++++++++ libavcodec/mpeg12dec.c | 1 + libavcodec/mpegvideo_enc.c | 2 +- libavcodec/tests/mpeg12framerate.c | 3 +++ 6 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 libavcodec/mpeg12codecs.h