-
Notifications
You must be signed in to change notification settings - Fork 3k
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
demux: remove AVPacket global side data injection #15403
Merged
kasper93
merged 3 commits into
mpv-player:master
from
jeeb:remove_avpacket_global_side_data_injection
Dec 2, 2024
Merged
demux: remove AVPacket global side data injection #15403
kasper93
merged 3 commits into
mpv-player:master
from
jeeb:remove_avpacket_global_side_data_injection
Dec 2, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Download the artifacts for this pull request: |
Alternatively we could add either the dovi buffer or array of AVPacketSideData into |
kasper93
reviewed
Nov 29, 2024
kasper93
reviewed
Nov 29, 2024
fbb8a2e
to
4cdba32
Compare
kasper93
reviewed
Nov 30, 2024
kasper93
reviewed
Nov 30, 2024
This process has been deprecated since avformat 60.15.100 and since avcodec 60.30.101 AV_PKT_DATA_DOVI_CONF has been read from AVCodecContext's coded_side_data. Additionally, the HEVC decoder is the only one which currently reads this side data from packets, the native AV1 decoder as well as the libdav1d wrapper instead only support the newer propagation method via codec context's side data. How this currently is supposed to propagate is: * demux_lavf copies the codec parameters into sh_stream's lav_codecpar. * {ad,sd,vd}_lavc call mp_set_avctx_codec_headers that calls avcodec_parameters_to_context, which then sets global side data to the codec context. As this logic is already in place, so no additional changes are required for things to work and the deprecated function call can just be cleaned up. Ref: FFmpeg/FFmpeg@5432d2a Ref: FFmpeg/FFmpeg@804be7f Ref: FFmpeg/FFmpeg@12e5116
The first AVPacket method has been deprecated in FFmpeg, and only the HEVC decoder would read this information from there. The native AV1 decoder as well as the libdav1d wrapper only support the newer propagation method via codec context's side data. {ad,sd,vd}_lavc call mp_set_avctx_codec_headers which copies the side data from codecpar to codec context, so no changes are required on the receiving end.
Was already being utilized by demux_raw, and now also created in demux_mkv.
4cdba32
to
5cad2ee
Compare
kasper93
approved these changes
Dec 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This process has been deprecated since avformat 60.15.100 and
since avcodec 60.30.101 AV_PKT_DATA_DOVI_CONF has been read from
AVCodecContext's coded_side_data. Additionally, the HEVC decoder
is the only one which currently reads this side data from packets,
the native AV1 decoder as well as the libdav1d wrapper instead only
support the newer propagation method via codec context's side data.
How this currently is supposed to propagate is:
avcodec_parameters_to_context, which then sets global side data
to the codec context.
As this logic is already in place, so no additional changes are required
for things to work and the deprecated function call can just be
cleaned up.
Ref: FFmpeg/FFmpeg@5432d2a
Ref: FFmpeg/FFmpeg@804be7f
Ref: FFmpeg/FFmpeg@12e5116