[FFmpeg-cvslog] vf_select: set start_t if undefined

William Yu git at videolan.org
Thu Aug 11 16:09:10 CEST 2011


ffmpeg | branch: master | William Yu <genwillyu at gmail.com> | Thu Aug 11 15:40:03 2011 +0200| [298fccad2150e6d764090c47f9515b72d304cf52] | committer: Stefano Sabatini

vf_select: set start_t if undefined

Previously start_t was never set.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala at poste.it>

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

 libavfilter/vf_select.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/libavfilter/vf_select.c b/libavfilter/vf_select.c
index 3d05167..455e177 100644
--- a/libavfilter/vf_select.c
+++ b/libavfilter/vf_select.c
@@ -185,6 +185,8 @@ static int select_frame(AVFilterContext *ctx, AVFilterBufferRef *picref)
 
     if (isnan(select->var_values[VAR_START_PTS]))
         select->var_values[VAR_START_PTS] = TS2D(picref->pts);
+    if (isnan(select->var_values[VAR_START_T]))
+        select->var_values[VAR_START_T] = TS2D(picref->pts) * av_q2d(inlink->time_base);
 
     select->var_values[VAR_PTS] = TS2D(picref->pts);
     select->var_values[VAR_T  ] = picref->pts * av_q2d(inlink->time_base);



More information about the ffmpeg-cvslog mailing list