98 }
else if (num >= den) {
115 for (j=2; j<14; j+= 1+(j>2))
116 while (q.
den / q.
num < min_precission && q.
num % j == 0)
118 while (q.
den / q.
num < min_precission && q.
den < (1<<24))
125 const char *format,
const char *filename)
138 av_log(s,
AV_LOG_ERROR,
"Requested output format '%s' is not a suitable output format\n", format);
177 #if FF_API_ALLOC_OUTPUT_CONTEXT
183 return ret < 0 ? NULL : avctx;
282 "(%d/%d) and encoder layer (%d/%d)\n",
305 char tagbuf[32], tagbuf2[32];
309 "Tag %s/0x%08x incompatible with output codec id '%d' (%s)\n",
321 "Codec for stream %d does not use global headers "
322 "but container format requires global headers\n", i);
401 if (ret >= 0 && s->
pb && s->
pb->
error < 0)
420 #define AV_PKT_FLAG_UNCODED_FRAME 0x2000
426 #define UNCODED_FRAME_PACKET_SIZE (INT_MIN / 3 * 2 + (int)sizeof(AVFrame))
435 av_dlog(s,
"compute_pkt_fields2: pts:%s dts:%s cur_dts:%s b:%d size:%d st:%d\n",
476 "Application provided invalid, non monotonically increasing dts to muxer in stream %d: %s >= %s\n",
486 av_dlog(s,
"av_write_frame: pts2:%s dts2:%s\n",
546 if (s->
offset && !offset) {
613 if (ret >= 0 && s->
pb && s->
pb->
error < 0)
626 if (ret >= 0 && s->
pb && s->
pb->
error < 0)
634 #define CHUNK_START 0x1000
648 #if FF_API_DESTRUCT_PACKET
682 int64_t syncto =
av_rescale(pkt->
dts + syncoffset, 1, max)*max - syncoffset;
695 && ((chunked && !((*next_point)->pkt.flags&
CHUNK_START))
696 || !compare(s, &(*next_point)->pkt, pkt)))
697 next_point = &(*next_point)->
next;
709 this_pktl->
next = *next_point;
712 *next_point = this_pktl;
731 comp= (ts>ts2) - (ts<ts2);
743 int stream_count = 0, noninterleaved_count = 0;
756 ++noninterleaved_count;
765 int64_t delta_dts = INT64_MIN;
780 delta_dts =
FFMAX(delta_dts, last_dts - top_dts);
785 "Delay between the first packet and last packet in the "
786 "muxing queue is %"PRId64
" > %"PRId64
": forcing output\n",
792 if (stream_count && flush) {
850 av_dlog(s,
"av_interleaved_write_frame size:%d dts:%s pts:%s\n",
860 av_dlog(s,
"av_interleaved_write_frame FLUSH\n");
868 memset(pkt, 0,
sizeof(*pkt));
934 int64_t *dts, int64_t *wall)
978 pkt.
data = (
void *)frame;