Merge commit 'f542dedf72091af8e6f32a12bd64289c58857c21'
* commit 'f542dedf72091af8e6f32a12bd64289c58857c21': rtspenc: Check the return value from ffio_open_dyn_packet_buf Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
5d08f8149c
@ -145,6 +145,7 @@ static int tcp_write_packet(AVFormatContext *s, RTSPStream *rtsp_st)
|
|||||||
uint8_t *interleave_header, *interleaved_packet;
|
uint8_t *interleave_header, *interleaved_packet;
|
||||||
|
|
||||||
size = avio_close_dyn_buf(rtpctx->pb, &buf);
|
size = avio_close_dyn_buf(rtpctx->pb, &buf);
|
||||||
|
rtpctx->pb = NULL;
|
||||||
ptr = buf;
|
ptr = buf;
|
||||||
while (size > 4) {
|
while (size > 4) {
|
||||||
uint32_t packet_len = AV_RB32(ptr);
|
uint32_t packet_len = AV_RB32(ptr);
|
||||||
@ -171,8 +172,7 @@ static int tcp_write_packet(AVFormatContext *s, RTSPStream *rtsp_st)
|
|||||||
size -= packet_len;
|
size -= packet_len;
|
||||||
}
|
}
|
||||||
av_free(buf);
|
av_free(buf);
|
||||||
ffio_open_dyn_packet_buf(&rtpctx->pb, RTSP_TCP_MAX_PACKET_SIZE);
|
return ffio_open_dyn_packet_buf(&rtpctx->pb, RTSP_TCP_MAX_PACKET_SIZE);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int rtsp_write_packet(AVFormatContext *s, AVPacket *pkt)
|
static int rtsp_write_packet(AVFormatContext *s, AVPacket *pkt)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user