[DVDnav-discuss] [PATCH] Fix the audio format enum in dvd_types.h

Erik Hovland erik at hovland.org
Thu Mar 21 23:09:41 CET 2013


> the enum DVDAudioFormat_t in dvd_types.h contains wrongly defined
> constants, especially lpcm is 4 not 5.

This looks right. Here is the same patch, but it moves the enum out of the
commented out area of the header.

diff --git a/src/dvdnav/dvd_types.h b/src/dvdnav/dvd_types.h
index 95717cd..fd631a3 100644
--- a/src/dvdnav/dvd_types.h
+++ b/src/dvdnav/dvd_types.h
@@ -64,6 +64,17 @@ typedef struct {
   uint32_t buttonN;
 } dvdnav_highlight_area_t;

+/* The audio format */
+typedef enum {
+  DVD_AUDIO_FORMAT_AC3        = 0,
+  DVD_AUDIO_FORMAT_UNKNOWN_1  = 1,
+  DVD_AUDIO_FORMAT_MPEG       = 2,
+  DVD_AUDIO_FORMAT_MPEG2_EXT  = 3,
+  DVD_AUDIO_FORMAT_LPCM       = 4,
+  DVD_AUDIO_FORMAT_UNKNOWN_5  = 5,
+  DVD_AUDIO_FORMAT_DTS        = 6,
+  DVD_AUDIO_FORMAT_SDDS       = 7
+} DVDAudioFormat_t;

 /* the following types are currently unused */

@@ -156,19 +167,6 @@ typedef enum {
   DVD_AUDIO_APP_MODE_Other    = 3
 } DVDAudioAppMode_t;

-/* The audio format */
-typedef enum {
-  DVD_AUDIO_FORMAT_AC3       = 0,
-  DVD_AUDIO_FORMAT_MPEG1     = 1,
-  DVD_AUDIO_FORMAT_MPEG1_DRC = 2,
-  DVD_AUDIO_FORMAT_MPEG2     = 3,
-  DVD_AUDIO_FORMAT_MPEG2_DRC = 4,
-  DVD_AUDIO_FORMAT_LPCM      = 5,
-  DVD_AUDIO_FORMAT_DTS       = 6,
-  DVD_AUDIO_FORMAT_SDDS      = 7,
-  DVD_AUDIO_FORMAT_Other     = 8
-} DVDAudioFormat_t;
-
 /* Audio language extension */
 typedef enum {
   DVD_AUDIO_LANG_EXT_NotSpecified       = 0,

--
Erik Hovland
erik at hovland.org
http://hovland.org/


More information about the DVDnav-discuss mailing list