aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/internal.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-12-04 18:26:38 +0100
committerAnton Khirnov <anton@khirnov.net>2021-12-17 10:23:07 +0100
commitfe31708eaa10af42507b8db773d5af5a56e1aff4 (patch)
tree42a49703c8f7684a85771bf9efbf8050fc9964ca /libavformat/internal.h
parentb0518f9977f6019c317e244ae6087db5ffbf0c9d (diff)
downloadffmpeg-fe31708eaa10af42507b8db773d5af5a56e1aff4.tar.gz
lavf/sdp: add more thorough error handling
Return error codes when constructing a stream config fails, rather than just disregarding the failure and continuing. Propagate the error codes from av_sdp_create().
Diffstat (limited to 'libavformat/internal.h')
-rw-r--r--libavformat/internal.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavformat/internal.h b/libavformat/internal.h
index 64407b3640..92eeb82550 100644
--- a/libavformat/internal.h
+++ b/libavformat/internal.h
@@ -556,10 +556,11 @@ uint64_t ff_parse_ntp_time(uint64_t ntp_ts);
* @param ttl the time to live of the stream, 0 if not multicast
* @param fmt the AVFormatContext, which might contain options modifying
* the generated SDP
+ * @return 0 on success, a negative error code on failure
*/
-void ff_sdp_write_media(char *buff, int size, const AVStream *st, int idx,
- const char *dest_addr, const char *dest_type,
- int port, int ttl, AVFormatContext *fmt);
+int ff_sdp_write_media(char *buff, int size, const AVStream *st, int idx,
+ const char *dest_addr, const char *dest_type,
+ int port, int ttl, AVFormatContext *fmt);
/**
* Write a packet to another muxer than the one the user originally