]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Replace hard-coded SEI type constants with symbolic names
authorsuperdump <superdump@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sun, 8 Feb 2009 20:28:12 +0000 (20:28 +0000)
committersuperdump <superdump@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sun, 8 Feb 2009 20:28:12 +0000 (20:28 +0000)
Patch by Ivan Schreter ( schreter gmx net )

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@17064 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavcodec/h264.c
libavcodec/h264.h

index be0abd45a3b07dae1d9c6598ae9e3d7f28a12883..c5c88787442209accef665e0ab96c8f31c4c864d 100644 (file)
@@ -6865,11 +6865,11 @@ static int decode_sei(H264Context *h){
         }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;
-        case 5:
+        case SEI_TYPE_USER_DATA_UNREGISTERED:
             if(decode_unregistered_user_data(h, size) < 0)
                 return -1;
             break;
index e4e070aab6102612c1c77e7b5c1844b386930f69..ed9e854bd55218c87ff0dd690592c772b5d1b3b0 100644 (file)
@@ -111,6 +111,15 @@ enum {
     NAL_AUXILIARY_SLICE=19
 };
 
+/**
+ * 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
  */