[FFmpeg-trac] #5094(ffserver:new): ffserver HTTP chunked encoding

FFmpeg trac at avcodec.org
Fri Dec 18 12:36:55 CET 2015


#5094: ffserver HTTP chunked encoding
----------------------------------+--------------------------------------
             Reporter:  kevg      |                     Type:  defect
               Status:  new       |                 Priority:  normal
            Component:  ffserver  |                  Version:  git-master
             Keywords:  http      |               Blocked By:
             Blocking:            |  Reproduced by developer:  0
Analyzed by developer:  0         |
----------------------------------+--------------------------------------
 I'm trying to stream video to ffserver via HTTP. But it doesn't work
 because ffserver is unable to parse chunked encoding correctly. It reads
 chunk length, then reads chunk itself but not reads chunk footer "\r\n".
 In the next iteration it reads the length of the next chunk size, but this
 is a footer of the first chunk. Length parsed is 0. ffserver decides
 stream has ended and closes it.

 1. Reading chunk length
 https://github.com/FFmpeg/FFmpeg/blob/master/ffserver.c#L2603

 2. Reading chunk data
 https://github.com/FFmpeg/FFmpeg/blob/master/ffserver.c#L2631

 3. Missed reading of "\r\n"

 https://tools.ietf.org/html/rfc2616#section-3.6.1
 chunk          = chunk-size [ chunk-extension ] CRLF
                         chunk-data CRLF

--
Ticket URL: <https://trac.ffmpeg.org/ticket/5094>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list