-
Notifications
You must be signed in to change notification settings - Fork 277
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
WIP: Patches to let libopenshot compile with ffmpeg version after 4.4 #670
base: develop
Are you sure you want to change the base?
WIP: Patches to let libopenshot compile with ffmpeg version after 4.4 #670
Conversation
This is a work in progress. The export of the audio is still broken which started on June 18 with the removal of deprecated call in ffmpeg.
Codecov Report
@@ Coverage Diff @@
## develop #670 +/- ##
========================================
Coverage 50.41% 50.41%
========================================
Files 155 155
Lines 13315 13315
========================================
Hits 6713 6713
Misses 6602 6602
Continue to review full report at Codecov.
|
Merge conflicts have been detected on this PR, please resolve. |
Merge conflicts have been detected on this PR, please resolve. |
Merge conflicts have been detected on this PR, please resolve. |
src/FFmpegWriter.cpp
Outdated
#if IS_FFMPEG_4_4 | ||
pkt.size = sizeof(AVFrame); | ||
#else | ||
pkt.size = sizeof(AVPicture); | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hah! Well, crap. I only just noticed that this 4-month-old comment was still "Pending", and only visible to me! Whoops. Sorry about that.
Instead of directly setting packet.size
, should this be using av_packet_from_data(&pkt, buffer, size)
?
Or, in the cases where the data isn't in an av_malloc()
'd buffer
like _from_data()
requires (i.e. audio), at the very least an av_new_packet(&pkt, size)
followed by a memcpy()
?
av_init_packet()
has now been deprecated, a change that was formally made only recently... but in part, it's been deprecated because there have been better replacements for a very long time. Both av_new_packet()
and av_packet_from_data()
were available as far back as FFmpeg 2.4. So, we could switch our existing code away from it for all FFmpeg versions, not just 4.4+.
...Ultimately that's what I ended up doing in #784, since av_packet_from_data
has "always" (as far as we're concerned) been available. So now we just leave it to avcodec (or is it avformat? avutil?) to figure out how to size things. I figure it should know best!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, no. That change was in #809.
This is a work in progress. The export of the audio is still broken
which started on June 18 with the removal of deprecated call in
ffmpeg.