[FFmpeg-soc] [soc] libavsequencer [PATCH 05/08] Instrument handling public API header file.

Vitor Sessak vitor1001 at gmail.com
Tue Jul 13 22:48:19 CEST 2010


On 07/13/2010 10:19 PM, Sebastian Vater wrote:
> Vitor Sessak a écrit :
>> On 07/11/2010 10:07 PM, Sebastian Vater wrote:
>>> /**
>>>   * Envelope structure used by instruments to apply volume / panning
>>>   * or pitch manipulation according to an user defined waveform.
>>>   * New fields can be added to the end with minor version bumps.
>>>   * Removal, reordering and changes to existing fields require a major
>>>   * version bump.
>>>   */
>>> typedef struct AVSequencerEnvelope {
>>
>> Why not just
>>
>> typedef struct {
>>
>> ?
>
> This is a point, where I'm not sure right now:
> Is typedef struct { .. } AVSequencerEnevelope;
>
> exactly the same as:
>
> typedef struct AVSequencerEnvelope { .. } AVSequencerEnvelope;

No. With

typedef struct AVSequencerEnvelope { .. } AVSequencerEnvelope;

both

func() {
struct AVSequencerEnvelope a;
}
and
func() {
AVSequencerEnvelope a;
}

compile with no errors while with

typedef struct { .. } AVSequencerEnevelope;

only

AVSequencerEnvelope a;

is valid. I don't think allowing two similar redundant types are a good 
idea.

-Vitor


More information about the FFmpeg-soc mailing list