You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-11-29 05:57:37 +02:00
This commit will properly set the duration field of Opus AVPackets.
Currently, duration is set to 0 on Opus packets from the RTP demuxer.
The Ogg muxer depends on the duration field to properly compute the page granule
value. Without a proper duration, the granule will be wrong, and result in
negative pts values in ogg files.
See oggenc.c:657 (ogg_write_packet_internal)
This commit calculates using the opus_duration function, which was copied
from oggparseopus.c
I moved this functionality and the existing opus extradata functionality
(added by me in 6c24f2b) into a new rtpdec_opus.c file.
Reviewed-by: Tristan Matthews <tmatth@videolan.org>
Signed-off-by: Marvin Scholz <epirat07@gmail.com>
4.9 KiB
4.9 KiB