mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2025-01-26 06:05:06 +00:00
Merge commit '72e228b274a98af1aba9588415d0cd87fde44663'
* commit '72e228b274a98af1aba9588415d0cd87fde44663': nut: K&R formatting cosmetics Conflicts: libavformat/nut.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
057c5d2e16
@ -186,32 +186,36 @@ const AVCodecTag * const ff_nut_codec_tags[] = {
|
||||
ff_codec_bmp_tags, ff_codec_wav_tags, nut_audio_extra_tags, ff_nut_data_tags, 0
|
||||
};
|
||||
|
||||
void ff_nut_reset_ts(NUTContext *nut, AVRational time_base, int64_t val){
|
||||
void ff_nut_reset_ts(NUTContext *nut, AVRational time_base, int64_t val)
|
||||
{
|
||||
int i;
|
||||
for(i=0; i<nut->avf->nb_streams; i++){
|
||||
nut->stream[i].last_pts= av_rescale_rnd(
|
||||
val,
|
||||
for (i = 0; i < nut->avf->nb_streams; i++)
|
||||
nut->stream[i].last_pts =
|
||||
av_rescale_rnd(val,
|
||||
time_base.num * (int64_t)nut->stream[i].time_base->den,
|
||||
time_base.den * (int64_t)nut->stream[i].time_base->num,
|
||||
AV_ROUND_DOWN);
|
||||
}
|
||||
}
|
||||
|
||||
int64_t ff_lsb2full(StreamContext *stream, int64_t lsb){
|
||||
int64_t ff_lsb2full(StreamContext *stream, int64_t lsb)
|
||||
{
|
||||
int64_t mask = (1ULL << stream->msb_pts_shift) - 1;
|
||||
int64_t delta = stream->last_pts - mask / 2;
|
||||
return ((lsb - delta) & mask) + delta;
|
||||
}
|
||||
|
||||
int ff_nut_sp_pos_cmp(const Syncpoint *a, const Syncpoint *b){
|
||||
int ff_nut_sp_pos_cmp(const Syncpoint *a, const Syncpoint *b)
|
||||
{
|
||||
return ((a->pos - b->pos) >> 32) - ((b->pos - a->pos) >> 32);
|
||||
}
|
||||
|
||||
int ff_nut_sp_pts_cmp(const Syncpoint *a, const Syncpoint *b){
|
||||
int ff_nut_sp_pts_cmp(const Syncpoint *a, const Syncpoint *b)
|
||||
{
|
||||
return ((a->ts - b->ts) >> 32) - ((b->ts - a->ts) >> 32);
|
||||
}
|
||||
|
||||
void ff_nut_add_sp(NUTContext *nut, int64_t pos, int64_t back_ptr, int64_t ts){
|
||||
void ff_nut_add_sp(NUTContext *nut, int64_t pos, int64_t back_ptr, int64_t ts)
|
||||
{
|
||||
Syncpoint *sp = av_mallocz(sizeof(Syncpoint));
|
||||
struct AVTreeNode *node = av_tree_node_alloc();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user