# HG changeset patch # User superdump # Date 1234124892 0 # Node ID 4f1567ce75c44f8312233046528708b7a319d7ac # Parent 2a43b46067c46df4e579fe112ef37acb264334cd Replace hard-coded SEI type constants with symbolic names Patch by Ivan Schreter ( schreter gmx net ) diff -r 2a43b46067c4 -r 4f1567ce75c4 h264.c --- 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; diff -r 2a43b46067c4 -r 4f1567ce75c4 h264.h --- 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 {