Skip to content

Commit

Permalink
Remove temporary support for incorrectly encoded WebM videos on YouTube.
Browse files Browse the repository at this point in the history
  • Loading branch information
kinetiknz committed Jul 23, 2010
1 parent 5b7e8d1 commit dfc6af1
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions src/nestegg.c
Expand Up @@ -1446,10 +1446,8 @@ nestegg_init(nestegg ** context, nestegg_io io, nestegg_log callback)
return -1;
}

/* XXX youtube hack: accept webm and matroska for now */
if (get_string(ctx->ebml.doctype, &doctype) == 0 &&
(strcmp(doctype, "webm") == 0 ||
strcmp(doctype, "matroska") == 0) &&
strcmp(doctype, "webm") == 0 &&
get_uint(ctx->ebml.doctype_read_version, &version) == 0 && version <= 2 &&
get_uint(ctx->ebml.ebml_read_version, &version) == 0 && version <= 1 &&
!ctx->segment.tracks.track_entry.head) {
Expand Down Expand Up @@ -1644,7 +1642,6 @@ int
nestegg_track_codec_id(nestegg * ctx, unsigned int track)
{
char * codec_id;
struct ebml_binary codec_private;
struct track_entry * entry;

entry = find_track_entry(ctx, track);
Expand All @@ -1660,15 +1657,6 @@ nestegg_track_codec_id(nestegg * ctx, unsigned int track)
if (strcmp(codec_id, "A_VORBIS") == 0)
return NESTEGG_CODEC_VORBIS;

/* XXX youtube hack: accept VFW codec id for now */
if (strcmp(codec_id, "V_MS/VFW/FOURCC") == 0 &&
get_binary(entry->codec_private, &codec_private) == 0 &&
codec_private.length >= 40) {
struct bitmapinfoheader * bih = (struct bitmapinfoheader *) codec_private.data;
if (bih->compression == 0x30385056)
return NESTEGG_CODEC_VP8;
}

return -1;
}

Expand Down

0 comments on commit dfc6af1

Please sign in to comment.