lavc: set best_effort_timestamp for audio too.
authorNicolas George <nicolas.george@normalesup.org>
Thu, 19 Jul 2012 09:26:47 +0000 (11:26 +0200)
committerNicolas George <nicolas.george@normalesup.org>
Fri, 20 Jul 2012 11:16:23 +0000 (13:16 +0200)
libavcodec/utils.c

index 63aa862..e73d72a 100644 (file)
@@ -1640,6 +1640,9 @@ int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx,
         if (ret >= 0 && *got_frame_ptr) {
             avctx->frame_number++;
             frame->pkt_dts = avpkt->dts;
+            frame->best_effort_timestamp = guess_correct_pts(avctx,
+                                                             frame->pkt_pts,
+                                                             frame->pkt_dts);
             if (frame->format == AV_SAMPLE_FMT_NONE)
                 frame->format = avctx->sample_fmt;
             if (!frame->channel_layout)