[FFmpeg-devel] [PATCH 1/5] Fix crop->var_values[VAR_T] computation in the crop filter.
Michael Niedermayer
michaelni
Mon Nov 1 12:57:20 CET 2010
On Mon, Nov 01, 2010 at 11:37:54AM +0100, Stefano Sabatini wrote:
> ---
> libavfilter/vf_crop.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/libavfilter/vf_crop.c b/libavfilter/vf_crop.c
> index c72ed2c..b455850 100644
> --- a/libavfilter/vf_crop.c
> +++ b/libavfilter/vf_crop.c
> @@ -240,8 +240,8 @@ static void start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
> picref->video->w = crop->w;
> picref->video->h = crop->h;
>
> - /* FIXME: when the TB will be settable */
> - crop->var_values[VAR_T] = picref->pts == AV_NOPTS_VALUE ? NAN : (double)picref->pts / AV_TIME_BASE;
> + crop->var_values[VAR_T] = picref->pts == AV_NOPTS_VALUE ? NAN :
> + (double)picref->pts * link->time_base.num / link->time_base.den;
i would have used av_q2d() but this is fine too if you prefer
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Good people do not need laws to tell them to act responsibly, while bad
people will find a way around the laws. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101101/f6db51c5/attachment.pgp>
More information about the ffmpeg-devel
mailing list