[libav-commits] rtmp: Return proper error code in handle_server_bw

Samuel Pitoiset git at libav.org
Wed Jul 25 22:57:59 CEST 2012


Module: libav
Branch: master
Commit: be8f949219c03e6bf93d8d563ef33b8ad4faa1e9

Author:    Samuel Pitoiset <samuel.pitoiset at gmail.com>
Committer: Martin Storsjö <martin at martin.st>
Date:      Wed Jul 25 20:51:10 2012 +0200

rtmp: Return proper error code in handle_server_bw

Signed-off-by: Martin Storsjö <martin at martin.st>

---

 libavformat/rtmpproto.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index be61074..5ac60d2 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@ -946,7 +946,7 @@ static int handle_server_bw(URLContext *s, RTMPPacket *pkt)
     if (rt->server_bw <= 0) {
         av_log(s, AV_LOG_ERROR, "Incorrect server bandwidth %d\n",
                rt->server_bw);
-        return AVERROR(EINVAL);
+        return AVERROR_INVALIDDATA;
     }
     av_log(s, AV_LOG_DEBUG, "Server bandwidth = %d\n", rt->server_bw);
 



More information about the libav-commits mailing list