List Info

Thread: mp4 fragments support




mp4 fragments support
user name
2008-03-20 14:00:46
Hi,

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.

keyframe flag is already brainded because all samples on
mplayerhq.hu
seems to have this particular symptom, though flags 0 should
not mean
keyframe.

Comments ?

-- 
Baptiste COUDURIER                              GnuPG Key
Id: 0x5C1ABAAA
SMARTJOG SAS                                     http://www.smartjog.com
Key fingerprint                
8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-develmplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel

  
Re: mp4 fragments support
country flaguser name
2008-03-20 20:36:35
On Thu, Mar 20, 2008 at 08:00:46PM +0100, Baptiste Coudurier
wrote:
> Hi,
> 
> 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
> keyframe.
> 
> 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

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-develmplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel

Re: mp4 fragments support
user name
2008-03-21 05:28:29
Hi Michael,

Michael Niedermayer wrote:
> On Thu, Mar 20, 2008 at 08:00:46PM +0100, Baptiste
Coudurier wrote:
>> Hi,
>>
>> 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

Ok. I will. I removed the mov_read_packet hunk.

>> keyframe flag is already brainded because all
samples on mplayerhq.hu
>> seems to have this particular symptom, though flags
0 should not mean
>> keyframe.
>>
>> 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.

Done.

> [...]
>> +    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)

Yes, thanks.

Update attached.

-- 
Baptiste COUDURIER                              GnuPG Key
Id: 0x5C1ABAAA
SMARTJOG SAS                                     http://www.smartjog.com
Key fingerprint                
8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-develmplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel

  
Re: mp4 fragments support
country flaguser name
2008-03-21 07:28:43
On Fri, Mar 21, 2008 at 11:28:29AM +0100, Baptiste Coudurier
wrote:
> Hi Michael,
> 
> Michael Niedermayer wrote:
> > On Thu, Mar 20, 2008 at 08:00:46PM +0100, Baptiste
Coudurier wrote:
> >> Hi,
> >>
> >> 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
> 
> Ok. I will. I removed the mov_read_packet hunk.
> 
> >> keyframe flag is already brainded because all
samples on mplayerhq.hu
> >> seems to have this particular symptom, though
flags 0 should not mean
> >> keyframe.
> >>
> >> 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.
> 
> Done.
> 
> > [...]
> >> +    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)
> 
> Yes, thanks.
> 
> Update attached.

looks ok

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

Dictatorship naturally arises out of democracy, and the most
aggravated
form of tyranny and slavery out of the most extreme liberty.
-- Plato

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-develmplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel

Re: mp4 fragments support
user name
2008-03-21 08:43:34
Michael Niedermayer wrote:
> On Fri, Mar 21, 2008 at 11:28:29AM +0100, Baptiste
Coudurier wrote:
>> Hi Michael,
>>
>> Michael Niedermayer wrote:
>>> On Thu, Mar 20, 2008 at 08:00:46PM +0100,
Baptiste Coudurier wrote:
>>>> Hi,
>>>>
>>>> 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
>> Ok. I will. I removed the mov_read_packet hunk.
>>
>>>> keyframe flag is already brainded because
all samples on mplayerhq.hu
>>>> seems to have this particular symptom,
though flags 0 should not mean
>>>> keyframe.
>>>>
>>>> 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.
>> Done.
>>
>>> [...]
>>>> +    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)
>> Yes, thanks.
>>
>> Update attached.
> 
> looks ok
> 

Applied.

-- 
Baptiste COUDURIER                              GnuPG Key
Id: 0x5C1ABAAA
SMARTJOG SAS                                     http://www.smartjog.com
Key fingerprint                
8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-develmplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel


[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )