Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-08-07 13:51:45 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-08-07 13:52:05 +0400
commit5d08f8149c113bd00c5d89b09d4cd6c2b628f335 (patch)
tree6ae8e71ced24a240abdbde7e8f76804d944c8db5 /libavformat/rtspenc.c
parent7f43a09da7b5805ec1cba8cd3b0c2fee74964e6b (diff)
parentf542dedf72091af8e6f32a12bd64289c58857c21 (diff)
Merge commit 'f542dedf72091af8e6f32a12bd64289c58857c21'
* commit 'f542dedf72091af8e6f32a12bd64289c58857c21': rtspenc: Check the return value from ffio_open_dyn_packet_buf Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtspenc.c')
-rw-r--r--libavformat/rtspenc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/rtspenc.c b/libavformat/rtspenc.c
index bad6fbd3a2..bea18317fd 100644
--- a/libavformat/rtspenc.c
+++ b/libavformat/rtspenc.c
@@ -145,6 +145,7 @@ static int tcp_write_packet(AVFormatContext *s, RTSPStream *rtsp_st)
uint8_t *interleave_header, *interleaved_packet;
size = avio_close_dyn_buf(rtpctx->pb, &buf);
+ rtpctx->pb = NULL;
ptr = buf;
while (size > 4) {
uint32_t packet_len = AV_RB32(ptr);
@@ -171,8 +172,7 @@ static int tcp_write_packet(AVFormatContext *s, RTSPStream *rtsp_st)
size -= packet_len;
}
av_free(buf);
- ffio_open_dyn_packet_buf(&rtpctx->pb, RTSP_TCP_MAX_PACKET_SIZE);
- return 0;
+ return ffio_open_dyn_packet_buf(&rtpctx->pb, RTSP_TCP_MAX_PACKET_SIZE);
}
static int rtsp_write_packet(AVFormatContext *s, AVPacket *pkt)