Bug 1360396 - Update nestegg from upstream. r=kinetik

Pull recent changes from the upstream nestegg webm parser
repo. This include a definition of NESTEGG_CODEC_AV1 for
supporting the Alliance for Open Media's AV1 video codec,
and a fix for an unitialized variable warning.

MozReview-Commit-ID: EC1WsaFYlqo

--HG--
extra : rebase_source : 22139c35e505b9cf3c165ff76cdfaaea953baf4d
This commit is contained in:
Ralph Giles 2017-04-27 17:14:25 -07:00
parent c310aaa870
commit b50ae2a480
3 changed files with 9 additions and 4 deletions

View file

@ -3,6 +3,6 @@ git repository using the update.sh script. The only changes
made were those applied by update.sh and the addition of
Makefile.in build files for the Mozilla build system.
The nestegg git repository is: git://github.com/kinetiknz/nestegg.git
The nestegg git repository is: https://github.com/kinetiknz/nestegg
The git commit ID used was 5e2fb721d5808785475d68f63fc97d45b8a4ef03.
The git commit ID used was af26fc354ec9eadf5fcd34fb01223be3f6f8a773.

View file

@ -27,7 +27,7 @@ extern "C" {
@code
nestegg * demux_ctx;
nestegg_init(&demux_ctx, io, NULL);
nestegg_init(&demux_ctx, io, NULL, -1);
nestegg_packet * pkt;
while ((r = nestegg_read_packet(demux_ctx, &pkt)) > 0) {
@ -71,6 +71,7 @@ extern "C" {
#define NESTEGG_CODEC_VORBIS 1 /**< Track uses Xiph Vorbis codec. */
#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_UNKNOWN INT_MAX /**< Track uses unknown codec. */
#define NESTEGG_VIDEO_MONO 0 /**< Track is mono video. */

View file

@ -154,6 +154,7 @@ enum ebml_type_enum {
/* Track IDs */
#define TRACK_ID_VP8 "V_VP8"
#define TRACK_ID_VP9 "V_VP9"
#define TRACK_ID_AV1 "V_AV1"
#define TRACK_ID_VORBIS "A_VORBIS"
#define TRACK_ID_OPUS "A_OPUS"
@ -1046,7 +1047,7 @@ static int
ne_read_simple(nestegg * ctx, struct ebml_element_desc * desc, size_t length)
{
struct ebml_type * storage;
int r;
int r = -1;
storage = (struct ebml_type *) (ctx->ancestor->data + desc->offset);
@ -2370,6 +2371,9 @@ nestegg_track_codec_id(nestegg * ctx, unsigned int track)
if (strcmp(codec_id, TRACK_ID_VP9) == 0)
return NESTEGG_CODEC_VP9;
if (strcmp(codec_id, TRACK_ID_AV1) == 0)
return NESTEGG_CODEC_AV1;
if (strcmp(codec_id, TRACK_ID_VORBIS) == 0)
return NESTEGG_CODEC_VORBIS;