[FFmpeg-devel] [PATCH] lavc/jpeglsenc: fix allocation in case of negative linesize, and add malloc check
Stefano Sabatini
stefasab at gmail.com
Sun Mar 18 21:32:59 CET 2012
On date Sunday 2012-03-18 18:49:32 +0000, Paul B Mahol encoded:
> On 3/18/12, Michael Niedermayer <michaelni at gmx.at> wrote:
> > On Sun, Mar 18, 2012 at 04:57:13PM +0100, Stefano Sabatini wrote:
> >> Fix crash with negative linesizes, fix trac ticket #1078.
> >> ---
> >> libavcodec/jpeglsenc.c | 4 +++-
> >> 1 files changed, 3 insertions(+), 1 deletions(-)
> >
> > patch is ok
Applied.
> > also, if negative linesizes are supported then CODEC_CAP_NEG_LINESIZES
>
> That cap is ignored by ffmpeg, and it is used only by ffplay.
>
> So current behaviour is wrong.
That's right, currently CODEC_CAP_NEG_LINESIZES is mostly ignored.
> > could be added.
> >
> > also independant of the patch the docs about CODEC_CAP_NEG_LINESIZES
> > (if it affects encoder input / get_buffer() output should be
> > improved and codecs should be checked to match the docs)
It should not too hard to write a complete test on all the supported
encoders, and check which codecs will crash.
--
FFmpeg = Fiendish & Foolish Mystic Powered Extended Guru
More information about the ffmpeg-devel
mailing list