diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-04-09 03:09:49 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-04-09 03:17:07 +0200 |
commit | d4d09329eef30787da699c7a397b00f6f96940bc (patch) | |
tree | 3605d4e30063b924254a373e270026bca6436f11 /libavformat/sdp.c | |
parent | a61bc91d42945e6ccefef4867ef32d2073f8f8c7 (diff) | |
parent | 0c68c804196400de3c40c8849124b292ed62b99c (diff) | |
download | ffmpeg-d4d09329eef30787da699c7a397b00f6f96940bc.tar.gz |
Merge remote branch 'qatar/master'
* qatar/master:
lavf: bump minor and add an APIChanges entry for avformat cleanup
lavf: get rid of ffm-specific stuff in avformat.h
Not pulled: avio: deprecate av_protocol_next().
avio: add a function for iterating though protocol names.
lavf: rename a parameter of av_sdp_create from buff->buf
lavf: rename avf_sdp_create to av_sdp_create.
lavf: make av_guess_image2_codec internal
avio: make URLProtocol internal.
avio: make URLContext internal.
lavf: mark av_pkt_dump(_log) for remove on $next+1 bump.
lavf: use designated initializers for all protocols
applehttp: don't use deprecated url_ functions.
avio: move two ff_udp_* functions from avio_internal to url.h
asfdec: remove a forgotten declaration of nonexistent function
avio: deprecate the typedef for URLInterruptCB
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/sdp.c')
-rw-r--r-- | libavformat/sdp.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/libavformat/sdp.c b/libavformat/sdp.c index 2a8821815a..923c57fbcd 100644 --- a/libavformat/sdp.c +++ b/libavformat/sdp.c @@ -474,14 +474,14 @@ void ff_sdp_write_media(char *buff, int size, AVCodecContext *c, const char *des sdp_write_media_attributes(buff, size, c, payload_type); } -int avf_sdp_create(AVFormatContext *ac[], int n_files, char *buff, int size) +int av_sdp_create(AVFormatContext *ac[], int n_files, char *buf, int size) { AVMetadataTag *title = av_metadata_get(ac[0]->metadata, "title", NULL, 0); struct sdp_session_level s; int i, j, port, ttl, is_multicast; char dst[32], dst_type[5]; - memset(buff, 0, size); + memset(buf, 0, size); memset(&s, 0, sizeof(struct sdp_session_level)); s.user = "-"; s.src_addr = "127.0.0.1"; /* FIXME: Properly set this */ @@ -506,7 +506,7 @@ int avf_sdp_create(AVFormatContext *ac[], int n_files, char *buff, int size) } } } - sdp_write_header(buff, size, &s); + sdp_write_header(buf, size, &s); dst[0] = 0; for (i = 0; i < n_files; i++) { @@ -518,11 +518,11 @@ int avf_sdp_create(AVFormatContext *ac[], int n_files, char *buff, int size) ttl = 0; } for (j = 0; j < ac[i]->nb_streams; j++) { - ff_sdp_write_media(buff, size, + ff_sdp_write_media(buf, size, ac[i]->streams[j]->codec, dst[0] ? dst : NULL, dst_type, (port > 0) ? port + j * 2 : 0, ttl); if (port <= 0) { - av_strlcatf(buff, size, + av_strlcatf(buf, size, "a=control:streamid=%d\r\n", i + j); } } @@ -531,7 +531,7 @@ int avf_sdp_create(AVFormatContext *ac[], int n_files, char *buff, int size) return 0; } #else -int avf_sdp_create(AVFormatContext *ac[], int n_files, char *buff, int size) +int av_sdp_create(AVFormatContext *ac[], int n_files, char *buf, int size) { return AVERROR(ENOSYS); } @@ -540,3 +540,10 @@ void ff_sdp_write_media(char *buff, int size, AVCodecContext *c, const char *des { } #endif + +#if FF_API_SDP_CREATE +int avf_sdp_create(AVFormatContext *ac[], int n_files, char *buff, int size) +{ + return av_sdp_create(ac, n_files, buff, size); +} +#endif |