[FFmpeg-devel] [PATCH] MpegEncContext must be initialized before calling ff_h263_decode_init
Reimar Döffinger
Reimar.Doeffinger
Sat Jun 27 19:54:42 CEST 2009
On Sat, Jun 27, 2009 at 07:43:38PM +0200, Reimar D?ffinger wrote:
> On Sat, Jun 27, 2009 at 07:38:05PM +0300, Kostya wrote:
> > On Sat, Jun 27, 2009 at 11:19:48AM +0200, Reimar D?ffinger wrote:
> > > ff_h263_decode_init calls MPV_common_init which then need mb_width to
> > > calculate mb_stride.
> > > So my conclusion is, MpegEncContext needs to be initialized before
> > > calling this function.
> > > This is probably what issue1233 is about.
> >
> > I've read issue 1233 and looks like the problem is with him not
> > initializing codec properly - you should set width and height to
> > real values before calling avcodec_open(), otherwise it's GIGO.
>
> Yes, the documentation say so, but if the detection finds different
> dimensions it will still crash, there is no way the application could
> avoid that (except by parsing the VC1 stream itself).
> Also, how does the VC1 decoder handle streams that change resolution
> mid-stream? Because I have the suspicion that it's exactly the same
> code that is needed for both cases...
And I forgot: I still think it is incorrect to set mb_width/mb_height from anywhere
in vc1.c
More information about the ffmpeg-devel
mailing list