Commit 5d08f814 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'f542dedf'

* commit 'f542dedf':
  rtspenc: Check the return value from ffio_open_dyn_packet_buf
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 7f43a09d f542dedf
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment