diff options
author | Moonchild <moonchild@palemoon.org> | 2019-07-11 14:56:41 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-11 14:56:41 +0000 |
commit | 04a7c6bb4e4048369e0a635dc02e9d83bbd59f87 (patch) | |
tree | cd580c19b66ce62987ece8df5d2ba7384c329502 /media | |
parent | dd924323c3cda022493cd78d42da190577be20cf (diff) | |
parent | 31addeaac8841867008699478ef55e1c1b3d68a7 (diff) | |
download | UXP-04a7c6bb4e4048369e0a635dc02e9d83bbd59f87.tar UXP-04a7c6bb4e4048369e0a635dc02e9d83bbd59f87.tar.gz UXP-04a7c6bb4e4048369e0a635dc02e9d83bbd59f87.tar.lz UXP-04a7c6bb4e4048369e0a635dc02e9d83bbd59f87.tar.xz UXP-04a7c6bb4e4048369e0a635dc02e9d83bbd59f87.zip |
Merge pull request #1174 from JeroenVreeken/master
Report matroska containers as supported and also support h.264 content in a matroska container file
Diffstat (limited to 'media')
-rw-r--r-- | media/libnestegg/include/nestegg.h | 1 | ||||
-rw-r--r-- | media/libnestegg/src/nestegg.c | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/media/libnestegg/include/nestegg.h b/media/libnestegg/include/nestegg.h index 2baa50bc5..777555f7b 100644 --- a/media/libnestegg/include/nestegg.h +++ b/media/libnestegg/include/nestegg.h @@ -72,6 +72,7 @@ extern "C" { #define NESTEGG_CODEC_VP9 2 /**< Track uses Google On2 VP9 codec. */ #define NESTEGG_CODEC_OPUS 3 /**< Track uses Xiph Opus codec. */ #define NESTEGG_CODEC_AV1 4 /**< Track uses AOMedia AV1 codec. */ +#define NESTEGG_CODEC_AVC1 5 /**< Track uses AVC1 'h264' */ #define NESTEGG_CODEC_UNKNOWN INT_MAX /**< Track uses unknown codec. */ #define NESTEGG_VIDEO_MONO 0 /**< Track is mono video. */ diff --git a/media/libnestegg/src/nestegg.c b/media/libnestegg/src/nestegg.c index 61c30ec6b..6f0d55b46 100644 --- a/media/libnestegg/src/nestegg.c +++ b/media/libnestegg/src/nestegg.c @@ -157,6 +157,7 @@ enum ebml_type_enum { #define TRACK_ID_AV1 "V_AV1" #define TRACK_ID_VORBIS "A_VORBIS" #define TRACK_ID_OPUS "A_OPUS" +#define TRACK_ID_AVC1 "V_MPEG4/ISO/AVC" /* Track Encryption */ #define CONTENT_ENC_ALGO_AES 5 @@ -2401,6 +2402,9 @@ nestegg_track_codec_id(nestegg * ctx, unsigned int track) if (strcmp(codec_id, TRACK_ID_OPUS) == 0) return NESTEGG_CODEC_OPUS; + if (strcmp(codec_id, TRACK_ID_AVC1) == 0) + return NESTEGG_CODEC_AVC1; + return NESTEGG_CODEC_UNKNOWN; } @@ -2459,7 +2463,8 @@ nestegg_track_codec_data(nestegg * ctx, unsigned int track, unsigned int item, return -1; if (nestegg_track_codec_id(ctx, track) != NESTEGG_CODEC_VORBIS && - nestegg_track_codec_id(ctx, track) != NESTEGG_CODEC_OPUS) + nestegg_track_codec_id(ctx, track) != NESTEGG_CODEC_OPUS && + nestegg_track_codec_id(ctx, track) != NESTEGG_CODEC_AVC1) return -1; if (ne_get_binary(entry->codec_private, &codec_private) != 0) |