diff options
author | Limin Wang <lance.lmwang@gmail.com> | 2021-12-06 05:37:08 +0300 |
---|---|---|
committer | Limin Wang <lance.lmwang@gmail.com> | 2021-12-07 15:33:17 +0300 |
commit | 6d42af02f566c2a14a72bc13517add071c1d2a2b (patch) | |
tree | b1ba567a303720c45d1f553e42bc28068882dee6 /libavformat/rtspenc.c | |
parent | f210766a55ea2db85b01038e0f4a4b8891d1903b (diff) |
avformat/rtsp: add error code handling for ff_rtsp_skip_packet()
Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Diffstat (limited to 'libavformat/rtspenc.c')
-rw-r--r-- | libavformat/rtspenc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libavformat/rtspenc.c b/libavformat/rtspenc.c index e0fed1eebe..2a00b3e18d 100644 --- a/libavformat/rtspenc.c +++ b/libavformat/rtspenc.c @@ -200,8 +200,11 @@ static int rtsp_write_packet(AVFormatContext *s, AVPacket *pkt) ret = ff_rtsp_read_reply(s, &reply, NULL, 1, NULL); if (ret < 0) return AVERROR(EPIPE); - if (ret == 1) - ff_rtsp_skip_packet(s); + if (ret == 1) { + ret = ff_rtsp_skip_packet(s); + if (ret < 0) + return ret; + } /* XXX: parse message */ if (rt->state != RTSP_STATE_STREAMING) return AVERROR(EPIPE); |