[FFmpeg-devel] [PATCH] rl2 format demuxer
Sascha Sommer
saschasommer
Fri Mar 21 13:31:08 CET 2008
Hi,
> > + if(AV_RB32(&p->buf[8]) != RLV2_TAG &&
>
> trailing whitespace
>
>
Fixed.
> > + if(get_buffer(pb,st->codec->extradata,EXTRADATA1_SIZE) !=
> > EXTRADATA1_SIZE) + return AVERROR(EIO);
> > +
> > + /** get background frame */
> > + if(signature == RLV3_TAG && back_size > 0){
> > + if(get_buffer(pb,st->codec->extradata +
> > EXTRADATA1_SIZE,back_size) != back_size) + return
> > AVERROR(EIO);
> > + }
>
> isnt that the same as
>
> if(get_buffer(pb,st->codec->extradata,st->codec->extradata_size) !=
> st->codec->extradata_size) return AVERROR(EIO);
>
> ?
>
Changed although I do not know what is correct in case of back_frame_size > 0
and signature != RLV3_TAG due to a lack of samples.
>
> [...]
>
> > + chunk_size = av_malloc(frame_count * sizeof(uint32_t));
> > + audio_size = av_malloc(frame_count * sizeof(uint32_t));
> > + chunk_offset = av_malloc(frame_count * sizeof(uint32_t));
>
> vertical align
>
done
>
> [...]
>
> > + /** fill the packet */
> > + ret = av_get_packet(pb, pkt, sample->size);
> > + if(ret != sample->size)
> > + ret = AVERROR(EIO);
>
> memleak
>
fixed
>
> [...]
>
> > +AVInputFormat rl2_demuxer = {
> > + "rl2",
> > + "rl2 format",
> > + sizeof(Rl2DemuxContext),
> > + rl2_probe,
> > + rl2_read_header,
> > + rl2_read_packet,
> > +};
>
> What about adding seeking support? :)
>
What a surprising question ;)
Regards
Sascha
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rl2_demuxer_try11.patch
Type: text/x-diff
Size: 10906 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080321/3a0d7c95/attachment.patch>
More information about the ffmpeg-devel
mailing list