comparison parser.c @ 2846:40765c51a7a9 libavcodec

Compilation fixes part 1 patch by (Arvind R. and Burkhard Plaum, plaum, ipf uni-stuttgart de)
author michael
date Fri, 26 Aug 2005 19:05:44 +0000
parents 45ccf6842c34
children 95bac7109ff0
comparison
equal deleted inserted replaced
2845:d9f4b93e81c5 2846:40765c51a7a9
746 } 746 }
747 return buf_ptr - buf; 747 return buf_ptr - buf;
748 } 748 }
749 749
750 #ifdef CONFIG_AC3 750 #ifdef CONFIG_AC3
751 #ifdef CONFIG_A52BIN
752 extern int ff_a52_syncinfo (AVCodecContext * avctx, const uint8_t * buf,
753 int * flags, int * sample_rate, int * bit_rate);
754 #else
751 extern int a52_syncinfo (const uint8_t * buf, int * flags, 755 extern int a52_syncinfo (const uint8_t * buf, int * flags,
752 int * sample_rate, int * bit_rate); 756 int * sample_rate, int * bit_rate);
757 #endif
753 758
754 typedef struct AC3ParseContext { 759 typedef struct AC3ParseContext {
755 uint8_t inbuf[4096]; /* input buffer */ 760 uint8_t inbuf[4096]; /* input buffer */
756 uint8_t *inbuf_ptr; 761 uint8_t *inbuf_ptr;
757 int frame_size; 762 int frame_size;
794 memcpy(s->inbuf_ptr, buf_ptr, len); 799 memcpy(s->inbuf_ptr, buf_ptr, len);
795 buf_ptr += len; 800 buf_ptr += len;
796 s->inbuf_ptr += len; 801 s->inbuf_ptr += len;
797 buf_size -= len; 802 buf_size -= len;
798 if ((s->inbuf_ptr - s->inbuf) == AC3_HEADER_SIZE) { 803 if ((s->inbuf_ptr - s->inbuf) == AC3_HEADER_SIZE) {
804 #ifdef CONFIG_A52BIN
805 len = ff_a52_syncinfo(avctx, s->inbuf, &s->flags, &sample_rate, &bit_rate);
806 #else
799 len = a52_syncinfo(s->inbuf, &s->flags, &sample_rate, &bit_rate); 807 len = a52_syncinfo(s->inbuf, &s->flags, &sample_rate, &bit_rate);
808 #endif
800 if (len == 0) { 809 if (len == 0) {
801 /* no sync found : move by one byte (inefficient, but simple!) */ 810 /* no sync found : move by one byte (inefficient, but simple!) */
802 memmove(s->inbuf, s->inbuf + 1, AC3_HEADER_SIZE - 1); 811 memmove(s->inbuf, s->inbuf + 1, AC3_HEADER_SIZE - 1);
803 s->inbuf_ptr--; 812 s->inbuf_ptr--;
804 } else { 813 } else {