Revision b8702539 libavformat/matroskadec.c

View differences:

libavformat/matroskadec.c
1268 1268
}
1269 1269

  
1270 1270
/*
1271
 * Put a packet into our internal queue. Will be delivered to the
1272
 * user/application during the next get_packet() call.
1273
 */
1274
static void matroska_queue_packet(MatroskaDemuxContext *matroska, AVPacket *pkt)
1275
{
1276
    matroska->packets =
1277
        av_realloc(matroska->packets, (matroska->num_packets + 1) *
1278
                   sizeof(AVPacket *));
1279
    matroska->packets[matroska->num_packets] = pkt;
1280
    matroska->num_packets++;
1281
}
1282

  
1283
/*
1284 1271
 * Put one packet in an application-supplied AVPacket struct.
1285 1272
 * Returns 0 on success or -1 on failure.
1286 1273
 */
......
1484 1471
                           + a * (h*w / a - track->audio.pkt_cnt--), a);
1485 1472
                    pkt->pos = pos;
1486 1473
                    pkt->stream_index = st->index;
1487
                    matroska_queue_packet(matroska, pkt);
1474
                    dynarray_add(&matroska->packets,&matroska->num_packets,pkt);
1488 1475
                }
1489 1476
            } else {
1490 1477
                MatroskaTrackEncoding *encodings = track->encodings.elem;
......
1520 1507
                pkt->pos = pos;
1521 1508
                pkt->duration = duration;
1522 1509

  
1523
                matroska_queue_packet(matroska, pkt);
1510
                dynarray_add(&matroska->packets, &matroska->num_packets, pkt);
1524 1511
            }
1525 1512

  
1526 1513
            if (timecode != AV_NOPTS_VALUE)

Also available in: Unified diff