Browse Source

flvdec: Do not call parse_keyframes_index with a NULL stream

Signed-off-by: Martin Storsjö <martin@martin.st>
tags/n0.9
Reimar Döffinger Martin Storsjö 13 years ago
parent
commit
f4b51d061f
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      libavformat/flvdec.c

+ 3
- 2
libavformat/flvdec.c View File

@@ -239,8 +239,9 @@ static int amf_parse_object(AVFormatContext *s, AVStream *astream, AVStream *vst
case AMF_DATA_TYPE_OBJECT: { case AMF_DATA_TYPE_OBJECT: {
unsigned int keylen; unsigned int keylen;


if (key && !strcmp(KEYFRAMES_TAG, key) && depth == 1)
if (parse_keyframes_index(s, ioc, vstream, max_pos) < 0)
if ((vstream || astream) && key && !strcmp(KEYFRAMES_TAG, key) && depth == 1)
if (parse_keyframes_index(s, ioc, vstream ? vstream : astream,
max_pos) < 0)
return -1; return -1;


while(avio_tell(ioc) < max_pos - 2 && (keylen = avio_rb16(ioc))) { while(avio_tell(ioc) < max_pos - 2 && (keylen = avio_rb16(ioc))) {


Loading…
Cancel
Save