diff options
Diffstat (limited to 'src/libffmpeg')
-rw-r--r-- | src/libffmpeg/mpeg_parser.c | 5 | ||||
-rw-r--r-- | src/libffmpeg/mpeg_parser.h | 21 |
2 files changed, 14 insertions, 12 deletions
diff --git a/src/libffmpeg/mpeg_parser.c b/src/libffmpeg/mpeg_parser.c index 3c0370cfa..14a08a456 100644 --- a/src/libffmpeg/mpeg_parser.c +++ b/src/libffmpeg/mpeg_parser.c @@ -20,7 +20,7 @@ * Simple MPEG-ES parser/framer by Thibaut Mattern (tmattern@noos.fr) * based on libmpeg2 decoder. * - * $Id: mpeg_parser.c,v 1.6 2007/03/29 17:59:35 dgp85 Exp $ + * $Id: mpeg_parser.c,v 1.7 2007/03/29 18:52:45 dgp85 Exp $ */ #define LOG_MODULE "mpeg_parser" #define LOG_VERBOSE @@ -170,8 +170,7 @@ static int parse_chunk (mpeg_parser_t *parser, int code, uint8_t *buffer, int le case 0xb3: /* sequence_header_code */ { int value; - int width; - int height; + uint16_t width, height; if (parser->is_sequence_needed) { parser->is_sequence_needed = 0; diff --git a/src/libffmpeg/mpeg_parser.h b/src/libffmpeg/mpeg_parser.h index 0b93b21e0..859a0fcec 100644 --- a/src/libffmpeg/mpeg_parser.h +++ b/src/libffmpeg/mpeg_parser.h @@ -20,7 +20,7 @@ * Simple MPEG-ES parser/framer by Thibaut Mattern (tmattern@noos.fr) * based on libmpeg2 decoder. * - * $Id: mpeg_parser.h,v 1.4 2007/03/29 17:59:35 dgp85 Exp $ + * $Id: mpeg_parser.h,v 1.5 2007/03/29 18:52:45 dgp85 Exp $ */ #ifndef HAVE_MPEG_PARSER_H #define HAVE_MPEG_PARSER_H @@ -37,23 +37,26 @@ #define D_TYPE 4 typedef struct mpeg_parser_s { - uint32_t shift; - int is_sequence_needed; uint8_t *chunk_buffer; uint8_t *chunk_ptr; uint8_t *chunk_start; + uint32_t shift; int buffer_size; uint8_t code; uint8_t picture_coding_type; - int rate_code; + + uint8_t is_sequence_needed:1; + uint8_t is_mpeg1:1; /* public */ + uint8_t has_sequence:1; /* public */ + uint8_t in_slice:1; + + uint8_t rate_code:4; + int aspect_ratio_info; - int in_slice; /* public properties */ - int is_mpeg1; - int has_sequence; - int width; - int height; + uint16_t width; + uint16_t height; int frame_duration; double frame_aspect_ratio; |