Revision 5d88c264 libavformat/rdt.c

View differences:

libavformat/rdt.c
85 85
    uint8_t *mlti_data;
86 86
    unsigned int mlti_data_size;
87 87
    char buffer[RTP_MAX_PACKET_LENGTH + FF_INPUT_BUFFER_PADDING_SIZE];
88
    int audio_pkt_cnt[MAX_STREAMS]; /**< remaining audio packets in rmdec */
88
    int audio_pkt_cnt; /**< remaining audio packets in rmdec */
89 89
};
90 90

  
91 91
void
......
307 307
        pos = url_ftell(&pb);
308 308
        if (res < 0)
309 309
            return res;
310
        rdt->audio_pkt_cnt[st->id] = res;
311
        if (rdt->audio_pkt_cnt[st->id] > 0 &&
310
        rdt->audio_pkt_cnt = res;
311
        if (rdt->audio_pkt_cnt > 0 &&
312 312
            st->codec->codec_id == CODEC_ID_AAC) {
313 313
            memcpy (rdt->buffer, buf + pos, len - pos);
314 314
            rdt->rmctx->pb = av_alloc_put_byte (rdt->buffer, len - pos, 0,
......
316 316
        }
317 317
    } else {
318 318
        ff_rm_retrieve_cache (rdt->rmctx, rdt->rmctx->pb, st, rdt->rmst[0], pkt);
319
        if (rdt->audio_pkt_cnt[st->id] == 0 &&
319
        if (rdt->audio_pkt_cnt == 0 &&
320 320
            st->codec->codec_id == CODEC_ID_AAC)
321 321
            av_freep(&rdt->rmctx->pb);
322 322
    }
323 323
    pkt->stream_index = st->index;
324 324
    pkt->pts = *timestamp;
325 325

  
326
    return rdt->audio_pkt_cnt[st->id] > 0;
326
    return rdt->audio_pkt_cnt > 0;
327 327
}
328 328

  
329 329
int

Also available in: Unified diff