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

mpv accesses private fields from AVFrame struct directly #3295

Closed
jamrial opened this issue Jun 29, 2016 · 4 comments
Closed

mpv accesses private fields from AVFrame struct directly #3295

jamrial opened this issue Jun 29, 2016 · 4 comments

Comments

@jamrial
Copy link

jamrial commented Jun 29, 2016

git head commit e40851e, https://github.com/mpv-player/mpv/blob/master/audio/audio.c#L351 and https://github.com/mpv-player/mpv/blob/master/audio/audio.c#L352 and https://github.com/mpv-player/mpv/blob/master/audio/audio.c#L414 should be using av_frame_get_channels(avframe) instead as stated in the field's doxy.

This apparently broke mpv audio playback as reported in https://trac.ffmpeg.org/ticket/5676 if you compile mpv using ffmpeg 3.0 shared libraries but use ffmpeg 3.1 shared libraries at runtime, since avframe->channels has a different offset (A new public field was added above it).

I didn't check if there are other similar usage of fields marked as no direct access.

@ghost
Copy link

ghost commented Jun 29, 2016

No, this would be incompatible with Libav. Please make ffmpeg eat their own dumb bullshit.

@ghost ghost closed this as completed Jun 29, 2016
@mpv-player mpv-player locked and limited conversation to collaborators Jun 29, 2016
@ghost
Copy link

ghost commented Jun 29, 2016

Actually that's not true but I still don't care.

@ghost
Copy link

ghost commented Jun 29, 2016

I realize now that the "affected" mpv source code only exists at all because the need to access the channels field (which doesn't exist in Libav) is a GOD DAMN API INCOMPATIBILITY to Libav. If any ffmpeg dev reads this: really guys, fix your own bugs.

@ghost
Copy link

ghost commented Jul 24, 2016

Fixed via dcfde29.

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant