Ticket #346: ffserver_buf_size.diff

File ffserver_buf_size.diff, 828 bytes (added by thunder.m, 5 years ago)

Patch for ffserver clients freezing after one minute.

  • ffserver.c

    diff -Naur b/ffserver.c a/ffserver.c
    b a  
    21612161        http_log("could not open %s: %d\n", input_filename, ret); 
    21622162        return -1; 
    21632163    } 
     2164    if (buf_size > 0) ffio_set_buf_size(s->pb, buf_size); 
    21642165    s->flags |= AVFMT_FLAG_GENPTS; 
    21652166    c->fmt_in = s; 
    21662167    if (strcmp(s->iformat->name, "ffm") && av_find_stream_info(c->fmt_in) < 0) { 
     
    36803681            int matches = 0; 
    36813682 
    36823683            if (avformat_open_input(&s, feed->feed_filename, NULL, NULL) >= 0) { 
     3684                /* set buffer size */ 
     3685                ffio_set_buf_size(s->pb, FFM_PACKET_SIZE); 
    36833686                /* Now see if it matches */ 
    36843687                if (s->nb_streams == feed->nb_streams) { 
    36853688                    matches = 1;