timestamp = (int)((float)codec->frame_number * 1000.0 * FRAME_RATE_BASE / codec->frame_rate);
timestamp = (int)ticker_tick(&stream->pts_ticker, codec->frame_number);
static int asf_write_packet(AVFormatContext *s, int stream_index,                            UINT8 *buf, int size, int force_pts){    ASFContext *asf = s->priv_data;    int timestamp;    INT64 duration;    AVCodecContext *codec;    codec = &s->streams[stream_index]->codec;    if (codec->codec_type == CODEC_TYPE_AUDIO) {        timestamp = (int)((float)codec->frame_number * codec->frame_size * 1000.0 /                           codec->sample_rate);        duration = (codec->frame_number * codec->frame_size * INT64_C(10000000)) /             codec->sample_rate;    } else {        timestamp = (int)((float)codec->frame_number * 1000.0 * FRAME_RATE_BASE /                           codec->frame_rate);        duration = codec->frame_number *             ((INT64_C(10000000) * FRAME_RATE_BASE) / codec->frame_rate);    }    if (duration > asf->duration)        asf->duration = duration;        put_frame(s, &asf->streams[stream_index], (int)timestamp, buf, size);    return 0;}