Thanks for the suggestion: I tried what I thought would be a simpler approach, which was to populate the callback parameter of av_buffer_create(); as I understand it, that callback should be called when the codec is done with each buffer it has been sent. However, even though I believe I am flushing the codec properly (send it NULL and then call avcodec_receive_packet() until I get an error back), the callback is only ever called once.

I will keep poking at it until something begins to make sense to me :-).

Rob
On 2024-12-03 11:56, Ben Harper wrote:
I'm afraid I don't have the real answer, but I think you could
discover very quickly whether it works in practice, by freeing your
memory immediately after calling avcodec_send_frame, and running your
program under address sanitizer. I agree it would be great to know
what the contract is here. The documentation language "Ownership of
the frame remains with the caller, and the encoder will not write to
the frame" doesn't make it clear.
_______________________________________________
Libav-user mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to