static FILE *logfile = NULL;
/* FIXME: make ffserver work with IPv6 */
-void av_noreturn exit_program(int ret)
-{
- exit(ret);
-}
-
/* resolve host with also IP address parsing */
static int resolve_host(struct in_addr *sin_addr, const char *hostname)
{
char cpuperc[10];
char cpuused[64];
- if (fscanf(pid_stat, "%10s %64s", cpuperc,
+ if (fscanf(pid_stat, "%9s %63s", cpuperc,
cpuused) == 2) {
avio_printf(pb, "Currently using %s%% of the cpu. Total time used %s.\n",
cpuperc, cpuused);
/* a packet has been received : write it in the store, except
if header */
if (c->data_count > FFM_PACKET_SIZE) {
-
- // printf("writing pos=0x%"PRIx64" size=0x%"PRIx64"\n", feed->feed_write_index, feed->feed_size);
/* XXX: use llseek or url_seek */
lseek(c->feed_fd, feed->feed_write_index, SEEK_SET);
if (write(c->feed_fd, c->buffer, FFM_PACKET_SIZE) < 0) {
{
AVStream *fst;
+ if(stream->nb_streams >= FF_ARRAY_ELEMS(stream->streams))
+ return NULL;
+
fst = av_mallocz(sizeof(AVStream));
if (!fst)
return NULL;
{
AVStream *st;
+ if(stream->nb_streams >= FF_ARRAY_ELEMS(stream->streams))
+ return;
+
/* compute default parameters */
switch(av->codec_type) {
case AVMEDIA_TYPE_AUDIO: