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

Add support for ffmpeg 6.0 #74

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

pekkarr
Copy link

@pekkarr pekkarr commented May 9, 2023

  • Use the new send_frame/receive_packet API for encoding
  • Use the new channel layout API for audio
  • Fix audio recording
    • Copy codec parameters to the stream parameters
    • Set correct pts for audio frames
  • Read audio samples from file directly to the refcounted AVFrame buffer instead of the g_pSamples buffer
  • Use global AVPackets allocated with av_packet_alloc
  • Stop trying to write more audio frames when WriteAudioFrame fails with a negative error code
  • Fix segfault with g_pContainer->url. The field has to be allocated with av_malloc before writing to it. It's set to NULL by default.
  • Properly free allocations with avcodec_free_context and avformat_free_context

This has been tested with ffmpeg 6.0, 4.4 and 3.4

- Use the new send_frame/receive_packet API for encoding
- Use the new channel layout API for audio
- Fix audio recording
  - Copy codec parameters to the stream parameters
  - Set correct pts for audio frames
- Read audio samples from file directly to the refcounted AVFrame buffer instead of the `g_pSamples` buffer
- Use global AVPackets allocated with `av_packet_alloc`
- Stop trying to write more audio frames when `WriteAudioFrame` fails with a negative error code
- Fix segfault with `g_pContainer->url`. The field has to be allocated with `av_malloc` before writing to it. It's set to `NULL` by default.
- Properly free allocations with `avcodec_free_context` and `avformat_free_context`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant