summaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2012-06-05 12:43:33 +0200
committerNicolas George <nicolas.george@normalesup.org>2012-06-09 08:42:50 +0200
commit8362d734a3521b49fbc4942da49d45969e73c067 (patch)
tree6656f51e31e7cb049993556a180dcce3728262de /ffmpeg.c
parent5f281e94ba3b50347e78c756b8e59c9cd860de0c (diff)
downloadffmpeg-streaming-8362d734a3521b49fbc4942da49d45969e73c067.zip
ffmpeg-streaming-8362d734a3521b49fbc4942da49d45969e73c067.tar.gz
ffmpeg: use the frame rate computed by lavfi.
This frame rate is more reliable than the one copied from the input stream, so it is used in priority.
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 1611536..c73f286 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2915,6 +2915,8 @@ static int transcode_init(void)
ost->encoding_needed = 1;
if (codec->codec_type == AVMEDIA_TYPE_VIDEO) {
+ if (ost->filter && !ost->frame_rate.num)
+ ost->frame_rate = av_buffersink_get_frame_rate(ost->filter->filter);
if (ist && !ost->frame_rate.num)
ost->frame_rate = ist->st->r_frame_rate.num ? ist->st->r_frame_rate : (AVRational){25, 1};
if (ost->enc && ost->enc->supported_framerates && !ost->force_fps) {
OpenPOWER on IntegriCloud