[FFmpeg-devel] sdp.c and CONFIG_RTP_MUXER

Michael Niedermayer michaelni
Tue Jul 31 22:32:31 CEST 2007


On Tue, Jul 31, 2007 at 10:19:31PM +0200, Luca Abeni wrote:
> Hi Michael,
> On Tue, 2007-07-31 at 16:59 +0200, Michael Niedermayer wrote:
> [...] 
> > > Ok. The first attached patch (fix-compilation-with-sdp-2.diff) uses a an
> > > #ifdef and causes some warnings.
> > > I also attach fix-compilation-with-sdp-3.diff for comparison, which uses
> > > a more complex #ifdef but generates no warnings.
> > 
> > the second would be ok but it maybe should somehow return AVERROR(ENOSYS)
> > ?
> This would require to change the prototype for avf_sdp_create() (which
> is currently returning a char *). If this is really needed, I'll prepare
> a patch and send it tomorrow.
> BTW, since a third parameter (of type char **) has to be added to
> avf_sdp_create(), maybe it makes sense to allocate the buffer in the
> caller, changing the prototype to
> int avf_sdp_create(AVFormatContext *ac[], int n_files, char *buff, int
> size)
> Let me know your opinion.

i think caller allocated buffers are a good idea

avoids av_malloc() dependancy and free() vs. av_free() bugs

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070731/b0808af5/attachment.pgp>

More information about the ffmpeg-devel mailing list