Revision 82e415b1 libavformat/avienc.c

View differences:

libavformat/avienc.c
613 613
                url_fseek(pb, avi->frames_hdr_strm[n], SEEK_SET);
614 614
                ff_parse_specific_params(stream, &au_byterate, &au_ssize, &au_scale);
615 615
                if (au_ssize == 0) {
616
                    put_le32(pb, stream->frame_number);
617
                    nb_frames += stream->frame_number;
616
                    put_le32(pb, avi->packet_count[n]);
617
                    nb_frames += avi->packet_count[n];
618 618
                } else {
619 619
                    put_le32(pb, avi->audio_strm_length[n] / au_ssize);
620 620
                }
......
730 730
        for (n=nb_frames=0;n<s->nb_streams;n++) {
731 731
             AVCodecContext *stream = s->streams[n]->codec;
732 732
             if (stream->codec_type == CODEC_TYPE_VIDEO) {
733
                 if (nb_frames < stream->frame_number)
734
                     nb_frames = stream->frame_number;
733
                 if (nb_frames < avi->packet_count[n])
734
                     nb_frames = avi->packet_count[n];
735 735
             } else {
736 736
                 if (stream->codec_id == CODEC_ID_MP2 || stream->codec_id == CODEC_ID_MP3) {
737
                     nb_frames += stream->frame_number;
737
                     nb_frames += avi->packet_count[n];
738 738
                }
739 739
            }
740 740
        }

Also available in: Unified diff