aboutsummaryrefslogtreecommitdiff
path: root/libavformat/sapenc.c
diff options
context:
space:
mode:
authorMartin Storsjö2012-05-25 22:26:00 +0300
committerMartin Storsjö2012-05-26 13:35:44 +0300
commit68c813081b48aaa910cd2e7832314a529c4c4a36 (patch)
tree686b6e789214b8092e042c086b616189f16ad125 /libavformat/sapenc.c
parent93cef6f923d9842b647665f3b42342fa71887a18 (diff)
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.c6
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));
}