On 12/20/2011 05:43 PM, Janne Grunau wrote:
From: Tomas Härdin<[email protected]>
---
libavformat/mxfdec.c | 108 +++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 107 insertions(+), 1 deletions(-)
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 2a455d7..7d153dc 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -52,6 +52,35 @@
#include "internal.h"
#include "mxf.h"
+typedef enum {
+ Header,
+ BodyPartition,
+ Footer
+} MXFPartitionType;
+
+typedef enum {
+ OP1a,
+ OP1b,
+ OP1c,
+ OP2a,
+ OP2b,
+ OP2c,
+ OP3a,
+ OP3b,
+ OP3c,
+ OPAtom,
+} MXFOP;
+
I like my enums and defines to have capital letters.
+ switch(uid[13]) {
+ case 2:
+ partition->type = Header;
+ break;
+ case 3:
+ partition->type = BodyPartition;
+ break;
+ case 4:
+ partition->type = Footer;
+ break;
+ default:
+ av_log(mxf->fc, AV_LOG_ERROR, "unknown partition type %i\n", uid[13]);
+ return AVERROR_INVALIDDATA;
+ }
LGTM otherwise.
MvH
Benjamin Larsson
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel