On Sat, 21 Jul 2012, Samuel Pitoiset wrote:
--- libavformat/rtmpproto.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index c003b37..5af03c4 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -859,11 +859,11 @@ static int handle_client_bw(URLContext *s, RTMPPacket *pkt) { RTMPContext *rt = s->priv_data; - if (pkt->data_size < 4) { + if (pkt->data_size != 5) { av_log(s, AV_LOG_ERROR, - "Client bandwidth report packet is less than 4 bytes long (%d)\n", + "Client bandwidth packet is not 5 bytes long (%d)\n", pkt->data_size); - return -1; + return AVERROR(EINVAL); } rt->client_report_size = AV_RB32(pkt->data); -- 1.7.11.1
This changes behaviour - is there a reason to treat it as an error if the client bandwidth packet is longer than 5 bytes? I'd rather have the error code change separate from the behaviour change, and an explanation why you'd like to change the behaviour.
// Martin _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
