mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-15 19:40:07 +01:00
lavu/timecode: clarify error msg for timecode_rate
The user-supplied value for timecode_rate in drawtext is rounded to nearest integer. So, a supplied value of 0.49 or lower is rounded to 0. This throws a misleading error message which says "Timecode frame rate must be specified". Changed message to account for values under one. Also noted supported framerates for drop TC. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
committed by
Michael Niedermayer
parent
1b323c3f9c
commit
84556ef059
@@ -155,7 +155,7 @@ static int check_fps(int fps)
|
||||
static int check_timecode(void *log_ctx, AVTimecode *tc)
|
||||
{
|
||||
if ((int)tc->fps <= 0) {
|
||||
av_log(log_ctx, AV_LOG_ERROR, "Timecode frame rate must be specified\n");
|
||||
av_log(log_ctx, AV_LOG_ERROR, "Valid timecode frame rate must be specified. Minimum value is 1\n");
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
if ((tc->flags & AV_TIMECODE_FLAG_DROPFRAME) && tc->fps != 30 && tc->fps != 60) {
|
||||
|
||||
Reference in New Issue
Block a user