rtmp: Return proper error code in handle_client_bw
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 25 Jul 2012 18:51:09 +0000 (20:51 +0200)
committerMartin Storsjö <martin@martin.st>
Wed, 25 Jul 2012 20:57:00 +0000 (23:57 +0300)
Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/rtmpproto.c

index 5aa6a54..be61074 100644 (file)
@@ -930,7 +930,7 @@ static int handle_client_bw(URLContext *s, RTMPPacket *pkt)
         av_log(s, AV_LOG_ERROR,
                "Client bandwidth report packet is less than 4 bytes long (%d)\n",
                pkt->data_size);
-        return -1;
+        return AVERROR_INVALIDDATA;
     }
     av_log(s, AV_LOG_DEBUG, "Client bandwidth = %d\n", AV_RB32(pkt->data));
     rt->client_report_size = AV_RB32(pkt->data) >> 1;