[FFmpeg-devel] [PATCH] RTP/Vorbis payload implementation (GSoC qual task)
Colin McQuillan
m.niloc
Mon Apr 13 15:45:02 CEST 2009
2009/4/13 Michael Niedermayer <michaelni at gmx.at>:
> On Mon, Apr 13, 2009 at 12:58:01PM +0100, Colin McQuillan wrote:
>> 2009/4/12 Michael Niedermayer <michaelni at gmx.at>:
>> > On Sun, Apr 12, 2009 at 01:48:26PM +0100, Colin McQuillan wrote:
>> >> Thanks for the reviews! Updated patch attached.
> [...]
>> Updated patch attached.
> [...]
>> @@ -261,18 +266,23 @@ int rtsp_next_attr_and_value(const char **p, char
>> ?static void sdp_parse_fmtp(AVStream *st, const char *p)
>> ?{
>> ? ? ?char attr[256];
>> - ? ?char value[4096];
>> + ? ?int value_alloc = FFMIN(INT_MAX,strlen(p));
>> + ? ?char *value = av_malloc(value_alloc);
>> ? ? ?int i;
>>
>> ? ? ?RTSPStream *rtsp_st = st->priv_data;
>> ? ? ?AVCodecContext *codec = st->codec;
>> ? ? ?RTPPayloadData *rtp_payload_data = &rtsp_st->rtp_payload_data;
>>
>> + ? ?if (!value)
>> + ? ? ? ?return;
>> +
>> ? ? ?/* loop on each attribute */
>> - ? ?while(rtsp_next_attr_and_value(&p, attr, sizeof(attr), value, sizeof(value)))
>> + ? ?while(rtsp_next_attr_and_value(&p, attr, sizeof(attr), value, value_alloc))
>> ? ? ?{
>> ? ? ? ? ?/* grab the codec extra_data from the config parameter of the fmtp line */
>> - ? ? ? ?sdp_parse_fmtp_config(codec, attr, value);
>> + ? ? ? ?sdp_parse_fmtp_config(codec, rtsp_st->dynamic_protocol_context,
>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?attr, value);
>> ? ? ? ? ?/* Looking for a known attribute */
>> ? ? ? ? ?for (i = 0; attr_names[i].str; ++i) {
>> ? ? ? ? ? ? ?if (!strcasecmp(attr, attr_names[i].str)) {
>> @@ -283,6 +293,7 @@ static void sdp_parse_fmtp(AVStream *st, const cha
>> ? ? ? ? ? ? ?}
>> ? ? ? ? ?}
>> ? ? ?}
>> + ? ?av_free(value);
>> ?}
>>
>
> the value malloc change is a seperate thing and belongs in a seperate patch
>
> [...]
ffmpeg-large-fmtp-params.patch is the first patch. This allows large
FMTP parameter values as used by Vorbis.
ffmpeg-vorbis-rtp-4.patch is the second patch implementing Vorbis over RTP.
--
Colin McQuillan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg-large-fmtp-params.patch
Type: text/x-diff
Size: 1368 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090413/551b7efb/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg-vorbis-rtp-4.patch
Type: text/x-diff
Size: 12117 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090413/551b7efb/attachment-0001.patch>
More information about the ffmpeg-devel
mailing list