Quoting Mark Thompson (2017-02-13 00:53:59) > If the stream timebase is coarser than the muxing timebase then the > monotonisation process may fail because adding one to the timestamp > need not actually produce a different timestamp after the rescale. > --- > As mentioned earlier on IRC. > > Test case (from Michael Niedermayer): > ./avconv -i Voting_Machine.wmv test.avi > <http://data.onas.ru/fun-clips/Voting_Machine.wmv> > > > avconv.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/avconv.c b/avconv.c > index 94b6da2a8..4a01aa32b 100644 > --- a/avconv.c > +++ b/avconv.c > @@ -326,6 +326,8 @@ static void write_packet(OutputFile *of, AVPacket *pkt, > OutputStream *ost) > } > } > > + av_packet_rescale_ts(pkt, ost->mux_timebase, ost->st->time_base); > + > if (!(s->oformat->flags & AVFMT_NOTIMESTAMPS) && > ost->last_mux_dts != AV_NOPTS_VALUE && > pkt->dts < ost->last_mux_dts + !(s->oformat->flags & > AVFMT_TS_NONSTRICT)) { > @@ -349,7 +351,6 @@ static void write_packet(OutputFile *of, AVPacket *pkt, > OutputStream *ost) > ost->packets_written++; > > pkt->stream_index = ost->index; > - av_packet_rescale_ts(pkt, ost->mux_timebase, ost->st->time_base); > > ret = av_interleaved_write_frame(s, pkt); > if (ret < 0) { > -- > 2.11.0
The timebase of last_mux_dts now changes, so it needs to be updated in print_report(). Otherwise looks good. -- Anton Khirnov _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
