[FFmpeg-cvslog] rtmp: Return proper error codes in handle_chunk_size
Samuel Pitoiset
git at videolan.org
Thu Jul 26 21:55:13 CEST 2012
ffmpeg | branch: master | Samuel Pitoiset <samuel.pitoiset at gmail.com> | Wed Jul 25 20:51:08 2012 +0200| [e7ea6883bfaabaad20ac3d369c8293e693e3c22b] | committer: Martin Storsjö
rtmp: Return proper error codes in handle_chunk_size
Signed-off-by: Martin Storsjö <martin at martin.st>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e7ea6883bfaabaad20ac3d369c8293e693e3c22b
---
libavformat/rtmpproto.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index 31d1f69..5aa6a54 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@ -889,7 +889,7 @@ static int handle_chunk_size(URLContext *s, RTMPPacket *pkt)
av_log(s, AV_LOG_ERROR,
"Chunk size change packet is not 4 bytes long (%d)\n",
pkt->data_size);
- return -1;
+ return AVERROR_INVALIDDATA;
}
if (!rt->is_input) {
@@ -901,7 +901,7 @@ static int handle_chunk_size(URLContext *s, RTMPPacket *pkt)
rt->chunk_size = AV_RB32(pkt->data);
if (rt->chunk_size <= 0) {
av_log(s, AV_LOG_ERROR, "Incorrect chunk size %d\n", rt->chunk_size);
- return -1;
+ return AVERROR_INVALIDDATA;
}
av_log(s, AV_LOG_DEBUG, "New chunk size = %d\n", rt->chunk_size);
More information about the ffmpeg-cvslog
mailing list