[FFmpeg-trac] #649(avformat:new): Apple HTTP Live Streaming seeking incorrect

FFmpeg trac at avcodec.org
Mon Nov 14 11:39:34 CET 2011


#649: Apple HTTP Live Streaming seeking incorrect
---------------------------------------+----------------------------------
               Reporter:  takis        |                  Owner:
                   Type:  defect       |                 Status:  new
               Priority:  normal       |              Component:  avformat
                Version:  unspecified  |               Keywords:
             Blocked By:               |               Blocking:
Reproduced by developer:  0            |  Analyzed by developer:  0
---------------------------------------+----------------------------------
 The libavformat Apple HTTP Live Streaming demuxer uses incorrect units
 when searching for the MPEG TS segment which contains the requested
 timestamp. The segment duration is expressed in seconds in the IETF draft,
 and in the demuxer the added durations are compared with the requested
 timestamp.

 static int applehttp_read_seek(AVFormatContext *s, int stream_index,
 int64_t timestamp, int flags)
 ...
 timestamp = av_rescale_rnd(timestamp, 1, ...
 ...
 int64_t pos = 0;
 ...
 /* Locate the segment that contains the target timestamp */
         for (j = 0; j < var->n_segments; j++) {
             if (timestamp >= pos &&
                 timestamp < pos + var->segments[j]->duration) {
 ...
                 break;
             }
             pos += var->segments[j]->duration;

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


More information about the FFmpeg-trac mailing list