summaryrefslogtreecommitdiff
path: root/libavdevice
diff options
context:
space:
mode:
authorYun Zhang <yunz@devvm259.frc1.facebook.com>2021-08-02 14:00:52 +0200
committerThilo Borgmann <thilo.borgmann@mail.de>2021-08-02 14:00:52 +0200
commita27853a7300bb3c2752256b2fc02f2439619f6f8 (patch)
treee8769219dbc4700548ffc47e3a759418573d8927 /libavdevice
parent1f58503013720700a5adfd72c708e6275aefc165 (diff)
lavd/lavfi.c: Set time_base for 608 cc to container time_base.
Suggested-By: ffmpeg@fb.com
Diffstat (limited to 'libavdevice')
-rw-r--r--libavdevice/lavfi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c
index 57d977e7ce..4eb1f56f7d 100644
--- a/libavdevice/lavfi.c
+++ b/libavdevice/lavfi.c
@@ -100,6 +100,7 @@ static int create_subcc_streams(AVFormatContext *avctx)
LavfiContext *lavfi = avctx->priv_data;
AVStream *st;
int stream_idx, sink_idx;
+ AVRational *time_base;
for (stream_idx = 0; stream_idx < lavfi->nb_sinks; stream_idx++) {
sink_idx = lavfi->stream_sink_map[stream_idx];
@@ -109,6 +110,9 @@ static int create_subcc_streams(AVFormatContext *avctx)
return AVERROR(ENOMEM);
st->codecpar->codec_id = AV_CODEC_ID_EIA_608;
st->codecpar->codec_type = AVMEDIA_TYPE_SUBTITLE;
+ time_base = &avctx->streams[stream_idx]->time_base;
+ st->time_base.num = time_base->num;
+ st->time_base.den = time_base->den;
} else {
lavfi->sink_stream_subcc_map[sink_idx] = -1;
}