From bc0522dffacb9ef8f4eac8e47f73fea58c216799 Mon Sep 17 00:00:00 2001 From: Martin Storsjö Date: Mon, 8 Apr 2013 17:34:38 +0300 Subject: h264pred: Add a few missing const declarations for ff_cropTbl derived pointers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The pointers that get assigned ff_cropTbl were made const in 9e0f14f1, but other variables that transitively are assigned based on these variables were missed. Signed-off-by: Martin Storsjö --- libavcodec/h264pred.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/h264pred.c b/libavcodec/h264pred.c index 07aa2ae04e..6825cf27c3 100644 --- a/libavcodec/h264pred.c +++ b/libavcodec/h264pred.c @@ -273,7 +273,7 @@ static void pred4x4_tm_vp8_c(uint8_t *src, const uint8_t *topright, int y; for (y = 0; y < 4; y++) { - uint8_t *cm_in = cm + src[-1]; + const uint8_t *cm_in = cm + src[-1]; src[0] = cm_in[top[0]]; src[1] = cm_in[top[1]]; src[2] = cm_in[top[2]]; @@ -299,7 +299,7 @@ static void pred16x16_tm_vp8_c(uint8_t *src, ptrdiff_t stride) int y; for (y = 0; y < 16; y++) { - uint8_t *cm_in = cm + src[-1]; + const uint8_t *cm_in = cm + src[-1]; src[0] = cm_in[top[0]]; src[1] = cm_in[top[1]]; src[2] = cm_in[top[2]]; @@ -381,7 +381,7 @@ static void pred8x8_tm_vp8_c(uint8_t *src, ptrdiff_t stride) int y; for (y = 0; y < 8; y++) { - uint8_t *cm_in = cm + src[-1]; + const uint8_t *cm_in = cm + src[-1]; src[0] = cm_in[top[0]]; src[1] = cm_in[top[1]]; src[2] = cm_in[top[2]]; -- cgit v1.2.3 From 350ad50bf45d1c2930ac249e3cbcc5b0aebd626b Mon Sep 17 00:00:00 2001 From: Andrew Van Til Date: Fri, 5 Apr 2013 01:45:52 +0200 Subject: lavf: Use RTP_MAX_PACKET_LENGTH instead of 1500 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- libavformat/rtsp.c | 2 +- libavformat/sapdec.c | 5 +++-- libavformat/srtp.c | 4 ++-- libavformat/srtpproto.c | 3 ++- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 1ce28d6457..9dfb97508c 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -2138,7 +2138,7 @@ static int rtp_probe(AVProbeData *p) static int rtp_read_header(AVFormatContext *s) { - uint8_t recvbuf[1500]; + uint8_t recvbuf[RTP_MAX_PACKET_LENGTH]; char host[500], sdp[500]; int ret, port; URLContext* in = NULL; diff --git a/libavformat/sapdec.c b/libavformat/sapdec.c index c1cdc8fb72..0280cead9c 100644 --- a/libavformat/sapdec.c +++ b/libavformat/sapdec.c @@ -27,6 +27,7 @@ #include "internal.h" #include "avio_internal.h" #include "url.h" +#include "rtpdec.h" #if HAVE_POLL_H #include #endif @@ -63,7 +64,7 @@ static int sap_read_header(AVFormatContext *s) { struct SAPState *sap = s->priv_data; char host[1024], path[1024], url[1024]; - uint8_t recvbuf[1500]; + uint8_t recvbuf[RTP_MAX_PACKET_LENGTH]; int port; int ret, i; AVInputFormat* infmt; @@ -186,7 +187,7 @@ static int sap_fetch_packet(AVFormatContext *s, AVPacket *pkt) int fd = ffurl_get_file_handle(sap->ann_fd); int n, ret; struct pollfd p = {fd, POLLIN, 0}; - uint8_t recvbuf[1500]; + uint8_t recvbuf[RTP_MAX_PACKET_LENGTH]; if (sap->eof) return AVERROR_EOF; diff --git a/libavformat/srtp.c b/libavformat/srtp.c index 1fe34a7c5a..4628da2d48 100644 --- a/libavformat/srtp.c +++ b/libavformat/srtp.c @@ -419,7 +419,7 @@ static void test_encrypt(const uint8_t *data, int in_len, const char *suite, { struct SRTPContext enc = { 0 }, dec = { 0 }; int len; - char buf[1500]; + char buf[RTP_MAX_PACKET_LENGTH]; ff_srtp_set_crypto(&enc, suite, key); ff_srtp_set_crypto(&dec, suite, key); len = ff_srtp_encrypt(&enc, data, in_len, buf, sizeof(buf)); @@ -441,7 +441,7 @@ int main(void) static const char *aes128_32_suite = "AES_CM_128_HMAC_SHA1_32"; static const char *aes128_80_32_suite = "SRTP_AES128_CM_HMAC_SHA1_32"; static const char *test_key = "abcdefghijklmnopqrstuvwxyz1234567890ABCD"; - uint8_t buf[1500]; + uint8_t buf[RTP_MAX_PACKET_LENGTH]; struct SRTPContext srtp = { 0 }; int len; ff_srtp_set_crypto(&srtp, aes128_80_suite, aes128_80_key); diff --git a/libavformat/srtpproto.c b/libavformat/srtpproto.c index 1cacfdbb06..f9b94d7e91 100644 --- a/libavformat/srtpproto.c +++ b/libavformat/srtpproto.c @@ -25,6 +25,7 @@ #include "url.h" #include "internal.h" +#include "rtpdec.h" #include "srtp.h" typedef struct SRTPProtoContext { @@ -33,7 +34,7 @@ typedef struct SRTPProtoContext { const char *out_suite, *out_params; const char *in_suite, *in_params; struct SRTPContext srtp_out, srtp_in; - uint8_t encryptbuf[1500]; + uint8_t encryptbuf[RTP_MAX_PACKET_LENGTH]; } SRTPProtoContext; #define D AV_OPT_FLAG_DECODING_PARAM -- cgit v1.2.3 From 0e729b2290cf2fc8084c18294a46d996c41e3924 Mon Sep 17 00:00:00 2001 From: Andrew Van Til Date: Fri, 5 Apr 2013 01:46:50 +0200 Subject: rtpdec: Increase max rtp packet size to 8192 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes connecting to "Ceton InfiniTV4 PCIe & USB". Signed-off-by: Martin Storsjö --- libavformat/rtpdec.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/rtpdec.h b/libavformat/rtpdec.h index a93963a7a8..6e923d9b1c 100644 --- a/libavformat/rtpdec.h +++ b/libavformat/rtpdec.h @@ -33,7 +33,7 @@ typedef struct PayloadContext PayloadContext; typedef struct RTPDynamicProtocolHandler RTPDynamicProtocolHandler; #define RTP_MIN_PACKET_LENGTH 12 -#define RTP_MAX_PACKET_LENGTH 1500 +#define RTP_MAX_PACKET_LENGTH 8192 #define RTP_REORDER_QUEUE_DEFAULT_SIZE 10 -- cgit v1.2.3 From fc792308c5ae03d245e8bb7d3bf7fca08d6528e3 Mon Sep 17 00:00:00 2001 From: Martin Storsjö Date: Tue, 9 Apr 2013 11:56:55 +0300 Subject: srtp: Include rtpdec.h for RTP_MAX_PACKET_LENGTH MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This was missed from 350ad50b - this fixes building the fate-srtp test. Signed-off-by: Martin Storsjö --- libavformat/srtp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/srtp.c b/libavformat/srtp.c index 4628da2d48..6659bfc5c9 100644 --- a/libavformat/srtp.c +++ b/libavformat/srtp.c @@ -25,6 +25,7 @@ #include "libavutil/intreadwrite.h" #include "libavutil/log.h" #include "rtp.h" +#include "rtpdec.h" #include "srtp.h" void ff_srtp_free(struct SRTPContext *s) -- cgit v1.2.3