Revision cde073b4

View differences:

libavformat/avidec.c
209 209
                get_le32(pb); /* start */
210 210
                nb_frames = get_le32(pb);
211 211
                st->start_time = 0;
212
                st->duration = nb_frames;
212
                st->duration = av_rescale(nb_frames,
213
                    st->codec.frame_rate_base * AV_TIME_BASE,
214
                    st->codec.frame_rate);
213 215
		url_fskip(pb, size - 9 * 4);
214 216
                break;
215 217
            case MKTAG('a', 'u', 'd', 's'):
......
239 241
                    ast->sample_size = get_le32(pb); /* sample ssize */
240 242
//av_log(NULL, AV_LOG_DEBUG, "%d %d %d %d\n", ast->scale, ast->rate, ast->sample_size, ast->start);
241 243
                    st->start_time = 0;
242
                    st->duration = length;
244
                    if (ast->rate != 0)
245
                        st->duration = (int64_t)length * AV_TIME_BASE / ast->rate;
243 246
                    url_fskip(pb, size - 12 * 4);
244 247
                }
245 248
                break;

Also available in: Unified diff