Commit d47ed003 authored by Steve Lhomme's avatar Steve Lhomme

mkvalidator: verify that the audio sampling freq is not 0

git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/foundation_src@790 a6f86f6d-0131-4f8e-9e7b-e335508773d5
parent dc20ba92
2011-08-14
version 0.3.6:
- verify that the audio sampling freq is not 0
2011-07-10
version 0.3.5:
- fix the keyframe detection for WebM alt-ref frames (0 duration = non keyframe)
......
......@@ -334,6 +334,23 @@ static int CheckTracks(ebml_master *Tracks, int ProfileNum)
if (tcslen(String)<3 || String[1]!='_' || (String[0]!='A' && String[0]!='V' && String[0]!='S' && String[0]!='B'))
Result |= OutputWarning(0x308,T("Track #%d codec '%s' doesn't appear to be valid"),(int)EL_Int(TrackNum),String);
// check that the audio frequencies are not 0
if (EL_Int(TrackType) == TRACK_TYPE_AUDIO)
{
Elt = EBML_MasterGetChild(Track, &MATROSKA_ContextAudio);
if (Elt==NULL)
Result |= OutputWarning(0x309,T("Audio Track #%d has no audio settings"),(int)EL_Int(TrackNum));
else
{
Elt2 = EBML_MasterFindChild(Elt, &MATROSKA_ContextOutputSamplingFrequency);
if (Elt2 && EBML_FloatValue((ebml_float*)Elt2)==0)
Result |= OutputError(0x30A,T("Audio Track #%d has a null output sampling frequency"),(int)EL_Int(TrackNum));
Elt2 = EBML_MasterFindChild(Elt, &MATROSKA_ContextSamplingFrequency);
if (Elt2 && EBML_FloatValue((ebml_float*)Elt2)==0)
Result |= OutputError(0x30A,T("Audio Track #%d has a null sampling frequency"),(int)EL_Int(TrackNum));
}
}
if (ProfileNum==PROFILE_WEBM)
{
if (EL_Int(TrackType) != TRACK_TYPE_AUDIO && EL_Int(TrackType) != TRACK_TYPE_VIDEO)
......
CON mkvalidator
{
PROJECT_NAME "mkvalidator"
PROJECT_VERSION 0.3.5
PROJECT_VERSION 0.3.6
PROJECT_VENDOR "Matroska"
USE matroska2
SOURCE mkvalidator.c
......
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