[FFmpeg-cvslog] ffmpeg_filter: fix pointer to local outside scope

Michael Niedermayer michaelni at gmx.at
Mon Apr 28 00:21:29 CEST 2014


On Sun, Apr 27, 2014 at 07:32:07AM +0200, Reimar Döffinger wrote:
> 
> 
> On 27.04.2014, at 05:45, git at videolan.org (Michael Niedermayer) wrote:
> 
> > ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Apr 27 03:45:12 2014 +0200| [09b16619d33ddf93005060d0782f28a1c1cbb7f6] | committer: Michael Niedermayer
> > 
> > ffmpeg_filter: fix pointer to local outside scope
> > 
> > Fixes CID1206652
> > Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> > 
> >> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=09b16619d33ddf93005060d0782f28a1c1cbb7f6
> > ---
> > 
> > ffmpeg_filter.c |    9 ++++++---
> > 1 file changed, 6 insertions(+), 3 deletions(-)
> > 
> > diff --git a/ffmpeg_filter.c b/ffmpeg_filter.c
> > index 9d945fc..582c661 100644
> > --- a/ffmpeg_filter.c
> > +++ b/ffmpeg_filter.c
> > @@ -44,12 +44,15 @@ enum AVPixelFormat choose_pixel_fmt(AVStream *st, AVCodec *codec, enum AVPixelFo
> >         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(target);
> >         int has_alpha = desc ? desc->nb_components % 2 == 0 : 0;
> >         enum AVPixelFormat best= AV_PIX_FMT_NONE;
> > +        const enum AVPixelFormat mjpeg_formats[] = { AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_NONE };
> > +        const enum AVPixelFormat ljpeg_formats[] = { AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUV420P,
> > +                                                     AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV444P, AV_PIX_FMT_BGRA, AV_PIX_FMT_NONE };
> 
> Wouldn't "static const" be possible and better (some stupid compilers make stack copies otherwise for example).

locally fixed

thx

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

Complexity theory is the science of finding the exact solution to an
approximation. Benchmarking OTOH is finding an approximation of the exact
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-cvslog/attachments/20140428/c334e5a5/attachment.asc>


More information about the ffmpeg-cvslog mailing list