diff options
author | Martin Storsjö <martin@martin.st> | 2012-05-25 22:26:00 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2012-05-26 13:35:44 +0300 |
commit | 68c813081b48aaa910cd2e7832314a529c4c4a36 (patch) | |
tree | 686b6e789214b8092e042c086b616189f16ad125 /libavformat/rtsp.c | |
parent | 93cef6f923d9842b647665f3b42342fa71887a18 (diff) | |
download | ffmpeg-68c813081b48aaa910cd2e7832314a529c4c4a36.tar.gz |
rtpenc_chain: Return an error code instead of just a plain pointer
Also check the return value in sapenc.
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r-- | libavformat/rtsp.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 31eb4befd6..f53aadf191 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -606,11 +606,13 @@ static int rtsp_open_transport_ctx(AVFormatContext *s, RTSPStream *rtsp_st) s->ctx_flags |= AVFMTCTX_NOHEADER; if (s->oformat && CONFIG_RTSP_MUXER) { - rtsp_st->transport_priv = ff_rtp_chain_mux_open(s, st, - rtsp_st->rtp_handle, - RTSP_TCP_MAX_PACKET_SIZE); + int ret = ff_rtp_chain_mux_open(&rtsp_st->transport_priv, s, st, + rtsp_st->rtp_handle, + RTSP_TCP_MAX_PACKET_SIZE); /* Ownership of rtp_handle is passed to the rtp mux context */ rtsp_st->rtp_handle = NULL; + if (ret < 0) + return ret; } else if (rt->transport == RTSP_TRANSPORT_RDT && CONFIG_RTPDEC) rtsp_st->transport_priv = ff_rdt_parse_open(s, st->index, rtsp_st->dynamic_protocol_context, |