Revision 886e89d0 libavformat/rdt.c

View differences:

libavformat/rdt.c
81 81

  
82 82
struct PayloadContext {
83 83
    AVFormatContext *rmctx;
84
    RMStream *rmst[MAX_STREAMS];
84 85
    uint8_t *mlti_data;
85 86
    unsigned int mlti_data_size;
86 87
    char buffer[RTP_MAX_PACKET_LENGTH + FF_INPUT_BUFFER_PADDING_SIZE];
......
174 175
        size = rdt->mlti_data_size;
175 176
        url_fseek(&pb, 0, SEEK_SET);
176 177
    }
177
    if (ff_rm_read_mdpr_codecdata(rdt->rmctx, &pb, st, size) < 0)
178
    if (ff_rm_read_mdpr_codecdata(rdt->rmctx, &pb, st, rdt->rmst[0], size) < 0)
178 179
        return -1;
179 180

  
180 181
    return 0;
......
301 302

  
302 303
        init_put_byte(&pb, buf, len, 0, NULL, NULL, NULL, NULL);
303 304
        flags = (flags & PKT_FLAG_KEY) ? 2 : 0;
304
        res = ff_rm_parse_packet (rdt->rmctx, &pb, st, len, pkt,
305
        res = ff_rm_parse_packet (rdt->rmctx, &pb, st, rdt->rmst[0], len, pkt,
305 306
                                  &seq, &flags, timestamp);
306 307
        pos = url_ftell(&pb);
307 308
        if (res < 0)
......
314 315
                                                NULL, NULL, NULL, NULL);
315 316
        }
316 317
    } else {
317
        ff_rm_retrieve_cache (rdt->rmctx, rdt->rmctx->pb, st, pkt);
318
        ff_rm_retrieve_cache (rdt->rmctx, rdt->rmctx->pb, st, rdt->rmst[0], pkt);
318 319
        if (rdt->audio_pkt_cnt[st->id] == 0 &&
319 320
            st->codec->codec_id == CODEC_ID_AAC)
320 321
            av_freep(&rdt->rmctx->pb);
......
426 427
    PayloadContext *rdt = av_mallocz(sizeof(PayloadContext));
427 428

  
428 429
    av_open_input_stream(&rdt->rmctx, NULL, "", &rdt_demuxer, NULL);
430
    rdt->rmst[0] = ff_rm_alloc_rmstream();
429 431

  
430 432
    return rdt;
431 433
}
......
433 435
static void
434 436
rdt_free_extradata (PayloadContext *rdt)
435 437
{
438
    ff_rm_free_rmstream(rdt->rmst[0]);
436 439
    if (rdt->rmctx)
437 440
        av_close_input_stream(rdt->rmctx);
438 441
    av_freep(&rdt->mlti_data);

Also available in: Unified diff