Revision 7cf0472e

View differences:

libavformat/mp3.c
128 128
    if(frames)
129 129
        st->duration = av_rescale_q(frames, (AVRational){spf, c.sample_rate},
130 130
                                    st->time_base);
131
    if(size)
131
    if(size && frames)
132 132
        st->codec->bit_rate = av_rescale(size, 8 * c.sample_rate, frames * (int64_t)spf);
133 133

  
134 134
    return 0;

Also available in: Unified diff