On Thu, Aug 2, 2012 at 4:11 PM, Samuel Pitoiset
samuel.pitoi...@gmail.com wrote:
---
libavformat/rtmpproto.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index 1341cd7..c130b2b 100644
--- a/libavformat/rtmpproto.c
-//TODO: check for the messages sent for wrong state?
+if (pkt-data[0] != AMF_DATA_TYPE_STRING) {
+av_log(s, AV_LOG_ERROR, No string method found in invoke
packet\n);
+return AVERROR_INVALIDDATA;
+}
+
May be you could use the ff_amf_read_string() =)
On Thu, 2 Aug 2012, Samuel Pitoiset wrote:
---
libavformat/rtmpproto.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index 1341cd7..c130b2b 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@ -1033,7
On Tue, 7 Aug 2012, Martin Storsjö wrote:
On Thu, 2 Aug 2012, Samuel Pitoiset wrote:
---
libavformat/rtmpproto.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index 1341cd7..c130b2b 100644
---
On Tue, 7 Aug 2012, Martin Storsjö wrote:
On Thu, 2 Aug 2012, Samuel Pitoiset wrote:
---
libavformat/rtmpproto.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index 1341cd7..c130b2b 100644
---
On Tue, Aug 7, 2012 at 10:03 PM, Martin Storsjö mar...@martin.st wrote:
On Tue, 7 Aug 2012, Martin Storsjö wrote:
On Thu, 2 Aug 2012, Samuel Pitoiset wrote:
---
libavformat/rtmpproto.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libavformat/rtmpproto.c
---
libavformat/rtmpproto.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index 1341cd7..c130b2b 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@ -1033,7 +1033,11 @@ static int
On Wed, Aug 1, 2012 at 12:34 AM, Derek Buitenhuis
derek.buitenh...@gmail.com wrote:
On 31/07/2012 12:17 PM, Samuel Pitoiset wrote:
+if (memcmp(pkt-data, \002, 1)) {
+av_log(s, AV_LOG_ERROR, No string method found in invoke
packet\n);
+return AVERROR_INVALIDDATA;
+}
---
libavformat/rtmpproto.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index 6044425..8c0ecb2 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@ -1038,7 +1038,11 @@ static int
On 01/08/2012 6:13 AM, Samuel Pitoiset wrote:
---
libavformat/rtmpproto.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
Looks OK, but I have no idea where the magic numbers come from
for this or the lines following it. Perhaps you can add comments
in a separate patch?
- Derek
On Wed, Aug 1, 2012 at 6:09 PM, Derek Buitenhuis
derek.buitenh...@gmail.com wrote:
On 01/08/2012 6:13 AM, Samuel Pitoiset wrote:
---
libavformat/rtmpproto.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
Looks OK, but I have no idea where the magic numbers come from
for this or
On 01/08/2012 12:27 PM, Samuel Pitoiset wrote:
0x02 is a magic number defined in the rtmp specification which
indicates that data is string.
I don't think a comment is needed here because it's already specified
in the error message.
OK.
- Derek
___
On 01/08/12 12:13, Samuel Pitoiset wrote:
---
libavformat/rtmpproto.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index 6044425..8c0ecb2 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@
On 01/08/12 22:44, Luca Barbato wrote:
On 01/08/12 12:13, Samuel Pitoiset wrote:
---
libavformat/rtmpproto.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index 6044425..8c0ecb2 100644
---
---
libavformat/rtmpproto.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index 7a00b92..26b617d 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@ -1038,7 +1038,11 @@ static int
On 31/07/2012 12:17 PM, Samuel Pitoiset wrote:
+if (memcmp(pkt-data, \002, 1)) {
+av_log(s, AV_LOG_ERROR, No string method found in invoke packet\n);
+return AVERROR_INVALIDDATA;
+}
Can you not just compare pkt-data[0] instead of using memcmp?
- Derek
16 matches
Mail list logo