[FFmpeg-devel] [PATCH] IFF demuxer and 8SVX decoder

Jai Menon realityman
Sun Mar 30 21:05:39 CEST 2008


On Sunday 30 March 2008 11:19:23 Michael Niedermayer wrote:
> > +static int iff_probe(AVProbeData *p)
> > +{
> > +    const uint8_t *d = p->buf;
> > +
> > +    if (AV_RL32(d) == ID_FORM
> > +        && AV_RL32(d+8) == ID_8SVX)
>
> if (   AV_RL32(d  ) == ID_FORM
>     && AV_RL32(d+8) == ID_8SVX)
>
> or
> if (AV_RL32(d  ) == ID_FORM &&
>     AV_RL32(d+8) == ID_8SVX)
>
> look better IMHO

Done

> > +static int iff_read_packet(AVFormatContext *s,
> > +                           AVPacket *pkt)
> > +{
> > +    IffDemuxContext *iff = s->priv_data;
> > +    ByteIOContext *pb = s->pb;
> > +    int ret;
> > +
> > +    if(iff->sent_bytes > iff->body_size)
> > +        return AVERROR(EIO);
> > +    ret = av_get_packet(pb, pkt, PACKET_SIZE);
> > +    iff->sent_bytes += PACKET_SIZE;
> > +
> > +    pkt->stream_index = 0;
> > +    pkt->pts = iff->audio_frame_count;
> > +    iff->audio_frame_count += ret / s->streams[0]->codec->channels;
> > +    return ret;
> > +}
>
> the first packet should have PKT_FLAG_KEY
Done


Can i commit to svn now??


Regards
Jai Menon
<realityman at gmx.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: iff_demuxer.patch
Type: text/x-diff
Size: 6508 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080330/588e9379/attachment.patch>



More information about the ffmpeg-devel mailing list