On Thu, Aug 21, 2014 at 01:53:28PM +0200, Daniel Oberhoff wrote:
> 
> ---
>  Daniel Oberhoff 
>  daniel.oberh...@gmail.com
> 
> 
> 
> On Aug 21, 2014, at 1:52 PM, Michael Niedermayer <michae...@gmx.at> wrote:
> 
> > On Thu, Aug 21, 2014 at 12:57:08PM +0200, Daniel Oberhoff wrote:
> >> 
> >> ---
> >> Daniel Oberhoff 
> >> daniel.oberh...@gmail.com
> >> 
> >> 
> >> 
> >> On Aug 21, 2014, at 12:34 PM, Michael Niedermayer <michae...@gmx.at> wrote:
> >> 
> >>> Exceeding the count would write out of array, and should not occur with 
> >>> any
> >>> current pixel format
> >>> 
> >>> Signed-off-by: Michael Niedermayer <michae...@gmx.at>
> >>> ---
> >>> libavfilter/vf_lenscorrection.c |    3 +++
> >>> 1 file changed, 3 insertions(+)
> >>> 
> >>> diff --git a/libavfilter/vf_lenscorrection.c 
> >>> b/libavfilter/vf_lenscorrection.c
> >>> index 58184b0..01380fc 100644
> >>> --- a/libavfilter/vf_lenscorrection.c
> >>> +++ b/libavfilter/vf_lenscorrection.c
> >>> @@ -26,6 +26,7 @@
> >>> #include <stdlib.h>
> >>> #include <math.h>
> >>> 
> >>> +#include "libavutil/avassert.h"
> >>> #include "libavutil/opt.h"
> >>> #include "libavutil/intreadwrite.h"
> >>> #include "libavutil/pixdesc.h"
> >>> @@ -132,6 +133,8 @@ static int config_props(AVFilterLink *outlink)
> >>>    outlink->w = rect->width = inlink->w;
> >>>    outlink->h = rect->height = inlink->h;
> >>>    rect->nb_planes = av_pix_fmt_count_planes(inlink->format);
> >>> +    av_assert0(rect->nb_planes <= FF_ARRAY_ELEMS(rect->correction));
> >> 
> >> how many planes can there ever be?
> > 
> > I think the current pixel formats dont have more than 4 but
> > things like CMYKA would have 5, and formats could contain more planes
> > in principle, we dont support such stuff ATM but cameras exist that
> > record infrared in addition to vissible inforation. for example
> 
> But this data only comes from another part of ffmpeg, right?

yes


> Should then there not be some kind of config macro or such along 
> FF_MAX_NUM_PLANES?

there is AV_NUM_DATA_POINTERS, but thats a limit for AVFrame and
does not limit the pixel format planes, audio formats exceed it
for example, which use AVFrames

also its not clear if adding a 5 plane pixel format would have to
imply bumping ABI which could change a compile time define

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

When you are offended at any man's fault, turn to yourself and study your
own failings. Then you will forget your anger. -- Epictetus

Attachment: signature.asc
Description: Digital signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to