[FFmpeg-cvslog] ffmpeg: use filter time base as codec time base.

Nicolas George git at videolan.org
Sun Jun 3 23:59:02 CEST 2012


ffmpeg | branch: master | Nicolas George <nicolas.george at normalesup.org> | Wed May 23 14:31:30 2012 +0200| [8b0e173529c821957868acf39e95d92853f3b8e0] | committer: Nicolas George

ffmpeg: use filter time base as codec time base.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8b0e173529c821957868acf39e95d92853f3b8e0
---

 ffmpeg.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/ffmpeg.c b/ffmpeg.c
index b226779..85ae4f3 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3085,6 +3085,8 @@ static int transcode_init(void)
                 break;
             case AVMEDIA_TYPE_VIDEO:
                 codec->time_base = (AVRational){ost->frame_rate.den, ost->frame_rate.num};
+                if (ost->filter && !(codec->time_base.num && codec->time_base.den))
+                    codec->time_base = ost->filter->filter->inputs[0]->time_base;
                 if (   av_q2d(codec->time_base) < 0.001 && video_sync_method != VSYNC_PASSTHROUGH
                    && (video_sync_method == VSYNC_CFR || (video_sync_method == VSYNC_AUTO && !(oc->oformat->flags & AVFMT_VARIABLE_FPS)))){
                     av_log(oc, AV_LOG_WARNING, "Frame rate very high for a muxer not efficiently supporting it.\n"



More information about the ffmpeg-cvslog mailing list