Commit 6eba3a1e authored by rtogni's avatar rtogni

Do not return invalid pointer for non-audio or video streams.

Patch by Sam Hocevar sam+ffmpeg zoy org


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@8564 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 4dde292e
...@@ -954,9 +954,8 @@ resync: ...@@ -954,9 +954,8 @@ resync:
len=len2; len=len2;
rm->remaining_len-= len; rm->remaining_len-= len;
av_get_packet(pb, pkt, len); av_get_packet(pb, pkt, len);
}
if (st->codec->codec_type == CODEC_TYPE_AUDIO) { } else if (st->codec->codec_type == CODEC_TYPE_AUDIO) {
if ((st->codec->codec_id == CODEC_ID_RA_288) || if ((st->codec->codec_id == CODEC_ID_RA_288) ||
(st->codec->codec_id == CODEC_ID_COOK)) { (st->codec->codec_id == CODEC_ID_COOK)) {
int x; int x;
...@@ -1008,7 +1007,9 @@ resync: ...@@ -1008,7 +1007,9 @@ resync:
} }
} else } else
av_get_packet(pb, pkt, len); av_get_packet(pb, pkt, len);
}
} else
av_get_packet(pb, pkt, len);
if( (st->discard >= AVDISCARD_NONKEY && !(flags&2)) if( (st->discard >= AVDISCARD_NONKEY && !(flags&2))
|| st->discard >= AVDISCARD_ALL){ || st->discard >= AVDISCARD_ALL){
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment