[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r10053: Add another robustness check
From: |
Bastiaan Jacques |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r10053: Add another robustness check in FLVParser. Add the new Speex codec type |
Date: |
Wed, 22 Oct 2008 23:11:11 +0200 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 10053
committer: Bastiaan Jacques <address@hidden>
branch nick: trunk
timestamp: Wed 2008-10-22 23:11:11 +0200
message:
Add another robustness check in FLVParser. Add the new Speex codec type
to MediaParser; not implemented yet.
modified:
libmedia/FLVParser.cpp
libmedia/MediaParser.cpp
libmedia/MediaParser.h
=== modified file 'libmedia/FLVParser.cpp'
--- a/libmedia/FLVParser.cpp 2008-10-22 11:46:55 +0000
+++ b/libmedia/FLVParser.cpp 2008-10-22 21:11:11 +0000
@@ -436,12 +436,17 @@
}
metaTag->resize(actuallyRead);
+ boost::uint32_t terminus = getUInt24(metaTag->data() +
actuallyRead - 3);
+ if (terminus != 9) {
+ log_error(_("Corrupt FLV: Meta tag unterminated!"));
+ }
+
boost::mutex::scoped_lock lock(_metaTagsMutex);
_metaTags.push_back(new MetaTag(flvtag.timestamp, metaTag));
}
else
{
- log_error("FLVParser::parseNextTag: unknown FLV tag type %d",
(int)chunk[0]);
+ log_error(_("FLVParser::parseNextTag: unknown FLV tag type
%d"), (int)chunk[0]);
return false;
}
=== modified file 'libmedia/MediaParser.cpp'
--- a/libmedia/MediaParser.cpp 2008-10-22 12:47:50 +0000
+++ b/libmedia/MediaParser.cpp 2008-10-22 21:11:11 +0000
@@ -449,6 +449,9 @@
case AUDIO_CODEC_AAC:
os << "Advanced Audio Coding";
break;
+ case AUDIO_CODEC_SPEEX:
+ os << "Speex";
+ break;
default:
os << "unknown/invalid";
break;
=== modified file 'libmedia/MediaParser.h'
--- a/libmedia/MediaParser.h 2008-10-22 12:36:28 +0000
+++ b/libmedia/MediaParser.h 2008-10-22 21:11:11 +0000
@@ -122,7 +122,10 @@
AUDIO_CODEC_NELLYMOSER = 6,
/// Advanced Audio Coding
- AUDIO_CODEC_AAC = 10
+ AUDIO_CODEC_AAC = 10,
+
+ /// Always 16kHz mono
+ AUDIO_CODEC_SPEEX = 11
// NOTE: if you add more elements here remember to
// also add them to the output operator!
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r10053: Add another robustness check in FLVParser. Add the new Speex codec type,
Bastiaan Jacques <=