Merge remote-tracking branch 'qatar/master'

* qatar/master:
  librtmp: return AVERROR_UNKNOWN instead of -1.
  librtmp: don't abuse a variable for two unrelated things.
  librtmp: add rtmp_app and rtmp_playpath private options.
  bmv: add stricter checks for invalid decoded length
  avpacket: fix duplicating side data.
  flv: support stream text data as onTextData

Conflicts:
	libavcodec/bmv.c
	libavformat/flvdec.c
	libavformat/flvenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer
2012-06-04 00:33:42 +02:00
5 changed files with 252 additions and 74 deletions

View File

@@ -143,16 +143,20 @@ static int decode_bmv_frame(const uint8_t *source, int src_len, uint8_t *frame,
switch (mode) {
case 1:
if (forward) {
if (dst - frame + SCREEN_WIDE < -frame_off ||
frame_end - dst < frame_off + len)
if (dst - frame + SCREEN_WIDE < frame_off ||
dst - frame + SCREEN_WIDE + frame_off < 0 ||
frame_end - dst < frame_off + len ||
frame_end - dst < len)
return -1;
for (i = 0; i < len; i++)
dst[i] = dst[frame_off + i];
dst += len;
} else {
dst -= len;
if (dst - frame + SCREEN_WIDE < -frame_off ||
frame_end - dst < frame_off + len)
if (dst - frame + SCREEN_WIDE < frame_off ||
dst - frame + SCREEN_WIDE + frame_off < 0 ||
frame_end - dst < frame_off + len ||
frame_end - dst < len)
return -1;
for (i = len - 1; i >= 0; i--)
dst[i] = dst[frame_off + i];