Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ibavcodec/libx264.c:262:9: error: ‘x264_bit_depth’ undeclared (first use in this function) #96

Open
iqbal-h opened this issue Feb 20, 2022 · 2 comments

Comments

@iqbal-h
Copy link

iqbal-h commented Feb 20, 2022

I am trying to set up gaming anywhere. I followed the following steps:

  1. cloned the latest gamingAnywhere package from GitHub
  2. Followed the instructions https://gaminganywhere.org/doc/quick_start.html for Linux

When I run make in deps.src, I get the following error. Please help fix this. Thanks.

libavcodec/libx264.c:262:9: error: ‘x264_bit_depth’ undeclared (first use in this function)
262 | if (x264_bit_depth > 8)
| ^~~~~~~~~~~~~~
libavcodec/libx264.c:262:9: note: each undeclared identifier is reported only once for each function it appears in
libavcodec/libx264.c: In function ‘X264_init’:
libavcodec/libx264.c:705:32: warning: the address of ‘val’ will always evaluate as ‘true’ [-Waddress]
705 | OPT_STR(param, val);
| ^~~
libavcodec/libx264.c:349:13: note: in definition of macro ‘OPT_STR’
349 | if (param && (ret = x264_param_parse(&x4->params, opt, param)) < 0) {
| ^~~~~
libavcodec/libx264.c: In function ‘X264_init_static’:
libavcodec/libx264.c:806:9: error: ‘x264_bit_depth’ undeclared (first use in this function)
806 | if (x264_bit_depth == 8)
| ^~~~~~~~~~~~~~
In file included from ./libavutil/common.h:463,
from ./libavutil/avutil.h:288,
from ./libavutil/samplefmt.h:24,
from libavcodec/avcodec.h:31,
from libavcodec/lsp.c:26:
./libavutil/mem.h:185:1: warning: ‘alloc_size’ attribute ignored on a function returning ‘int’ [-Wattributes]
185 | av_alloc_size(2, 3) int av_reallocp_array(void *ptr, size_t nmemb, size_t size);
| ^~~~~~~~~~~~~
make[1]: *** [common.mak:57: libavcodec/libx264.o] Error 1
make[1]: *** Waiting for unfinished jobs....
CC libavcodec/lzw.o
In file included from ./libavutil/common.h:463,
from ./libavutil/avutil.h:288,
from ./libavutil/samplefmt.h:24,
from libavcodec/avcodec.h:31,
from libavcodec/lzw.c:30:
./libavutil/mem.h:185:1: warning: ‘alloc_size’ attribute ignored on a function returning ‘int’ [-Wattributes]
185 | av_alloc_size(2, 3) int av_reallocp_array(void *ptr, size_t nmemb, size_t size);
| ^~~~~~~~~~~~~
make[1]: Leaving directory '/home/main/projects/cg/gaminganywhere/deps.src/ffmpeg-2.8.8'
make: *** [Makefile:149: ffmpeg] Error 2

@lrq619
Copy link

lrq619 commented May 31, 2022

I met the same error, does anyone know how to solve it?

@stillbanbo
Copy link

You can try:

  1. Replace "x264_bit_depth" with "X264_BIT_DEPTH" in your ffmpeg-2.8.8/libx264.c file.
  2. Then retar the ffmpeg package with command: tar -cjf ffmpeg-2.8.8.tar.bz2 ffmpeg-2.8.8
  3. sudo make

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants