change of aac_ac3_parser, so it is able to send complete portion of data to decoder

Originally committed as revision 12758 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Bartlomiej Wolowiec
2008-04-05 20:09:36 +00:00
parent 0265fe81e4
commit 0a5754c3b7
4 changed files with 53 additions and 61 deletions

View File

@ -26,23 +26,23 @@
#include <stdint.h>
#include "avcodec.h"
typedef enum{
FRAME_COMPLETE, ///< Complete frame, ends previous frame
FRAME_START, ///< Frame start, ends previous frame
FRAME_CONTINUATION ///< Part of the previous frame
}AACAC3FrameFlag;
typedef struct AACAC3ParseContext {
uint8_t *inbuf_ptr;
int frame_size;
int header_size;
int (*sync)(struct AACAC3ParseContext *hdr_info, AACAC3FrameFlag *flag);
uint8_t inbuf[8192]; /* input buffer */
int (*sync)(uint64_t state, struct AACAC3ParseContext *hdr_info,
int *need_next_header, int *new_frame_start);
int channels;
int sample_rate;
int bit_rate;
int samples;
ParseContext pc;
int remaining_size;
uint64_t state;
int need_next_header;
int new_frame_start;
} AACAC3ParseContext;
int ff_aac_ac3_parse(AVCodecParserContext *s1,