[FFmpeg-devel] [PATCH] rl2 format demuxer
Sascha Sommer
saschasommer
Thu Mar 20 19:44:11 CET 2008
Hi,
> > + int ret = 0;
> > +
>
> trailing whitespace ...
>
>
Fixed.
> > + 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));
> > +
> > + if(!chunk_size || !audio_size || !chunk_offset)
> > + return AVERROR(ENOMEM);
>
> memleak
>
Fixed.
> > + /** build the sample index */
> > + for(i=0;i<frame_count;i++){
> > + if(audio_size[i] < 0 || chunk_size[i] < 0 ||
> > + audio_size[i] > chunk_size[i]){
> > + ret = AVERROR_INVALIDDATA;
> > + break;
> > + }
>
> audio_size[i] < 0 is impossible
>
Check removed.
>
> pos= INT64_MAX;
> for(i=0; i<s->nb_streams; i++){
> if( rl2->index_pos[i] < s->streams[i]->nb_index_entries
> && s->streams[i]->index_entries[ rl2->index_pos[i] ].pos < pos){
> sample = &s->streams[i]->index_entries[ rl2->index_pos[i] ];
> pos= sample->pos;
> stream_id= i;
> }
> }
>
Code uses your version now.
Regards
Sascha
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rl2_demuxer_try10.patch
Type: text/x-diff
Size: 9744 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080320/ebffa91c/attachment.patch>
More information about the ffmpeg-devel
mailing list