MCPcopy Create free account
hub / github.com/byhook/ffmpeg4android / duration_max

Function duration_max

ffmpeg-single-cmd/src/main/cpp/ffmpeg_mod.c:4098–4115  ·  view source on GitHub ↗

set duration to max(tmp, duration) in a proper time base and return duration's time_base

Source from the content-addressed store, hash-verified

4096
4097// set duration to max(tmp, duration) in a proper time base and return duration's time_base
4098static AVRational duration_max(int64_t tmp, int64_t *duration, AVRational tmp_time_base,
4099 AVRational time_base)
4100{
4101 int ret;
4102
4103 if (!*duration) {
4104 *duration = tmp;
4105 return tmp_time_base;
4106 }
4107
4108 ret = av_compare_ts(*duration, time_base, tmp, tmp_time_base);
4109 if (ret < 0) {
4110 *duration = tmp;
4111 return tmp_time_base;
4112 }
4113
4114 return time_base;
4115}
4116
4117static int seek_to_start(InputFile *ifile, AVFormatContext *is)
4118{

Callers 1

seek_to_startFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected