Revision 91d19d47 libavformat/asfenc.c

View differences:

libavformat/asfenc.c
321 321
    put_le64(pb, asf->duration); /* duration (in 100ns units) */
322 322
    put_le64(pb, PREROLL_TIME); /* start time stamp */
323 323
    put_le32(pb, (asf->is_streamed || url_is_streamed(pb)) ? 3 : 2); /* ??? */
324
    put_le32(pb, asf->packet_size); /* packet size */
325
    put_le32(pb, asf->packet_size); /* packet size */
324
    put_le32(pb, s->packet_size); /* packet size */
325
    put_le32(pb, s->packet_size); /* packet size */
326 326
    put_le32(pb, bit_rate); /* Nominal data rate in bps */
327 327
    end_header(pb, hpos);
328 328

  
......
514 514
{
515 515
    ASFContext *asf = s->priv_data;
516 516

  
517
    asf->packet_size = PACKET_SIZE;
517
    s->packet_size  = PACKET_SIZE;
518 518
    asf->nb_packets = 0;
519 519

  
520 520
    asf->last_indexed_pts = 0;
......
536 536
    asf->packet_nb_payloads = 0;
537 537
    asf->packet_timestamp_start = -1;
538 538
    asf->packet_timestamp_end = -1;
539
    init_put_byte(&asf->pb, asf->packet_buf, asf->packet_size, 1,
539
    init_put_byte(&asf->pb, asf->packet_buf, s->packet_size, 1,
540 540
                  NULL, NULL, NULL, NULL);
541 541

  
542 542
    return 0;
......
612 612
    assert(asf->packet_timestamp_end >= asf->packet_timestamp_start);
613 613

  
614 614
    if (asf->is_streamed) {
615
        put_chunk(s, 0x4424, asf->packet_size, 0);
615
        put_chunk(s, 0x4424, s->packet_size, 0);
616 616
    }
617 617

  
618 618
    packet_hdr_size = put_payload_parsing_info(
......
627 627
    assert(packet_hdr_size <= asf->packet_size_left);
628 628
    memset(asf->packet_buf + packet_filled_size, 0, asf->packet_size_left);
629 629

  
630
    put_buffer(s->pb, asf->packet_buf, asf->packet_size - packet_hdr_size);
630
    put_buffer(s->pb, asf->packet_buf, s->packet_size - packet_hdr_size);
631 631

  
632 632
    put_flush_packet(s->pb);
633 633
    asf->nb_packets++;
634 634
    asf->packet_nb_payloads = 0;
635 635
    asf->packet_timestamp_start = -1;
636 636
    asf->packet_timestamp_end = -1;
637
    init_put_byte(&asf->pb, asf->packet_buf, asf->packet_size, 1,
637
    init_put_byte(&asf->pb, asf->packet_buf, s->packet_size, 1,
638 638
                  NULL, NULL, NULL, NULL);
639 639
}
640 640

  

Also available in: Unified diff