[FFmpeg-cvslog] Add .bit (de)muxer

Michael Niedermayer michaelni at gmx.at
Sun Sep 25 05:26:59 CEST 2011


On Sun, Sep 25, 2011 at 02:46:30AM +0200, Reimar Döffinger wrote:
[...]
> 
> > +    if(i != SYNC_WORD)
> > +        return 0;
> > +
> > +    switch(AV_RL16(&p->buf[2]))
> > +    {
> > +    case 0x40:
> > +    case 0x50:
> > +        return AVPROBE_SCORE_MAX/2;
> 
> That is not much data to go by.
> Since the second packet should start at most 128 bytes further, it should probably be tested as well, and the first match should at most give max/4.

rewritten


> 
> > +    av_set_pts_info(st, 64, 1, 100);
> > +    url_fseek(pb, 0, SEEK_SET);
> 
> Not very nice, might cause problems when piping the format.
> I mostly say this because you could probably set those values you need it for like bit rate in the read_packet function and avoid reading here completely.

removed


> 
> > +    if(url_feof(pb))
> > +        return AVERROR(EIO);
> 
> I think this must be AVERROR_EOF.

changed


> 
> > +    sync = get_le16(pb); // sync word
> > +    packet_size = get_le16(pb) / 8;
> > +    assert(packet_size < 8 * MAX_FRAME_SIZE);
> 
> assert is not appropriate here.

replaced


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

Awnsering whenever a program halts or runs forever is
On a turing machine, in general impossible (turings halting problem).
On any real computer, always possible as a real computer has a finite number
of states N, and will either halt in less than N cycles or never halt.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-cvslog/attachments/20110925/d400a7d3/attachment.asc>


More information about the ffmpeg-cvslog mailing list