ffmpeg: add option fps_mode

fps_mode sets video sync per output stream. Overrides vsync for matching
streams.

vsync is deprecated.
This commit is contained in:
Gyan Doshi
2022-06-07 17:36:54 +05:30
parent cb204f007b
commit 09c53a04c5
5 changed files with 47 additions and 21 deletions

View File

@@ -96,7 +96,7 @@ void of_write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost,
return;
}
if ((st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO && video_sync_method == VSYNC_DROP) ||
if ((st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO && ost->vsync_method == VSYNC_DROP) ||
(st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO && audio_sync_method < 0))
pkt->pts = pkt->dts = AV_NOPTS_VALUE;