diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2006-01-25 17:14:16 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2006-01-25 17:14:16 +0000 |
commit | 82e415b1fcdf09a0a5ec099cd55a9d03efd51d15 (patch) | |
tree | a3afdcc2a6d2ba8f9ea52be3a804c62e1a59c007 /libavformat | |
parent | 378251ad082c1ea78a8832cf82e9ae767a6cadff (diff) | |
download | ffmpeg-82e415b1fcdf09a0a5ec099cd55a9d03efd51d15.tar.gz |
avoid using non constant fields of AVCodecContext in avi muxer
Originally committed as revision 4897 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/avienc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavformat/avienc.c b/libavformat/avienc.c index 9cb96682bf..702140d099 100644 --- a/libavformat/avienc.c +++ b/libavformat/avienc.c @@ -613,8 +613,8 @@ static int avi_write_idx1(AVFormatContext *s) url_fseek(pb, avi->frames_hdr_strm[n], SEEK_SET); ff_parse_specific_params(stream, &au_byterate, &au_ssize, &au_scale); if (au_ssize == 0) { - put_le32(pb, stream->frame_number); - nb_frames += stream->frame_number; + put_le32(pb, avi->packet_count[n]); + nb_frames += avi->packet_count[n]; } else { put_le32(pb, avi->audio_strm_length[n] / au_ssize); } @@ -730,11 +730,11 @@ static int avi_write_trailer(AVFormatContext *s) for (n=nb_frames=0;n<s->nb_streams;n++) { AVCodecContext *stream = s->streams[n]->codec; if (stream->codec_type == CODEC_TYPE_VIDEO) { - if (nb_frames < stream->frame_number) - nb_frames = stream->frame_number; + if (nb_frames < avi->packet_count[n]) + nb_frames = avi->packet_count[n]; } else { if (stream->codec_id == CODEC_ID_MP2 || stream->codec_id == CODEC_ID_MP3) { - nb_frames += stream->frame_number; + nb_frames += avi->packet_count[n]; } } } |