It will not be set if the stream codec context is not the encoding context. Use av_get_audio_frame_duration() instead, it should work for all audio codecs supported by the muxer.
16 KiB
16 KiB