[FFmpeg-devel] [PATCH 1/2] audio_frame_que: simplify

Roger Pack rogerdpack2 at gmail.com
Sat Jun 30 00:20:31 CEST 2012


   if (f->pts != AV_NOPTS_VALUE) {
-        new_frame->pts = av_rescale_q(f->pts,
+        new->pts = av_rescale_q(f->pts,
                                      afq->avctx->time_base,
                                      (AVRational){ 1,
afq->avctx->sample_rate });
-        afq->next_pts = new_frame->pts + new_frame->duration;
+        new->pts -= afq->remaining_delay;
+        if(afq->frame_count && new[-1].pts >= new->pts)
+            av_log(afq->avctx, AV_LOG_WARNING, "Que input is backward in
time\n");
    } else {
-        new_frame->pts = AV_NOPTS_VALUE;
-        afq->next_pts  = AV_NOPTS_VALUE;
+        new->pts = AV_NOPTS_VALUE;
    }


As a note, With any builds after May 7, I now get this message when
transcoding this file:
http://rogerdpack.t28.net/incoming/asmall.avi

$ ffmpeg.exe -y -i asmall.avi -vcodec libxvid yo.mp4
...
[libvo_aacenc @ 023980a0] Que input is backward in time
about 15 times.
(full output link:
https://lists.ffmpeg.org/pipermail/ffmpeg-user/2012-June/007272.html)
Could anybody check if this is expected?
-roger-


More information about the ffmpeg-devel mailing list