[FFmpeg-devel] Why does vp56_init() sets avctx->width and avctx->height to 0?
Stefano Sabatini
stefano.sabatini-lala
Sun Aug 31 01:37:31 CEST 2008
On date Saturday 2008-08-30 14:58:21 -0700, Baptiste Coudurier encoded:
> Hi Aurelien,
>
> Aurelien Jacobs wrote:
> > Stefano Sabatini wrote:
> >
> >> Hi,
> >>
> >> this causes a bug both in ffprobe (prints widht=size=0) and
> >> causes a division by 0 exception in libavfilter/vf_scale when it
> >> tryies to set the parameters for the filter.
> >>
> >> What's the point into setting those values to 0?
> >
> > The point is that the actual frame width and height are not known
> > at this point. They only get known after parsing the header of the
> > first key frame.
> > And also don't forget that those value may change at every key frame.
> > The width/height is not an intrinsic property of a video stream, it's
> > a property of each individual frame.
> >
>
> Any reason to _set_ them to 0 instead of leaving them "as is" and set
> them during decoding like every other decoder do ? I'd prefer the
> latter. I know this has already been discussed before.
I also tried to skip the setting to 0 code, which results in a crash,
so it's not that trivial to remove that feature.
As for libavfilter, actually the only way I know to avoid that
exception is to return -1 during the configuration of the filter,
which is bad since this will deactivate the whole video filtering
chain, still trying to figure out a method to avoid the problem.
Regards.
--
FFmpeg = Friendly Fast Minimal Proud Elastic Glue
More information about the ffmpeg-devel
mailing list