obs-ffmpeg/ffmpeg-mux: Set codec->time_base if avformat < 59
This commit is contained in:
parent
f7a468dd30
commit
04596ec097
@ -387,6 +387,10 @@ static void create_video_stream(struct ffmpeg_mux *ffm)
|
||||
(AVRational){ffm->params.fps_den, ffm->params.fps_num};
|
||||
|
||||
ffm->video_stream->time_base = context->time_base;
|
||||
#if LIBAVFORMAT_VERSION_MAJOR < 59
|
||||
// codec->time_base may still be used if LIBAVFORMAT_VERSION_MAJOR < 59
|
||||
ffm->video_stream->codec->time_base = context->time_base;
|
||||
#endif
|
||||
ffm->video_stream->avg_frame_rate = av_inv_q(context->time_base);
|
||||
|
||||
if (ffm->output->oformat->flags & AVFMT_GLOBALHEADER)
|
||||
|
Loading…
x
Reference in New Issue
Block a user