static void log_packet(const AVFormatContext *fmt_ctx, const AVPacket *pkt, const char *tag, int hours, int mins, int secs, int us, int *time )
{
AVRational *time_base = &fmt_ctx->streams[pkt->stream_index]->time_base;
total = total + pkt->duration;
// printf( "%d:%d:%d.%d \n", hours, mins, secs, us );
*time = av_q2d(*time_base) * pkt->pts ;
}
我是C语言的新手。谢谢!