changeset 8762:4f1567ce75c4 libavcodec

Replace hard-coded SEI type constants with symbolic names Patch by Ivan Schreter ( schreter gmx net )
author superdump
date Sun, 08 Feb 2009 20:28:12 +0000
parents 2a43b46067c4
children 8551f8149146
files h264.c h264.h
diffstat 2 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/h264.c	Sun Feb 08 18:56:33 2009 +0000
+++ b/h264.c	Sun Feb 08 20:28:12 2009 +0000
@@ -6865,11 +6865,11 @@
         }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;
--- a/h264.h	Sun Feb 08 18:56:33 2009 +0000
+++ b/h264.h	Sun Feb 08 20:28:12 2009 +0000
@@ -112,6 +112,15 @@
 };
 
 /**
+ * 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 {