mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-22 15:23:11 +00:00
fftools/ffmpeg: warn about ignored -enc_time_base for subtitles earlier
Can do it as soon as that option is parsed, no need to postpone it until opening the encoder.
This commit is contained in:
parent
e903c31fd1
commit
606c71bb11
@ -280,9 +280,6 @@ int enc_open(void *opaque, const AVFrame *frame)
|
||||
break;
|
||||
}
|
||||
case AVMEDIA_TYPE_SUBTITLE:
|
||||
if (ost->enc_timebase.num)
|
||||
av_log(ost, AV_LOG_WARNING,
|
||||
"-enc_time_base not supported for subtitles, ignoring\n");
|
||||
enc_ctx->time_base = AV_TIME_BASE_Q;
|
||||
|
||||
if (!enc_ctx->width) {
|
||||
|
@ -1233,8 +1233,12 @@ static int ost_add(Muxer *mux, const OptionsContext *o, enum AVMediaType type,
|
||||
}
|
||||
|
||||
MATCH_PER_STREAM_OPT(enc_time_bases, str, enc_time_base, oc, st);
|
||||
if (enc_time_base) {
|
||||
if (enc_time_base && type == AVMEDIA_TYPE_SUBTITLE)
|
||||
av_log(ost, AV_LOG_WARNING,
|
||||
"-enc_time_base not supported for subtitles, ignoring\n");
|
||||
else if (enc_time_base) {
|
||||
AVRational q;
|
||||
|
||||
if (!strcmp(enc_time_base, "demux")) {
|
||||
q = (AVRational){ ENC_TIME_BASE_DEMUX, 0 };
|
||||
} else if (!strcmp(enc_time_base, "filter")) {
|
||||
|
Loading…
Reference in New Issue
Block a user