put_bits(&pb, 15, (timestamp >> 15) & 0x7fff);
put_bits(&pb, 15, (UINT32)((timestamp >> 15) & 0x7fff));
static int put_pack_header(AVFormatContext *ctx,                            UINT8 *buf, long long timestamp){    MpegMuxContext *s = ctx->priv_data;    PutBitContext pb;        init_put_bits(&pb, buf, 128, NULL, NULL);    put_bits(&pb, 32, PACK_START_CODE);    put_bits(&pb, 4, 0x2);    put_bits(&pb, 3, (timestamp >> 30) & 0x07);    put_bits(&pb, 1, 1);    put_bits(&pb, 15, (timestamp >> 15) & 0x7fff);    put_bits(&pb, 1, 1);    put_bits(&pb, 15, (timestamp) & 0x7fff);    put_bits(&pb, 1, 1);    put_bits(&pb, 1, 1);    put_bits(&pb, 22, s->mux_rate);    put_bits(&pb, 1, 1);    flush_put_bits(&pb);    return pb.buf_ptr - pb.buf;}