Commit 765af261 authored by conrad's avatar conrad

oggz-validate: check for NULL content-type in read_page; avoids segfault on

unrecognized streams. Fix from Ian Malone on ogg-dev:
http://marc.theaimsgroup.com/?l=ogg-dev&m=114012454228634&w=2


git-svn-id: http://svn.annodex.net/liboggz/trunk@2065 8158c8cd-e7e1-0310-9fa4-c5954c97daef
parent a31db8f0
......@@ -174,14 +174,17 @@ read_page (OGGZ * oggz, const ogg_page * og, long serialno, void * user_data)
if (ogg_page_bos ((ogg_page *)og)) {
content_type = ot_page_identify (og, NULL);
if (!strcmp (content_type, "Theora")) {
ovdata->theora_count++;
if (ovdata->audio_count > 0) {
log_error ();
fprintf (stderr, "serialno %010ld: Theora video bos page after audio bos page\n", serialno);
if (content_type) {
if (!strcmp (content_type, "Theora")) {
ovdata->theora_count++;
if (ovdata->audio_count > 0) {
log_error ();
fprintf (stderr, "serialno %010ld: Theora video bos page after audio bos page\n", serialno);
}
} else if (!strcmp (content_type, "Vorbis") || !strcmp (content_type, "Speex")) {
ovdata->audio_count++;
}
} else if (!strcmp (content_type, "Vorbis") || !strcmp (content_type, "Speex")) {
ovdata->audio_count++;
}
}
......
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