Revision c7a38887

View differences:

libavformat/mxfdec.c
214 214
/* XXX: use AVBitStreamFilter */
215 215
static int mxf_get_d10_aes3_packet(ByteIOContext *pb, AVStream *st, AVPacket *pkt, int64_t length)
216 216
{
217
    uint8_t buffer[61444];
218 217
    const uint8_t *buf_ptr, *end_ptr;
219 218
    uint8_t *data_ptr;
220 219
    int i;
221 220

  
222 221
    if (length > 61444) /* worst case PAL 1920 samples 8 channels */
223 222
        return -1;
224
    get_buffer(pb, buffer, length);
225 223
    av_new_packet(pkt, length);
224
    get_buffer(pb, pkt->data, length);
226 225
    data_ptr = pkt->data;
227
    end_ptr = buffer + length;
228
    buf_ptr = buffer + 4; /* skip SMPTE 331M header */
226
    end_ptr = pkt->data + length;
227
    buf_ptr = pkt->data + 4; /* skip SMPTE 331M header */
229 228
    for (; buf_ptr < end_ptr; ) {
230 229
        for (i = 0; i < st->codec->channels; i++) {
231 230
            uint32_t sample = bytestream_get_le32(&buf_ptr);

Also available in: Unified diff