On Wed, 25 Jul 2012, Martin Storsjö wrote:

On Sat, 21 Jul 2012, Samuel Pitoiset wrote:

---
libavformat/rtmpproto.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index 4747899..f3353b8 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@ -834,7 +834,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(EINVAL);
    }
    av_log(s, AV_LOG_DEBUG, "New chunk size = %d\n", rt->chunk_size);

--
1.7.11.1

There's another -1 return in this function which you could take care of at the same time.

... and now I see you do that as patch 8. It's probably better to squash them together and just name it "Return proper error codes in handle_chunk_size" or so.

// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to