* commit '62de693a17f9b107be7867d822d5accacd4be544':
rtp: Make sure priv_data is set before reading it
videodsp_armv5te: remove #if HAVE_ARMV5TE_EXTERNAL
get_bits: change the failure condition in init_get_bits
mpegvideo: fix loop condition in draw_line()
Conflicts:
libavcodec/get_bits.h
libavcodec/mpegvideo.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
... | ... |
@@ -22,7 +22,6 @@ |
22 | 22 |
#include "config.h" |
23 | 23 |
#include "libavutil/arm/asm.S" |
24 | 24 |
|
25 |
-#if HAVE_ARMV5TE_EXTERNAL |
|
26 | 25 |
function ff_prefetch_arm, export=1 |
27 | 26 |
subs r2, r2, #1 |
28 | 27 |
pld [r0] |
... | ... |
@@ -30,4 +29,3 @@ function ff_prefetch_arm, export=1 |
30 | 30 |
bne ff_prefetch_arm |
31 | 31 |
bx lr |
32 | 32 |
endfunc |
33 |
-#endif |
... | ... |
@@ -379,7 +379,7 @@ static inline int init_get_bits(GetBitContext *s, const uint8_t *buffer, |
379 | 379 |
int buffer_size; |
380 | 380 |
int ret = 0; |
381 | 381 |
|
382 |
- if (bit_size >= INT_MAX - 7 || bit_size < 0) { |
|
382 |
+ if (bit_size >= INT_MAX - 7 || bit_size < 0 || !buffer) { |
|
383 | 383 |
buffer_size = bit_size = 0; |
384 | 384 |
buffer = NULL; |
385 | 385 |
ret = AVERROR_INVALIDDATA; |
... | ... |
@@ -1653,7 +1653,7 @@ static void draw_line(uint8_t *buf, int sx, int sy, int ex, int ey, |
1653 | 1653 |
buf += sx + sy * stride; |
1654 | 1654 |
ex -= sx; |
1655 | 1655 |
f = ((ey - sy) << 16) / ex; |
1656 |
- for(x= 0; x <= ex; x++){ |
|
1656 |
+ for (x = 0; x <= ex; x++) { |
|
1657 | 1657 |
y = (x * f) >> 16; |
1658 | 1658 |
fr = (x * f) & 0xFFFF; |
1659 | 1659 |
buf[y * stride + x] += (color * (0x10000 - fr)) >> 16; |
... | ... |
@@ -108,7 +108,7 @@ int ff_rtp_get_payload_type(AVFormatContext *fmt, |
108 | 108 |
for (i = 0; AVRtpPayloadTypes[i].pt >= 0; ++i) |
109 | 109 |
if (AVRtpPayloadTypes[i].codec_id == codec->codec_id) { |
110 | 110 |
if (codec->codec_id == AV_CODEC_ID_H263 && (!fmt || |
111 |
- !fmt->oformat->priv_class || |
|
111 |
+ !fmt->oformat->priv_class || !fmt->priv_data || |
|
112 | 112 |
!av_opt_flag_is_set(fmt->priv_data, "rtpflags", "rfc2190"))) |
113 | 113 |
continue; |
114 | 114 |
/* G722 has 8000 as nominal rate even if the sample rate is 16000, |