The subject line of the commit is ok (although it could ideally be
shorter).
On Thu, 26 Jul 2012, Samuel Pitoiset wrote:
When the server sends a chunk size packet less than 4 bytes long
we return a proper error code.
Returning a proper error code is already in place, this commit doesn't
change that at all. In this case, this second paragraph of the commit
message can be dropped altogether.
---
libavformat/rtmpproto.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index 8d388ab..bfdd535 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@ -885,9 +885,9 @@ static int handle_chunk_size(URLContext *s, RTMPPacket *pkt)
RTMPContext *rt = s->priv_data;
int ret;
- if (pkt->data_size != 4) {
+ if (pkt->data_size < 4) {
av_log(s, AV_LOG_ERROR,
- "Chunk size change packet is not 4 bytes long (%d)\n",
+ "Chunk size report packet is less than 4 bytes long (%d)\n",
I'd rather have the error message say "Too short chunk size change packet
(%d)". Also note, originally this said "chunk size _change_", but you
change it to "chunk size _report_".
// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel