diff --git a/media/libnestegg/README_MOZILLA b/media/libnestegg/README_MOZILLA index 690cdee29623..35ea8e7bd608 100644 --- a/media/libnestegg/README_MOZILLA +++ b/media/libnestegg/README_MOZILLA @@ -5,4 +5,4 @@ Makefile.in build files for the Mozilla build system. The nestegg git repository is: git://github.com/kinetiknz/nestegg.git -The git commit ID used was 17ae8cd3cb5d87c2ebdcd48cae4910f5dd86ae93. +The git commit ID used was 493fb475842db86de657101ffac9a06a0cf688de. diff --git a/media/libnestegg/include/nestegg.h b/media/libnestegg/include/nestegg.h index d3cd5cbbd7ac..9004dfb2c354 100644 --- a/media/libnestegg/include/nestegg.h +++ b/media/libnestegg/include/nestegg.h @@ -7,6 +7,7 @@ #if !defined(NESTEGG_671cac2a_365d_ed69_d7a3_4491d3538d79) #define NESTEGG_671cac2a_365d_ed69_d7a3_4491d3538d79 +#include #include #if defined(__cplusplus) @@ -62,13 +63,15 @@ extern "C" { /** @file The libnestegg C API. */ -#define NESTEGG_TRACK_VIDEO 0 /**< Track is of type video. */ -#define NESTEGG_TRACK_AUDIO 1 /**< Track is of type audio. */ +#define NESTEGG_TRACK_VIDEO 0 /**< Track is of type video. */ +#define NESTEGG_TRACK_AUDIO 1 /**< Track is of type audio. */ +#define NESTEGG_TRACK_UNKNOWN INT_MAX /**< Track is of type unknown. */ -#define NESTEGG_CODEC_VP8 0 /**< Track uses Google On2 VP8 codec. */ -#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_VP8 0 /**< Track uses Google On2 VP8 codec. */ +#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_UNKNOWN INT_MAX /**< Track uses unknown codec. */ #define NESTEGG_VIDEO_MONO 0 /**< Track is mono video. */ #define NESTEGG_VIDEO_STEREO_LEFT_RIGHT 1 /**< Track is side-by-side stereo video. Left first. */ @@ -222,16 +225,20 @@ int nestegg_track_seek(nestegg * context, unsigned int track, uint64_t tstamp); /** Query the type specified by @a track. @param context Stream context initialized by #nestegg_init. @param track Zero based track number. - @retval #NESTEGG_TRACK_VIDEO Track type is video. - @retval #NESTEGG_TRACK_AUDIO Track type is audio. + @retval #NESTEGG_TRACK_VIDEO Track type is video. + @retval #NESTEGG_TRACK_AUDIO Track type is audio. + @retval #NESTEGG_TRACK_UNKNOWN Track type is unknown. @retval -1 Error. */ int nestegg_track_type(nestegg * context, unsigned int track); /** Query the codec ID specified by @a track. @param context Stream context initialized by #nestegg_init. @param track Zero based track number. - @retval #NESTEGG_CODEC_VP8 Track codec is VP8. - @retval #NESTEGG_CODEC_VORBIS Track codec is Vorbis. + @retval #NESTEGG_CODEC_VP8 Track codec is VP8. + @retval #NESTEGG_CODEC_VP9 Track codec is VP9. + @retval #NESTEGG_CODEC_VORBIS Track codec is Vorbis. + @retval #NESTEGG_CODEC_OPUS Track codec is Opus. + @retval #NESTEGG_CODEC_UNKNOWN Track codec is unknown. @retval -1 Error. */ int nestegg_track_codec_id(nestegg * context, unsigned int track); diff --git a/media/libnestegg/src/nestegg.c b/media/libnestegg/src/nestegg.c index e281f44f694a..501bc54155e0 100644 --- a/media/libnestegg/src/nestegg.c +++ b/media/libnestegg/src/nestegg.c @@ -2187,7 +2187,7 @@ nestegg_track_type(nestegg * ctx, unsigned int track) if (type & TRACK_TYPE_AUDIO) return NESTEGG_TRACK_AUDIO; - return -1; + return NESTEGG_TRACK_UNKNOWN; } int @@ -2215,7 +2215,7 @@ nestegg_track_codec_id(nestegg * ctx, unsigned int track) if (strcmp(codec_id, TRACK_ID_OPUS) == 0) return NESTEGG_CODEC_OPUS; - return -1; + return NESTEGG_CODEC_UNKNOWN; } int