-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
mod_av: avformat.c lines 458-459 reference private field within AVOutputFormat #2202
Comments
We did video testing/recording and had no issues with this patch for now. |
With FreeSWITCH v1.10.11, this patch does not solve the whole problem, compiling mod_av also throws the following errors (because warnings are treated as errors while compiling FreeSWITCH):
|
yes I got same error
|
how can i get around this error? would I configure to compile against an earlier version of ffmpeg? how would i do that? |
At the moment, you would need an earlier version of ffmpeg |
So I seem to have fixed errors and deprecation warnings when compiling against ffmpeg7, however... I am not certain what the appropriate calculation would be for
|
@FlyingRain what version of ffmpeg are you trying to build against? That patch was made for ffmpeg 7.0, some of the version detection might be a little inaccurate compared to when things were deprecated. |
yeh i ignored the version of ffmpeg.question had been resolved,i modify the deprecated param depend on your patch.Thanks ! |
@FlyingRain you never mentioned which version of ffmpeg you are using, or what you changed the |
Sorry for the noise from an unrelated project. 😅 |
@Green-Sky oh, silly me, I didn't realize that pull request was for qTox not freeswitch, my bad 🤣 |
The following code is apparently referencing a private field within the
AVOutputFormat
structure of libavformat, which is described as "[not] part of the public API", "may not be used outside of libavformat" and "can be changed and removed at will":freeswitch/src/mod/applications/mod_av/avformat.c
Line 458 in b74245d
freeswitch/src/mod/applications/mod_av/avformat.c
Line 459 in b74245d
As described here:
https://github.com/FFmpeg/FFmpeg/blob/566aa38d98f5f492995127e82ab9a516f59bf952/libavformat/avformat.h#L540
mod_av, as-is, causes the following error when building against FFmpeg 6.0, as this field has apparently been removed from FFmpeg 6.0:
With the following patch, everything seems to build correctly:
What is the purpose of referencing the
priv_data_size
field within theAVOutputFormat
structure, and can this be averted? Can this specific conditional block be safely removed by package maintainers such as myself, as in the above patch, or will it cause some form of runtime issues or undefined behavior? I have attempted to examine this code and have not quite determined the purpose it serves.. It seems as if it is allocating the number of bytes its value indicates to thepriv_data
field of the allocatedAVFormatContext
object and then thepriv_data
pointer is assigned to thepriv_class
object within theAVOutputFormat
structure, thenav_opt_set_defaults()
is called on thepriv_data
pointer if thepriv_class
object exists...Can someone help me determine the purpose of this and assist in developing a patch and/or pull request that would fix this?
The text was updated successfully, but these errors were encountered: