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

Function frame_end

fftools/sync_queue.c:118–129  ·  view source on GitHub ↗

* Compute the end timestamp of a frame. If nb_samples is provided, consider * the frame to have this number of audio samples, otherwise use frame duration. */

Source from the content-addressed store, hash-verified

116 * the frame to have this number of audio samples, otherwise use frame duration.
117 */
118static int64_t frame_end(const SyncQueue *sq, SyncQueueFrame frame, int nb_samples)
119{
120 if (nb_samples) {
121 int64_t d = av_rescale_q(nb_samples, (AVRational){ 1, frame.f->sample_rate},
122 frame.f->time_base);
123 return frame.f->pts + d;
124 }
125
126 return (sq->type == SYNC_QUEUE_PACKETS) ?
127 frame.p->pts + frame.p->duration :
128 frame.f->pts + frame.f->duration;
129}
130
131static int frame_samples(const SyncQueue *sq, SyncQueueFrame frame)
132{

Callers 3

overflow_heartbeatFunction · 0.70
sq_sendFunction · 0.70
receive_for_streamFunction · 0.70

Calls 1

av_rescale_qFunction · 0.85

Tested by

no test coverage detected