Lines Matching refs:pkt

44 void of_write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost,
61 av_packet_unref(pkt);
73 (ost->muxing_queue_data_size + pkt->size) > ost->muxing_queue_data_threshold;
87 ret = av_packet_make_refcounted(pkt);
93 av_packet_move_ref(tmp_pkt, pkt);
101 pkt->pts = pkt->dts = AV_NOPTS_VALUE;
105 if (pkt->duration > 0)
107 pkt->duration = av_rescale_q(1, av_inv_q(ost->frame_rate),
112 av_packet_rescale_ts(pkt, ost->mux_timebase, ost->st->time_base);
115 if (pkt->dts != AV_NOPTS_VALUE &&
116 pkt->pts != AV_NOPTS_VALUE &&
117 pkt->dts > pkt->pts) {
119 pkt->dts, pkt->pts,
121 pkt->pts =
122 pkt->dts = pkt->pts + pkt->dts + ost->last_mux_dts + 1
123 - FFMIN3(pkt->pts, pkt->dts, ost->last_mux_dts + 1)
124 - FFMAX3(pkt->pts, pkt->dts, ost->last_mux_dts + 1);
127 pkt->dts != AV_NOPTS_VALUE &&
130 if (pkt->dts < max) {
131 int loglevel = max - pkt->dts > 2 || st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO ? AV_LOG_WARNING : AV_LOG_DEBUG;
136 ost->file_index, ost->st->index, ost->last_mux_dts, pkt->dts);
144 if (pkt->pts >= pkt->dts)
145 pkt->pts = FFMAX(pkt->pts, max);
146 pkt->dts = max;
150 ost->last_mux_dts = pkt->dts;
152 ost->data_size += pkt->size;
155 pkt->stream_index = ost->index;
161 av_ts2str(pkt->pts), av_ts2timestr(pkt->pts, &ost->st->time_base),
162 av_ts2str(pkt->dts), av_ts2timestr(pkt->dts, &ost->st->time_base),
163 av_ts2str(pkt->duration), av_ts2timestr(pkt->duration, &ost->st->time_base),
164 pkt->size
168 ret = av_interleaved_write_frame(s, pkt);
265 AVPacket *pkt;
271 while (av_fifo_read(ost->muxing_queue, &pkt, 1) >= 0) {
272 ost->muxing_queue_data_size -= pkt->size;
273 of_write_packet(of, pkt, ost, 1);
274 av_packet_free(&pkt);