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

mpegts.c: sample_fmts is deprecated, -Werror in CMakeLists.txt #216

Open
summrum opened this issue Jan 12, 2025 · 0 comments
Open

mpegts.c: sample_fmts is deprecated, -Werror in CMakeLists.txt #216

summrum opened this issue Jan 12, 2025 · 0 comments

Comments

@summrum
Copy link

summrum commented Jan 12, 2025

Hi, I have just tried to build picam using ffmpeg.git on a Raspberry Pi 4 running 64 bit Raspberry Pi OS (up to date as of today, 12/01/2025). Ran in to the following error:

/home/summrum/picam/mpegts/mpegts.c: In function ‘is_sample_fmt_supported’: 
/home/summrum/picam/mpegts/mpegts.c:46:14: error: ‘sample_fmts’ is deprecated [-Werror=deprecated-declarations]
   46 |   const enum AVSampleFormat *p = codec->sample_fmts;
      |              ^~~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
cc1: all warnings being treated as errors

Removing -Werror from CMakeLists.txt allows the build to proceed, so I have a working picam executable.

I had a look at the ffmpeg documentation to try and update the mpegts.c file and it looks like avcodec_get_supported_config() is the replacement for getting codec capabilities; I tried modifying using the information given on that link and this section of the avcodec source but I don't understand C/C++ and every variation I have tried thus far leads to failed compilation.

Thank you.

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

1 participant