comparison ac3_parser.c @ 6643:4d04fcb5e1e4 libavcodec

Add new_frame_start and need_next_header. based on a patch by Bartlomiej
author michael
date Sat, 19 Apr 2008 01:59:55 +0000
parents 866b9ade048c
children 83f805f7a854
comparison
equal deleted inserted replaced
6642:866b9ade048c 6643:4d04fcb5e1e4
121 } 121 }
122 122
123 return 0; 123 return 0;
124 } 124 }
125 125
126 static int ac3_sync(uint64_t state, AACAC3ParseContext *hdr_info) 126 static int ac3_sync(uint64_t state, AACAC3ParseContext *hdr_info,
127 int *need_next_header, int *new_frame_start)
127 { 128 {
128 int err; 129 int err;
129 uint64_t tmp = be2me_64(state); 130 uint64_t tmp = be2me_64(state);
130 AC3HeaderInfo hdr; 131 AC3HeaderInfo hdr;
131 132
137 hdr_info->sample_rate = hdr.sample_rate; 138 hdr_info->sample_rate = hdr.sample_rate;
138 hdr_info->bit_rate = hdr.bit_rate; 139 hdr_info->bit_rate = hdr.bit_rate;
139 hdr_info->channels = hdr.channels; 140 hdr_info->channels = hdr.channels;
140 hdr_info->samples = AC3_FRAME_SIZE; 141 hdr_info->samples = AC3_FRAME_SIZE;
141 142
143 *need_next_header = 0;
144 *new_frame_start = 1;
142 return hdr.frame_size; 145 return hdr.frame_size;
143 } 146 }
144 147
145 static av_cold int ac3_parse_init(AVCodecParserContext *s1) 148 static av_cold int ac3_parse_init(AVCodecParserContext *s1)
146 { 149 {