1 STATIC
void fatal(u8
*fmt
, ...)
8 va_end(ap
); /* unreachable */
10 STATIC
void pout(u8
*fmt
, ...)
19 STATIC
bool did_reached_limits(void)
23 npv_pipeline_limits_lock();
24 if (npv_pipeline_limits_p
.pkts
.audio_bytes_n
25 >= npv_pipeline_limits_p
.pkts
.limit
.audio_bytes_n
26 && npv_pipeline_limits_p
.pkts
.video_bytes_n
27 >= npv_pipeline_limits_p
.pkts
.limit
.video_bytes_n
)
31 npv_pipeline_limits_unlock();
34 STATIC
void init_once_public(u8
*url
)
39 r
= avformat_open_input(&ctx_p
, url
, NULL
, NULL
);
41 fatal("ffmpeg:unable to open \"%s\"\n", url
);
42 r
= pthread_mutex_init(&ctx_mutex_l
, 0);
44 fatal("unable to init the format mutex\n");
46 STATIC
void init_once_local(void)
48 pkt_l
= avcodec_pkt_ref_alloc();
50 fatal("ffmpeg:unable to allocate a reference on a packet for encoded/compressed audio/video\n");