History

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.

Andreas Rheinhardt committed 1 year ago

Commit 52d766e1 parent 1479c2e1 file · +2 −1Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/vdpau.c+2−1
@@ -28,7 +28,6 @@ · 27 unmodified lines
28#include "decode.h"28#include "decode.h"
29#include "hwaccel_internal.h"29#include "hwaccel_internal.h"
30#include "internal.h"30#include "internal.h"
31#include "mpegvideodec.h"
32#include "vdpau.h"31#include "vdpau.h"
33#include "vdpau_internal.h"32#include "vdpau_internal.h"
34 33
@@ -353,6 +352,8 @@ int ff_vdpau_common_end_frame(AVCodecContext *avctx, AVFrame *frame, · 318 unmodified lines
353#if CONFIG_MPEG1_VDPAU_HWACCEL || \352#if CONFIG_MPEG1_VDPAU_HWACCEL || \
354 CONFIG_MPEG2_VDPAU_HWACCEL || CONFIG_MPEG4_VDPAU_HWACCEL || \353 CONFIG_MPEG2_VDPAU_HWACCEL || CONFIG_MPEG4_VDPAU_HWACCEL || \
355 CONFIG_VC1_VDPAU_HWACCEL || CONFIG_WMV3_VDPAU_HWACCEL354 CONFIG_VC1_VDPAU_HWACCEL || CONFIG_WMV3_VDPAU_HWACCEL
355#include "mpegvideodec.h"
356
356int ff_vdpau_mpeg_end_frame(AVCodecContext *avctx)357int ff_vdpau_mpeg_end_frame(AVCodecContext *avctx)
357{358{
358 MpegEncContext *s = avctx->priv_data;359 MpegEncContext *s = avctx->priv_data;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t