aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-04-18 03:09:01 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-04-18 03:09:01 +0000
commit8c731c9743d1e815a62af09730f7f0c4050b217d (patch)
treed8f9897d85a93635c702717063286dd3dd0b6ac5 /libavcodec
parent37ff38c69f2c5780e218072589fe9d4ce6a1a1f0 (diff)
downloadffmpeg-8c731c9743d1e815a62af09730f7f0c4050b217d.tar.gz
remove AACAC3FrameFlag
Originally committed as revision 12888 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/aac_ac3_parser.c3
-rw-r--r--libavcodec/aac_ac3_parser.h8
-rw-r--r--libavcodec/aac_parser.c3
-rw-r--r--libavcodec/ac3_parser.c13
4 files changed, 4 insertions, 23 deletions
diff --git a/libavcodec/aac_ac3_parser.c b/libavcodec/aac_ac3_parser.c
index 1193647e90..c72965a76f 100644
--- a/libavcodec/aac_ac3_parser.c
+++ b/libavcodec/aac_ac3_parser.c
@@ -29,7 +29,6 @@ int ff_aac_ac3_parse(AVCodecParserContext *s1,
const uint8_t *buf, int buf_size)
{
AACAC3ParseContext *s = s1->priv_data;
- AACAC3FrameFlag frame_flag;
const uint8_t *buf_ptr;
int len;
@@ -51,7 +50,7 @@ int ff_aac_ac3_parse(AVCodecParserContext *s1,
if (s->frame_size == 0) {
if ((s->inbuf_ptr - s->inbuf) == s->header_size) {
- len = s->sync(s, &frame_flag);
+ len = s->sync(s);
if (len == 0) {
/* no sync found : move by one byte (inefficient, but simple!) */
memmove(s->inbuf, s->inbuf + 1, s->header_size - 1);
diff --git a/libavcodec/aac_ac3_parser.h b/libavcodec/aac_ac3_parser.h
index ec9ce48a4a..f93f8a81e9 100644
--- a/libavcodec/aac_ac3_parser.h
+++ b/libavcodec/aac_ac3_parser.h
@@ -26,17 +26,11 @@
#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);
+ int (*sync)(struct AACAC3ParseContext *hdr_info);
uint8_t inbuf[8192]; /* input buffer */
int channels;
diff --git a/libavcodec/aac_parser.c b/libavcodec/aac_parser.c
index 2e4334f440..8715ce6b75 100644
--- a/libavcodec/aac_parser.c
+++ b/libavcodec/aac_parser.c
@@ -27,7 +27,7 @@
#define AAC_HEADER_SIZE 7
-static int aac_sync(AACAC3ParseContext *hdr_info, AACAC3FrameFlag *flag)
+static int aac_sync(AACAC3ParseContext *hdr_info)
{
GetBitContext bits;
int size, rdb, ch, sr;
@@ -65,7 +65,6 @@ static int aac_sync(AACAC3ParseContext *hdr_info, AACAC3FrameFlag *flag)
hdr_info->sample_rate = ff_mpeg4audio_sample_rates[sr];
hdr_info->samples = (rdb + 1) * 1024;
hdr_info->bit_rate = size * 8 * hdr_info->sample_rate / hdr_info->samples;
- *flag = FRAME_COMPLETE;
return size;
}
diff --git a/libavcodec/ac3_parser.c b/libavcodec/ac3_parser.c
index d0a22b9950..bc728c19da 100644
--- a/libavcodec/ac3_parser.c
+++ b/libavcodec/ac3_parser.c
@@ -123,7 +123,7 @@ int ff_ac3_parse_header(const uint8_t buf[7], AC3HeaderInfo *hdr)
return 0;
}
-static int ac3_sync(AACAC3ParseContext *hdr_info, AACAC3FrameFlag *flag)
+static int ac3_sync(AACAC3ParseContext *hdr_info)
{
int err;
AC3HeaderInfo hdr;
@@ -138,17 +138,6 @@ static int ac3_sync(AACAC3ParseContext *hdr_info, AACAC3FrameFlag *flag)
hdr_info->channels = hdr.channels;
hdr_info->samples = AC3_FRAME_SIZE;
- switch(hdr.frame_type){
- case EAC3_FRAME_TYPE_INDEPENDENT:
- *flag = FRAME_START;
- break;
- case EAC3_FRAME_TYPE_DEPENDENT:
- *flag = FRAME_CONTINUATION;
- break;
- case EAC3_FRAME_TYPE_AC3_CONVERT:
- *flag = FRAME_COMPLETE;
- break;
- }
return hdr.frame_size;
}