/* Add a reference to the sample data to the sample queue. The data is not copied. sample_queue_retain should be called before pkt->data is reused/freed.  */
static void sample_queue_push(HintSampleQueue *queue, AVPacket *pkt, int sample)
/* Add a reference to the sample data to the sample queue. The data is not copied. sample_queue_retain should be called before pkt->data is reused/freed.  */
static void sample_queue_push(HintSampleQueue *queue, AVPacket *pkt, int sample)
{
    if (pkt->size <= 14)
        return;
    if (!queue->samples || queue->len >= queue->size) {
        HintSample* samples;
        queue->size += 10;
        samples = av_realloc(queue->samples, sizeof(HintSample)*queue->size);
        if (!samples)
            return;
        queue->samples = samples;
    }
    queue->samples[queue->len].data = pkt->data;
    queue->samples[queue->len].size = pkt->size;
    queue->samples[queue->len].sample_number = sample;
    queue->samples[queue->len].offset = 0;
    queue->samples[queue->len].own_data = 0;
    queue->len++;
}