| 170 | } |
| 171 | |
| 172 | static 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 | |
| 189 | static int fps_from_frame_rate(AVRational rate) |
| 190 | { |
no test coverage detected