[FFmpeg-cvslog] avcodec/vdpau: Only include mpegvideodec.h when used
Andreas Rheinhardt
git at videolan.org
Thu Apr 3 07:29:11 EEST 2025
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Mon Mar 31 21:27:29 2025 +0200| [52d766e5c271a5cee4d4a3715ee1694591107ce3] | committer: Andreas Rheinhardt
avcodec/vdpau: Only include mpegvideodec.h when used
mpegvideodec.h includes mpegvideodata.h which in turn contains
a "static const uint8_t *const ff_mpeg1_dc_scale_table =
ff_mpeg12_dc_scale_table[0]"; yet if mpegvideo is disabled,
ff_mpeg12_dc_scale_table is not available, yet a non-optimizing
compiler (like GCC with -O0) may emit ff_mpeg1_dc_scale_table
and therefore a reference to ff_mpeg12_dc_scale_table nevertheless.
Fix this by only including mpegvideodec.h if it is needed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=52d766e5c271a5cee4d4a3715ee1694591107ce3
---
libavcodec/vdpau.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c
index 23c2e3a55d..e99ac5338d 100644
--- a/libavcodec/vdpau.c
+++ b/libavcodec/vdpau.c
@@ -28,7 +28,6 @@
#include "decode.h"
#include "hwaccel_internal.h"
#include "internal.h"
-#include "mpegvideodec.h"
#include "vdpau.h"
#include "vdpau_internal.h"
@@ -353,6 +352,8 @@ int ff_vdpau_common_end_frame(AVCodecContext *avctx, AVFrame *frame,
#if CONFIG_MPEG1_VDPAU_HWACCEL || \
CONFIG_MPEG2_VDPAU_HWACCEL || CONFIG_MPEG4_VDPAU_HWACCEL || \
CONFIG_VC1_VDPAU_HWACCEL || CONFIG_WMV3_VDPAU_HWACCEL
+#include "mpegvideodec.h"
+
int ff_vdpau_mpeg_end_frame(AVCodecContext *avctx)
{
MpegEncContext *s = avctx->priv_data;
More information about the ffmpeg-cvslog
mailing list