summaryrefslogtreecommitdiff
path: root/libavcodec/parser.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-08-26 19:05:44 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-08-26 19:05:44 +0000
commit95ae72b7e063cb02aa17c7f0c7d759844a37e526 (patch)
treefce2f7de2ba52379302e234fb30d1de82f0e63f9 /libavcodec/parser.c
parent5b2bf9434078d0a57482658d82a26c3b2a13493d (diff)
downloadffmpeg-95ae72b7e063cb02aa17c7f0c7d759844a37e526.tar.gz
Compilation fixes part 1 patch by (Arvind R. and Burkhard Plaum, plaum, ipf uni-stuttgart de)
Originally committed as revision 4540 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/parser.c')
-rw-r--r--libavcodec/parser.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libavcodec/parser.c b/libavcodec/parser.c
index ed620dbefc..4d5cb19d22 100644
--- a/libavcodec/parser.c
+++ b/libavcodec/parser.c
@@ -748,8 +748,13 @@ static int mpegaudio_parse(AVCodecParserContext *s1,
}
#ifdef CONFIG_AC3
+#ifdef CONFIG_A52BIN
+extern int ff_a52_syncinfo (AVCodecContext * avctx, const uint8_t * buf,
+ int * flags, int * sample_rate, int * bit_rate);
+#else
extern int a52_syncinfo (const uint8_t * buf, int * flags,
int * sample_rate, int * bit_rate);
+#endif
typedef struct AC3ParseContext {
uint8_t inbuf[4096]; /* input buffer */
@@ -796,7 +801,11 @@ static int ac3_parse(AVCodecParserContext *s1,
s->inbuf_ptr += len;
buf_size -= len;
if ((s->inbuf_ptr - s->inbuf) == AC3_HEADER_SIZE) {
+#ifdef CONFIG_A52BIN
+ len = ff_a52_syncinfo(avctx, s->inbuf, &s->flags, &sample_rate, &bit_rate);
+#else
len = a52_syncinfo(s->inbuf, &s->flags, &sample_rate, &bit_rate);
+#endif
if (len == 0) {
/* no sync found : move by one byte (inefficient, but simple!) */
memmove(s->inbuf, s->inbuf + 1, AC3_HEADER_SIZE - 1);