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

Michael Niedermayer michaelni
Mon Apr 13 15:52:38 CEST 2009


On Mon, Apr 13, 2009 at 02:45:02PM +0100, Colin McQuillan wrote:
> 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.

iam fine with the patches assumes they have been tested, work and
the rtsp/rtp mainainers are ok with them too

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

Awnsering whenever a program halts or runs forever is
On a turing machine, in general impossible (turings halting problem).
On any real computer, always possible as a real computer has a finite number
of states N, and will either halt in less than N cycles or never halt.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090413/261c9266/attachment.pgp>



More information about the ffmpeg-devel mailing list