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/sapenc.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/sapenc.c')
-rw-r--r-- | libavformat/sapenc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/sapenc.c b/libavformat/sapenc.c index 0c3e95edd6..7e84a3fb99 100644 --- a/libavformat/sapenc.c +++ b/libavformat/sapenc.c @@ -150,8 +150,10 @@ static int sap_write_header(AVFormatContext *s) ret = AVERROR(EIO); goto fail; } - s->streams[i]->priv_data = contexts[i] = - ff_rtp_chain_mux_open(s, s->streams[i], fd, 0); + ret = ff_rtp_chain_mux_open(&contexts[i], s, s->streams[i], fd, 0); + if (ret < 0) + goto fail; + s->streams[i]->priv_data = contexts[i]; av_strlcpy(contexts[i]->filename, url, sizeof(contexts[i]->filename)); } |