[Ffmpeg-devel] [PATCH] Ratecontrol does not check for failure of ff_eval
Michael Niedermayer
michaelni
Mon Sep 25 16:20:36 CEST 2006
Hi
On Mon, Sep 25, 2006 at 03:20:47PM +0200, Panagiotis Issaris wrote:
> Hi,
>
> Op zondag 24 september 2006 14:57, schreef Michael Niedermayer:
> > > On zo, 2006-09-24 at 13:02 +0200, Michael Niedermayer wrote:
> > > > > The attached patch handles failure in the ratecontroller in case ff_eval
> > > > > failed. It does so, by reverting to the default rc_eq in case an invalid
> > > > > one is specified. Regression tests succeed.
> >[...]
> > > I'd think propagating the error would be the best thing to do, so the
> > > calling application can handle the error as it pleases. Would a patch
> > > propagating the NAN upwards be okay?
> >
> > yes (or -1 or something like that)
>
> The attached patch tries to add failure handling in case ff_eval fails. It is _not
> meant for inclusion_ though, as it is incorrect at the moment.
>
> One problem is, that FFmpeg does not quit when avcodec_encode_video() returns -1. I
> added this in the patch, and it is most likely incorrect as there are also two other
> reasons for returning -1, being:
> * buf_size < FF_MIN_BUFFER_SIZE
> * if(avcodec_check_dimensions(avctx,avctx->width,avctx->height))
hmm, these are as fatal as a nonsense rc_eq so exiting in some way from
ffmpeg.c seems appropriate
>
> How do you feel about returning differing negative values for different failures? So,
ive no objection if its usefull and doesnt become too bloated (=like having tables of
strings with error messages and such)
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is
More information about the ffmpeg-devel
mailing list