[NUT-devel] Another suggestion for broadcast [PATCH]

Måns Rullgård mans at mansr.com
Mon Feb 11 13:17:45 CET 2008


Rich Felker wrote:
> On Thu, Feb 07, 2008 at 03:55:46AM +0100, Michael Niedermayer wrote:
>> --- nut.txt	(revision 590)
>> +++ nut.txt	(working copy)
>> @@ -412,6 +412,8 @@
>>  syncpoint:
>>      global_key_pts                      t
>>      back_ptr_div16                      v
>> +    if(bytes remaining in the syncpoint)
>> +        buffer_fullness                 v
>>      reserved_bytes
>
> Would it be possible to have this be:
>
> if (bcast flag present in global header && bytes remaining in syncpoint)
>
> This way files not utilizing the broadcast functionality would not be
> forced to waste an extra byte per syncpoint in the future when there
> might be other new fields in the syncpoint that they want to use. Also
> it's not clear that just coding a 0 for this field would even be
> valid, according to the description you wrote for buffer_fullness.
> Having a "broadcast" flag (or buffer-controlled or whatever you like
> to call it) in the header to indicate that the field is present and to
> be used solves both problems at once.

A flag, wherever it is placed, signalling the presence of optional fields
is a good idea.  That's how MPEG does it.

-- 
Måns Rullgård
mans at mansr.com



More information about the NUT-devel mailing list