[FFmpeg-devel] BFI Demuxer

Michael Niedermayer michaelni
Tue Apr 1 15:55:35 CEST 2008


On Tue, Apr 01, 2008 at 04:39:56PM +0530, Sisir Koppaka wrote:
[...]
> >
> >
> > > +    int sample_rate;
> > > +    int channels;
> >
> > duplicate
> >
> 
> Duplicate in the sense of? I'm sorry, I couldn't get you here... :(

In the sense that AVCodecContext contains such variables already.

[...]

> >
> >
> > [...]
> > > +    /*Improving colour depth */
> > > +    for (i = 0; i < vstream->codec->extradata_size; i++)
> > > +        ((uint8_t *) vstream->codec->extradata)[i] =
> > > +            ((uint8_t *) vstream->codec->extradata)[i] << 2;
> >
> > senseless casts, and the comment makes no sense.
> >
> 
> I've replaced the above comment with this one - is this ok?
>  /* Converts the given 6-bit palette values(0-63) to 8-bit values(0-255) to
> improve the contrast. */

i dont think that the fundamental reason for the shift is that it
improves the contrast.


> About the casts, did you mean that they were not necessary or that the type
> wasn't right?

not necessary


[...]

> >
> >
> > [...]
> > > +        while (get_byte(pb) != 'I') {
> > > +            continue;
> > > +        }
> >
> > infinite loop
> >
> But that is the intent, right? Usually, the loop proceeds only two, three
> times, I think, before finally stopping. I'll put a av_log there and if it's
> not too many times, then is it ok to have it?

Think of a damaged file with no 'I'


[...]
> >
> >
> > [...]
> >
> > > +static int bfi_read_close(AVFormatContext * s)
> > > +{
> > > +    BFIContext *bfi = s->priv_data;
> > > +    av_free(s->streams[bfi->video_index]->codec->extradata);
> >
> > this is wrong
> >
> 
> Should we free extradata in the decoder close function in that case?

see av_close_input_stream()

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Observe your enemies, for they first find out your faults. -- Antisthenes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080401/d543cffc/attachment.pgp>



More information about the ffmpeg-devel mailing list