Daniel Kang <[email protected]> added the comment: In compute_frame_duration (libavformat/utils.c:788), *pden is set to st->codec->sample_rate. Later in the code, the duration is computed (libavformat/utils.c:955) in compute_pkt_fields using av_rescale_rnd. The arguments passed include den * st->time_base.num, which will be negative without the check included in the patch. In certain cases (where the sample_rate < 0), this will cause the assertion to fail, as den * st->time_base.num is also less than 0.
________________________________________________ FFmpeg issue tracker <[email protected]> <https://roundup.ffmpeg.org/issue2475> ________________________________________________
