Revision 01f4895c libavformat/avienc.c

View differences:

libavformat/avienc.c
338 338

  
339 339
    video_enc = NULL;
340 340
    for(n=0;n<s->nb_streams;n++) {
341
        stream = &s->streams[n]->codec;
341
        stream = s->streams[n]->codec;
342 342
        bitrate += stream->bit_rate;
343 343
        if (stream->codec_type == CODEC_TYPE_VIDEO)
344 344
            video_enc = stream;
......
376 376
        list2 = start_tag(pb, "LIST");
377 377
        put_tag(pb, "strl");
378 378
    
379
        stream = &s->streams[i]->codec;
379
        stream = s->streams[i]->codec;
380 380

  
381 381
        /* FourCC should really be set by the codec itself */
382 382
        if (! stream->codec_tag) {
......
504 504
    for (i=0;i<s->nb_streams;i++) {
505 505
	 offset_t ix, pos;
506 506
	 
507
	 avi_stream2fourcc(&tag[0], i, s->streams[i]->codec.codec_type);
507
	 avi_stream2fourcc(&tag[0], i, s->streams[i]->codec->codec_type);
508 508
	 ix_tag[3] = '0' + i;
509 509
	 
510 510
	 /* Writing AVI OpenDML leaf index chunk */
......
576 576
	    }
577 577
	    if (!empty) {
578 578
	        avi_stream2fourcc(&tag[0], stream_id, 
579
		                  s->streams[stream_id]->codec.codec_type); 
579
		                  s->streams[stream_id]->codec->codec_type); 
580 580
	        put_tag(pb, &tag[0]);
581 581
		put_le32(pb, ie->flags);
582 582
                put_le32(pb, ie->pos);
......
591 591
        nb_frames = 0;
592 592
        for(n=0;n<s->nb_streams;n++) {
593 593
            if (avi->frames_hdr_strm[n] != 0) {
594
                stream = &s->streams[n]->codec;
594
                stream = s->streams[n]->codec;
595 595
                url_fseek(pb, avi->frames_hdr_strm[n], SEEK_SET);
596 596
                ff_parse_specific_params(stream, &au_byterate, &au_ssize, &au_scale);
597 597
                if (au_ssize == 0) {
......
618 618
    unsigned char tag[5];
619 619
    unsigned int flags=0;
620 620
    const int stream_index= pkt->stream_index;
621
    AVCodecContext *enc= &s->streams[stream_index]->codec;
621
    AVCodecContext *enc= s->streams[stream_index]->codec;
622 622
    int size= pkt->size;
623 623

  
624 624
//    av_log(s, AV_LOG_DEBUG, "%lld %d %d\n", pkt->dts, avi->packet_count[stream_index], stream_index);
......
705 705
	url_fskip(pb, 16);
706 706

  
707 707
        for (n=nb_frames=0;n<s->nb_streams;n++) {
708
             AVCodecContext *stream = &s->streams[n]->codec;
708
             AVCodecContext *stream = s->streams[n]->codec;
709 709
             if (stream->codec_type == CODEC_TYPE_VIDEO) {
710 710
                 if (nb_frames < stream->frame_number)
711 711
                     nb_frames = stream->frame_number;

Also available in: Unified diff