Revision e7106d5b

View differences:

libavformat/4xm.c
89 89

  
90 90
static int fourxm_probe(AVProbeData *p)
91 91
{
92
    if (p->buf_size < 12)
93
        return 0;
94

  
92 95
    if ((LE_32(&p->buf[0]) != RIFF_TAG) ||
93 96
        (LE_32(&p->buf[8]) != _4XMV_TAG))
94 97
        return 0;
......
242 245
            return ret;
243 246
        fourcc_tag = LE_32(&header[0]);
244 247
        size = LE_32(&header[4]);
245
//printf(" %8X %c%c%c%c %d\n", fourcc_tag, fourcc_tag, fourcc_tag>>8, fourcc_tag>>16, fourcc_tag>>24, size);
246 248
        if (url_feof(pb))
247 249
            return -EIO;
248 250
        switch (fourcc_tag) {
......
256 258
        case pfrm_TAG:
257 259
        case cfrm_TAG:{
258 260

  
259
int id, whole;
260
static int stats[1000];
261

  
262
            /* bump the pts if this last data sent out was audio */
261
            /* bump the pts if the last data sent out was audio */
263 262
            if (fourxm->last_chunk_was_audio) {
264 263
                fourxm->last_chunk_was_audio = 0;
265 264
                pts_inc = fourxm->last_audio_frame_count;
......
277 276
            memcpy(pkt->data, header, 8);
278 277
            ret = get_buffer(&s->pb, &pkt->data[8], size);
279 278

  
280
if (fourcc_tag == cfrm_TAG) {
281
id = LE_32(&pkt->data[12]);
282
whole = LE_32(&pkt->data[16]);
283
stats[id] += size - 12;
284
//printf(" cfrm chunk id:%d size:%d whole:%d until now:%d\n", id, size, whole, stats[id]);
285
}
286

  
287 279
            if (ret < 0)
288 280
                av_free_packet(pkt);
289 281
            else
......
292 284
        }
293 285

  
294 286
        case snd__TAG:
295
printf (" snd_ chunk, ");
296 287
            track_number = get_le32(pb);
297 288
            out_size= get_le32(pb);
298 289
            size-=8;
299 290

  
300 291
            if (track_number == fourxm->selected_track) {
301
printf ("correct track, dispatching...\n");
302 292
                if (av_new_packet(pkt, size))
303 293
                    return -EIO;
304 294
                pkt->stream_index = 
......
317 307
                      fourxm->tracks[fourxm->selected_track].channels);
318 308

  
319 309
            } else {
320
printf ("wrong track, skipping...\n");
321 310
                url_fseek(pb, size, SEEK_CUR);
322 311
            }
323 312
            break;
libavformat/idroq.c
62 62

  
63 63
static int roq_probe(AVProbeData *p)
64 64
{
65
    if (p->buf_size < 6)
66
        return 0;
67

  
65 68
    if ((LE_16(&p->buf[0]) != RoQ_MAGIC_NUMBER) ||
66 69
        (LE_32(&p->buf[2]) != 0xFFFFFFFF))
67 70
        return 0;

Also available in: Unified diff