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

Function check_timecode

libavutil/timecode.c:172–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170}
171
172static int check_timecode(void *log_ctx, AVTimecode *tc)
173{
174 if ((int)tc->fps <= 0) {
175 av_log(log_ctx, AV_LOG_ERROR, "Valid timecode frame rate must be specified. Minimum value is 1\n");
176 return AVERROR(EINVAL);
177 }
178 if ((tc->flags & AV_TIMECODE_FLAG_DROPFRAME) && tc->fps % 30 != 0) {
179 av_log(log_ctx, AV_LOG_ERROR, "Drop frame is only allowed with multiples of 30000/1001 FPS\n");
180 return AVERROR(EINVAL);
181 }
182 if (check_fps(tc->fps) < 0) {
183 av_log(log_ctx, AV_LOG_WARNING, "Using non-standard frame rate %d/%d\n",
184 tc->rate.num, tc->rate.den);
185 }
186 return 0;
187}
188
189static int fps_from_frame_rate(AVRational rate)
190{

Callers 2

av_timecode_initFunction · 0.85

Calls 2

av_logFunction · 0.85
check_fpsFunction · 0.85

Tested by

no test coverage detected