Revision da9e6c42

View differences:

libavformat/nutenc.c
391 391
    }
392 392
}
393 393

  
394
static int write_streamheader(NUTContext *nut, ByteIOContext *bc, AVStream *st, int i){
394
static int write_streamheader(AVFormatContext *avctx, ByteIOContext *bc, AVStream *st, int i){
395
    NUTContext *nut = avctx->priv_data;
395 396
    AVCodecContext *codec = st->codec;
396 397
    put_v(bc, i);
397 398
    switch(codec->codec_type){
......
504 505
    return count;
505 506
}
506 507

  
507
static int write_headers(NUTContext *nut, ByteIOContext *bc){
508
static int write_headers(AVFormatContext *avctx, ByteIOContext *bc){
509
    NUTContext *nut = avctx->priv_data;
508 510
    ByteIOContext *dyn_bc;
509 511
    int i, ret;
510 512

  
......
518 520
        ret = url_open_dyn_buf(&dyn_bc);
519 521
        if(ret < 0)
520 522
            return ret;
521
        write_streamheader(nut, dyn_bc, nut->avf->streams[i], i);
523
        write_streamheader(avctx, dyn_bc, nut->avf->streams[i], i);
522 524
        put_packet(nut, bc, dyn_bc, 1, STREAM_STARTCODE);
523 525
    }
524 526

  
......
592 594
    put_buffer(bc, ID_STRING, strlen(ID_STRING));
593 595
    put_byte(bc, 0);
594 596

  
595
    write_headers(nut, bc);
597
    write_headers(s, bc);
596 598

  
597 599
    put_flush_packet(bc);
598 600

  
......
653 655
        return -1;
654 656

  
655 657
    if(1LL<<(20+3*nut->header_count) <= url_ftell(bc))
656
        write_headers(nut, bc);
658
        write_headers(s, bc);
657 659

  
658 660
    if(key_frame && !(nus->last_flags & FLAG_KEY))
659 661
        store_sp= 1;
......
797 799
    ByteIOContext *bc= s->pb;
798 800

  
799 801
    while(nut->header_count<3)
800
        write_headers(nut, bc);
802
        write_headers(s, bc);
801 803
    put_flush_packet(bc);
802 804
    ff_nut_free_sp(nut);
803 805
    av_freep(&nut->stream);

Also available in: Unified diff