On Tue, 24 Jul 2012, Samuel Pitoiset wrote:
The issue is that gcc isn't smart enough to propagate a known-0 variable
to allow dead code elimination unless optimization is enabled.
---
libavformat/rtmpproto.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index f7ba7d5..dcca8e7 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@ -719,7 +719,6 @@ static int rtmp_handshake(URLContext *s, RTMPContext *rt)
int i;
int server_pos, client_pos;
uint8_t digest[32], signature[32];
- int encrypted = rt->encrypted && CONFIG_FFRTMPCRYPT_PROTOCOL;
int ret, type = 0;
av_log(s, AV_LOG_DEBUG, "Handshaking...\n");
@@ -729,7 +728,7 @@ static int rtmp_handshake(URLContext *s, RTMPContext *rt)
for (i = 9; i <= RTMP_HANDSHAKE_PACKET_SIZE; i++)
tosend[i] = av_lfg_get(&rnd) >> 24;
- if (encrypted) {
+ if (rt->encrypted && CONFIG_FFRTMPCRYPT_PROTOCOL) {
/* When the client wants to use RTMPE, we have to change the command
* byte to 0x06 which means to use encrypted data and we have to set
* the flash version to at least 9.0.115.0. */
@@ -745,7 +744,8 @@ static int rtmp_handshake(URLContext *s, RTMPContext *rt)
return ret;
}
- client_pos = rtmp_handshake_imprint_with_digest(tosend + 1, encrypted);
+ client_pos = rtmp_handshake_imprint_with_digest(tosend + 1, rt->encrypted
&&
+
CONFIG_FFRTMPCRYPT_PROTOCOL);
This one doesn't need the CONFIG_*
Other than that, ok, I'll push with that fixed and the commit message
amended.
// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel