Skip to content

WIP: Patches to let libopenshot compile with ffmpeg version after 4.4 - #670

Open
eisneinechse wants to merge 5 commits into
OpenShot:developfrom
eisneinechse:ffmpeg4_4_audio_export
Open

WIP: Patches to let libopenshot compile with ffmpeg version after 4.4#670
eisneinechse wants to merge 5 commits into
OpenShot:developfrom
eisneinechse:ffmpeg4_4_audio_export

Conversation

@eisneinechse

Copy link
Copy Markdown
Collaborator

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.

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

codecovBot commented May 2, 2021

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 50.41%. Comparing base (68f03b5) to head (fd6a016).
⚠️ Report is 887 commits behind head on develop.

Additional details and impacted files
@@ Coverage Diff @@## develop #670 +/- ##
========================================
Coverage 50.41% 50.41% ========================================
Files 155 155 Lines 13315 13315 ========================================
Hits 6713 6713 Misses 6602 6602 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

Copy link
Copy Markdown

Merge conflicts have been detected on this PR, please resolve.

@github-actionsgithub-actionsBot added the conflicts A PR with unresolved merge conflicts label Jun 5, 2021
@eisneinechseeisneinechse changed the title (WIP) Patches to let libopenshot compile with ffmpeg 4.4(WIP) Patches to let libopenshot compile with ffmpeg version after 4.4Jun 14, 2021
@github-actionsgithub-actionsBot added conflicts A PR with unresolved merge conflicts and removed conflicts A PR with unresolved merge conflicts labels Jun 25, 2021
@github-actions

Copy link
Copy Markdown

Merge conflicts have been detected on this PR, please resolve.

@ferdnycferdnyc added ffmpeg Issues or PRs involving the a/v processing code and removed conflicts A PR with unresolved merge conflicts labels Jul 3, 2021
@github-actionsgithub-actionsBot added the conflicts A PR with unresolved merge conflicts label Dec 2, 2021
@github-actions

Copy link
Copy Markdown

Merge conflicts have been detected on this PR, please resolve.

Comment threadsrc/FFmpegWriter.cpp Outdated
Comment on lines +2062 to +2066
#if IS_FFMPEG_4_4
pkt.size = sizeof(AVFrame);
#else
pkt.size = sizeof(AVPicture);
#endif

Copy link
Copy Markdown
Contributor

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!

Copy link
Copy Markdown
Contributor

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.

@jonoomphjonoomph changed the title (WIP) Patches to let libopenshot compile with ffmpeg version after 4.4WIP: Patches to let libopenshot compile with ffmpeg version after 4.4Jan 10, 2023
@eisneinechse

Copy link
Copy Markdown
CollaboratorAuthor

Was already resolved by another patch

1 similar comment
@eisneinechse

Copy link
Copy Markdown
CollaboratorAuthor

Was already resolved by another patch

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conflictsA PR with unresolved merge conflictsffmpegIssues or PRs involving the a/v processing code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@eisneinechse@ferdnyc