On 11/24/2013 11:08 PM, Anton Khirnov wrote: > On Sun, 24 Nov 2013 09:49:47 -0800, John Stebbins <[email protected]> > wrote: >> --- >> libavcodec/avcodec.h | 5 ++++ >> libavcodec/mpeg12dec.c | 64 >> ++++++++++++++++++++++++++++++++++++++++++++++++++ >> libavutil/frame.h | 4 ++++ >> 3 files changed, 73 insertions(+) >> >> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h >> index 4ce6d61..9e7d968 100644 >> --- a/libavcodec/avcodec.h >> +++ b/libavcodec/avcodec.h >> @@ -845,6 +845,11 @@ typedef struct AVPanScan{ >> int16_t position[3][2]; >> }AVPanScan; >> >> +typedef struct AVClosedCaption { >> + int count; >> + uint8_t data[1]; >> +} AVClosedCaption; > First, those two fields should be documented. Perhaps it's obvious to you what > they mean, but it's not so obvious to me. E.g. my first assumption would be > that > count is the size of data in bytes, but looking at the code it is not so. Would you prefer that this be the byte count? Taking a second look at it, this may be more obvious and doesn't really have much effect on the CC decoder side of things. > > Second, this is apparrently a dump of some specific wire format, right? Then > it > should be documented which one it is and the struct and the side data type > should have more specific names, so we can add other CC formats later. Will do. I thought about parsing out the fields here. But that would have complicated feeding this data to a CC decoder that expects the raw data as input. I figured parsing of CC details really belongs in a CC decoder.
-- John GnuPG fingerprint: D0EC B3DB C372 D1F1 0B01 83F0 49F1 D7B2 60D4 D0F7
signature.asc
Description: OpenPGP digital signature
_______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
