diff mbox series

[FFmpeg-devel] avfilter/swaprect: correct assignment of VAR_POS

Message ID 20200115084151.1122-1-ffmpeg@gyani.pro
State Accepted
Headers show
Series [FFmpeg-devel] avfilter/swaprect: correct assignment of VAR_POS | expand

Checks

Context Check Description
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Gyan Doshi Jan. 15, 2020, 8:41 a.m. UTC
Revert regression introduced in 6af050d7d0
---
 libavfilter/vf_swaprect.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paul B Mahol Jan. 15, 2020, 8:48 a.m. UTC | #1
LGTM

On 1/15/20, Gyan Doshi <ffmpeg@gyani.pro> wrote:
> Revert regression introduced in 6af050d7d0
> ---
>  libavfilter/vf_swaprect.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavfilter/vf_swaprect.c b/libavfilter/vf_swaprect.c
> index f1fab1e36d..cf9c298f2f 100644
> --- a/libavfilter/vf_swaprect.c
> +++ b/libavfilter/vf_swaprect.c
> @@ -99,7 +99,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
>      var_values[VAR_DAR] = var_values[VAR_A] * var_values[VAR_SAR];
>      var_values[VAR_N]   = inlink->frame_count_out;
>      var_values[VAR_T]   = in->pts == AV_NOPTS_VALUE ? NAN : in->pts *
> av_q2d(inlink->time_base);
> -    var_values[VAR_POS] = in->pkt_pos ? NAN : in->pkt_pos;
> +    var_values[VAR_POS] = in->pkt_pos == -1 ? NAN : in->pkt_pos;
>
>      ret = av_expr_parse_and_eval(&dw, s->w,
>                                   var_names, &var_values[0],
> --
> 2.24.1
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
Gyan Doshi Jan. 15, 2020, 8:59 a.m. UTC | #2
On 15-01-2020 02:18 pm, Paul B Mahol wrote:
> LGTM

Pushed to 0777b197c57eebb4e2367932fa44021577ab5237

Thanks,
Gyan

>
> On 1/15/20, Gyan Doshi <ffmpeg@gyani.pro> wrote:
>> Revert regression introduced in 6af050d7d0
>> ---
>>   libavfilter/vf_swaprect.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/libavfilter/vf_swaprect.c b/libavfilter/vf_swaprect.c
>> index f1fab1e36d..cf9c298f2f 100644
>> --- a/libavfilter/vf_swaprect.c
>> +++ b/libavfilter/vf_swaprect.c
>> @@ -99,7 +99,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
>>       var_values[VAR_DAR] = var_values[VAR_A] * var_values[VAR_SAR];
>>       var_values[VAR_N]   = inlink->frame_count_out;
>>       var_values[VAR_T]   = in->pts == AV_NOPTS_VALUE ? NAN : in->pts *
>> av_q2d(inlink->time_base);
>> -    var_values[VAR_POS] = in->pkt_pos ? NAN : in->pkt_pos;
>> +    var_values[VAR_POS] = in->pkt_pos == -1 ? NAN : in->pkt_pos;
>>
>>       ret = av_expr_parse_and_eval(&dw, s->w,
>>                                    var_names, &var_values[0],
>> --
>> 2.24.1
>>
>> _______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel@ffmpeg.org
>> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>>
>> To unsubscribe, visit link above, or email
>> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
diff mbox series

Patch

diff --git a/libavfilter/vf_swaprect.c b/libavfilter/vf_swaprect.c
index f1fab1e36d..cf9c298f2f 100644
--- a/libavfilter/vf_swaprect.c
+++ b/libavfilter/vf_swaprect.c
@@ -99,7 +99,7 @@  static int filter_frame(AVFilterLink *inlink, AVFrame *in)
     var_values[VAR_DAR] = var_values[VAR_A] * var_values[VAR_SAR];
     var_values[VAR_N]   = inlink->frame_count_out;
     var_values[VAR_T]   = in->pts == AV_NOPTS_VALUE ? NAN : in->pts * av_q2d(inlink->time_base);
-    var_values[VAR_POS] = in->pkt_pos ? NAN : in->pkt_pos;
+    var_values[VAR_POS] = in->pkt_pos == -1 ? NAN : in->pkt_pos;
 
     ret = av_expr_parse_and_eval(&dw, s->w,
                                  var_names, &var_values[0],