[FFmpeg-devel] [PATCH] Use the same input value for the frame pixel aspect if the parameter is not set (rather than set the undefined value 0/1).

Michael Niedermayer michaelni
Fri Nov 19 01:27:26 CET 2010


On Thu, Nov 18, 2010 at 10:43:26PM +0100, Stefano Sabatini wrote:
> ---
>  libavfilter/vf_aspect.c |    6 ++----
>  1 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/libavfilter/vf_aspect.c b/libavfilter/vf_aspect.c
> index 27f02fb..58c7d23 100644
> --- a/libavfilter/vf_aspect.c
> +++ b/libavfilter/vf_aspect.c
> @@ -59,9 +59,6 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
>          }
>      }
>  
> -    if (aspect->aspect.den == 0)
> -        aspect->aspect = (AVRational) {0, 1};
> -
>      av_log(ctx, AV_LOG_INFO, "a:%d/%d\n", aspect->aspect.num, aspect->aspect.den);
>      return 0;
>  }
> @@ -70,7 +67,8 @@ static void start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
>  {
>      AspectContext *aspect = link->dst->priv;
>  
> -    picref->video->pixel_aspect = aspect->aspect;
> +    if (aspect->aspect.num)
> +        picref->video->pixel_aspect = aspect->aspect;
>      avfilter_start_frame(link->dst->outputs[0], picref);

you copy 1/0 in there

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The real ebay dictionary, page 3
"Rare item" - "Common item with rare defect or maybe just a lie"
"Professional" - "'Toy' made in china, not functional except as doorstop"
"Experts will know" - "The seller hopes you are not an expert"
-------------- 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/20101119/65364480/attachment.pgp>



More information about the ffmpeg-devel mailing list