Replace hard-coded SEI type constants with symbolic names
authorIvan Schreter <schreter@gmx.net>
Sun, 8 Feb 2009 20:28:12 +0000 (20:28 +0000)
committerRobert Swain <robert.swain@gmail.com>
Sun, 8 Feb 2009 20:28:12 +0000 (20:28 +0000)
Patch by Ivan Schreter ( schreter gmx net )

Originally committed as revision 17064 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/h264.c
libavcodec/h264.h

index be0abd4..c5c8878 100644 (file)
@@ -6865,11 +6865,11 @@ static int decode_sei(H264Context *h){
         }while(get_bits(&s->gb, 8) == 255);
 
         switch(type){
         }while(get_bits(&s->gb, 8) == 255);
 
         switch(type){
-        case 1: // Picture timing SEI
+        case SEI_TYPE_PIC_TIMING: // Picture timing SEI
             if(decode_picture_timing(h) < 0)
                 return -1;
             break;
             if(decode_picture_timing(h) < 0)
                 return -1;
             break;
-        case 5:
+        case SEI_TYPE_USER_DATA_UNREGISTERED:
             if(decode_unregistered_user_data(h, size) < 0)
                 return -1;
             break;
             if(decode_unregistered_user_data(h, size) < 0)
                 return -1;
             break;
index e4e070a..ed9e854 100644 (file)
@@ -112,6 +112,15 @@ enum {
 };
 
 /**
 };
 
 /**
+ * SEI message types
+ */
+typedef enum {
+    SEI_TYPE_PIC_TIMING              =  1, ///< picture timing
+    SEI_TYPE_USER_DATA_UNREGISTERED  =  5, ///< unregistered user data
+    SEI_TYPE_RECOVERY_POINT          =  6  ///< recovery point (frame # to decoder sync)
+} SEI_Type;
+
+/**
  * pic_struct in picture timing SEI message
  */
 typedef enum {
  * pic_struct in picture timing SEI message
  */
 typedef enum {