Lines Matching refs:mvi
43 MviDemuxContext *mvi = s->priv_data; in read_header() local
97 …mvi->get_int = (vst->codecpar->width * (int64_t)vst->codecpar->height < (1 << 16)) ? avio_rl16 : a… in read_header()
99 mvi->audio_frame_size = ((uint64_t)audio_data_size << MVI_FRAC_BITS) / frames_count; in read_header()
100 if (mvi->audio_frame_size <= 1 << MVI_FRAC_BITS - 1) { in read_header()
107 …mvi->audio_size_counter = (ast->codecpar->sample_rate * 830 / mvi->audio_frame_size - 1) * mvi->au… in read_header()
108 mvi->audio_size_left = audio_data_size; in read_header()
116 MviDemuxContext *mvi = s->priv_data; in read_packet() local
119 if (mvi->video_frame_size == 0) { in read_packet()
120 mvi->video_frame_size = (mvi->get_int)(pb); in read_packet()
121 if (mvi->audio_size_left == 0) in read_packet()
123 if (mvi->audio_size_counter + 512 > UINT64_MAX - mvi->audio_frame_size || in read_packet()
124 … mvi->audio_size_counter + 512 + mvi->audio_frame_size >= ((uint64_t)INT32_MAX) << MVI_FRAC_BITS) in read_packet()
127 count = (mvi->audio_size_counter + mvi->audio_frame_size + 512) >> MVI_FRAC_BITS; in read_packet()
128 if (count > mvi->audio_size_left) in read_packet()
129 count = mvi->audio_size_left; in read_packet()
135 mvi->audio_size_left -= count; in read_packet()
136 mvi->audio_size_counter += mvi->audio_frame_size - (count << MVI_FRAC_BITS); in read_packet()
138 if ((ret = av_get_packet(pb, pkt, mvi->video_frame_size)) < 0) in read_packet()
141 mvi->video_frame_size = 0; in read_packet()