[Ffmpeg-devel] [PATCH] C93 demuxer and decoder (GSoC qualification task)

Reimar Döffinger Reimar.Doeffinger
Mon Apr 2 01:45:57 CEST 2007

On Sun, Apr 01, 2007 at 11:27:37PM +0100, M?ns Rullg?rd wrote:
> Reimar D?ffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> writes:
> > On Sun, Apr 01, 2007 at 10:26:37PM +0100, M?ns Rullg?rd wrote:
> >> Reimar D?ffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> writes:
> >> > Since you set it in the demuxer, you might consider if you can replace
> >> > the constants by avctx->width/height, it _might_ clarify the code a bit
> >> > as well.
> >> > Though don't forget to do avcodec_check_dimensions then.
> >> 
> >> The avctx->width/height should be set here for the benefit of the
> >> (hypothetical) users of this decoder not using lavf.
> >
> > Well, whichever way IMO this should be set only in one place. Where
> > doesn't matter, unless other resolutions might be possible, then it
> > should be set where this info is most likely to be found/processed.
> The resolution should be set at all places it can be determined.  This
> is how it is done with other codecs, e.g. mpeg4.

That was somewhat my point. It's hard to say where it can be determined
when it is simply hard-coded. My gut-feeling is that setting it in the
codec will only reduce the (hypothetical as well) number of cases where
it can work.
Of course another alternative would be to set it in the decoder if and
only if the dimensions passed to it are not valid.
Not a big deal anyway IMO, I just don't like hardcoded values.

Reimar D?ffinger

More information about the ffmpeg-devel mailing list