Merge pull request #5332 from raven02/patch-3

Sanity Check ctx->mpegFirstTimestamp != 90000
This commit is contained in:
Henrik Rydgård 2014-02-04 01:42:29 -08:00
commit 013a20f61a

View File

@ -263,7 +263,12 @@ void AnalyzeMpeg(u8 *buffer, MpegContext *ctx) {
ctx->audioFrameCount = 0;
ctx->endOfAudioReached = false;
ctx->endOfVideoReached = false;
// Sanity Check ctx->mpegFirstTimestamp
if (ctx->mpegFirstTimestamp != 90000) {
WARN_LOG_REPORT(ME, "Unexpected mpeg first timestamp: %llx / %lld", ctx->mpegFirstTimestamp, ctx->mpegFirstTimestamp);
}
if (ctx->mpegMagic != PSMF_MAGIC || ctx->mpegVersion < 0 ||
(ctx->mpegOffset & 2047) != 0 || ctx->mpegOffset == 0) {
// mpeg header is invalid!