181{
182 qint64 origin;
183 qint32 sample_section_size;
184 qint32 sample_section_end;
185 qint32 samples = 0;
186 qint32 data_start;
187
188 qint32 brush_size;
189 qint32 brush_end;
190
192 return 0;
193
194 origin = abr.device()->pos();
195
197
198 abr.device()->seek(origin);
199 return 0;
200 }
201
202
203 abr >> sample_section_size;
204 sample_section_end = sample_section_size + abr.device()->pos();
205
206 if(sample_section_end < 0 || sample_section_end > abr.device()->size())
207 return 0;
208
209 data_start = abr.device()->pos();
210
211 while ((!abr.atEnd()) && (abr.device()->pos() < sample_section_end)) {
212
213 abr >> brush_size;
214 brush_end = brush_size;
215
216 while (brush_end % 4 != 0) brush_end++;
217
218 qint64 newPos = abr.device()->pos() + brush_end;
219 if(newPos > 0 && newPos < abr.device()->size()) {
220 abr.device()->seek(newPos);
221 }
222 else
223 return 0;
224
225 samples++;
226 }
227
228
229 abr.device()->seek(data_start);
230
231
232 return samples;
233}
static bool abr_reach_8BIM_section(QDataStream &abr, const QString name)
static bool abr_supported_content(AbrInfo *abr_hdr)