[FFmpeg-devel] [PATCH] mp4 fragments support
Fri Mar 21 02:36:35 CET 2008
On Thu, Mar 20, 2008 at 08:00:46PM +0100, Baptiste Coudurier wrote:
> Here is the patch to support mp4 fragments.
> The patch is shorter than I thought.
> If stream is streamable, all fragments are parsed when reading header,
> if not atoms are read when no more samples are left.
this part could be commited seperately
> keyframe flag is already brainded because all samples on mplayerhq.hu
> seems to have this particular symptom, though flags 0 should not mean
> Comments ?
> + frag->track_id = get_be32(pb);
> + if (!frag->track_id || frag->track_id > c->fc->nb_streams)
> + return -1;
Maybe it would be safer to check this before its stored in
c->fragment->track_id instead of afterwards.
> + if (c->trex_count > UINT_MAX / sizeof(*c->trex_data))
> + return -1;
> + c->trex_data = av_realloc(c->trex_data, (c->trex_count+1)*sizeof(*c->trex_data));
c->trex_count = UINT_MAX / sizeof(*c->trex_data)
(UINT_MAX / sizeof(*c->trex_data) + 1)*sizeof(*c->trex_data)
UINT_MAX / sizeof(*c->trex_data)*sizeof(*c->trex_data) + sizeof(*c->trex_data)
patch looks ok except these
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel