[FFmpeg-devel] [PATCH]Remove panscan information in av_frame_copy_props() if resolution changes

Michael Niedermayer michaelni at gmx.at
Sun Aug 10 21:20:52 CEST 2014


On Sun, Aug 10, 2014 at 07:23:33PM +0200, Carl Eugen Hoyos wrote:
> Hi!
> 
> Attached is a new variant of "[RFC]Remove panscan side data in filters that 
> change the resolution". I don't know how to correctly set the information 
> based on the resolution change, as-is this patch works around ticket #3750 (a 
> regression).
> 
> Please comment, Carl Eugen

>  frame.c |    3 +++
>  1 file changed, 3 insertions(+)
> 636352467d85130c294f2383161cc5d0034ec58e  patchpanscan2.diff
> diff --git a/libavutil/frame.c b/libavutil/frame.c
> index 67a7d3e..38c0e5c 100644
> --- a/libavutil/frame.c
> +++ b/libavutil/frame.c
> @@ -492,6 +492,9 @@ int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
>  
>      for (i = 0; i < src->nb_side_data; i++) {
>          const AVFrameSideData *sd_src = src->side_data[i];
> +        if (   sd_src->type == AV_FRAME_DATA_PANSCAN
> +            && (src->width != dst->width || src->height != dst->height))
> +            continue;
>          AVFrameSideData *sd_dst = av_frame_new_side_data(dst, sd_src->type,
>                                                           sd_src->size);

LGTM but please dont mix declarations and statements


[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

it is not once nor twice but times without number that the same ideas make
their appearance in the world. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140810/6829a88e/attachment.asc>


More information about the ffmpeg-devel mailing list