[FFmpeg-devel] [PATCH] RTP/Vorbis payload implementation (GSoC qual task)

Colin McQuillan m.niloc
Wed Apr 15 12:58:42 CEST 2009


2009/4/15 Luca Abeni <lucabe72 at email.it>:
> Hi,
>
> I know I am late, but...
>
> On Tue, 2009-04-14 at 15:29 +0100, Colin McQuillan wrote:
> [...]
>> +
>> +static PayloadContext *vorbis_new_extradata(void)
>> +{
>> + ? ?return av_mallocz(sizeof(PayloadContext));
>> +}
>> +
>> +static void vorbis_free_extradata(PayloadContext * data)
>> +{
>> + ? ?av_free(data);
>> +}
>
> Why "extradata"? As far as I can see, these functions do not have much
> to do with extradata... No?
>

How about vorbis_new_context instead?

>
>> +RTPDynamicProtocolHandler ff_vorbis_dynamic_handler = {
>> + ? ?"vorbis",
>> + ? ?CODEC_TYPE_AUDIO,
>> + ? ?CODEC_ID_VORBIS,
>> + ? ?NULL,
>> + ? ?vorbis_new_extradata,
>> + ? ?vorbis_free_extradata,
>> + ? ?vorbis_handle_packet
>> +};
>
> Maybe using named initialisers here would make the code more readable?
>
>
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Thanks,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Luca
>

Ok. I've also added named initializers to rtp_h264.c in the attached patch.

--
Colin McQuillan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cosmetics-renaming-and-adding-named-initializers.patch
Type: text/x-diff
Size: 2671 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090415/5f718623/attachment.patch>



More information about the ffmpeg-devel mailing list