[Ffmpeg-devel] THP decoder

Michael Niedermayer michaelni
Fri Apr 6 19:19:04 CEST 2007


Hi

On Fri, Apr 06, 2007 at 06:50:13PM +0200, Reimar D?ffinger wrote:
[...]
> > +    int *header;
> > +    get_buffer(pb, header, 4);/* Skipping magic bytes */
> 
> huh? Won't this end up writing the data at some random place?

yes and iam pointing at it since several patch revisions already
i was wondering how long it would take the student to realize
what is wrong in the 4 lines with a comment "wrong" always 
attached to it


[...]
> 
> > +    st->codec->codec_type = CODEC_TYPE_VIDEO;
> > +    st->codec->codec_id = CODEC_ID_THP;
> > +    st->codec->codec_tag = 0;  /* no fourcc */
> 
> Isn't that the default value anyway?

yes it should be, i guess this was copy and pasted from some
other demuxer, someone really should cleanup the demuxers in svn ...


> 
> > +    st->codec->sample_rate = thpDemux->fps;
> 
> And I don't think you're supposed to set sample_rate for video.

thats another line i remember complaining about already at least once

simply looking at sample_rate = fps should raise a red flag for everyone


[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Good people do not need laws to tell them to act responsibly, while bad
people will find a way around the laws. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070406/7b85c6c1/attachment.pgp>



More information about the ffmpeg-devel mailing list