MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / ff_samples_from_time_base

Function ff_samples_from_time_base

libavcodec/encode.h:105–112  ·  view source on GitHub ↗

* Rescale from time base to AVCodecContext.sample_rate. */

Source from the content-addressed store, hash-verified

103 * Rescale from time base to AVCodecContext.sample_rate.
104 */
105static av_always_inline int64_t ff_samples_from_time_base(const AVCodecContext *avctx,
106 int64_t duration)
107{
108 if (!duration)
109 return duration;
110 return av_rescale_q(duration, avctx->time_base,
111 (AVRational){ 1, avctx->sample_rate });
112}
113
114/**
115 * Check if the elements of codec context matrices (intra_matrix, inter_matrix or

Callers 5

libvorbis_encode_frameFunction · 0.85
libopus_encodeFunction · 0.85
mp3lame_encode_frameFunction · 0.85
aac_encode_frameFunction · 0.85
opus_encode_frameFunction · 0.85

Calls 1

av_rescale_qFunction · 0.85

Tested by

no test coverage detected