[FFmpeg-trac] #5295(avformat:reopened): Unusual bug when file name starts with leading %20

FFmpeg trac at avcodec.org
Sun Mar 13 14:15:32 CET 2016


#5295: Unusual bug when file name starts with leading %20
-------------------------------------+------------------------------------
             Reporter:  rjmoses      |                    Owner:
                 Type:  defect       |                   Status:  reopened
             Priority:  normal       |                Component:  avformat
              Version:  unspecified  |               Resolution:
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+------------------------------------

Comment (by rjmoses):

 I want apologize upfront--I am a newbie to video processing and my
 understanding for formats, etc., is extremely limited at this time.

 Upon further investigation, it might be appropriate if the escaped
 character processing was placed in hls.c: parse_playlist(). This accounts
 for recursive m3u8 file, i.e., m3u8 invokes a lower level m3u8 file which
 I believe is the "new variant".

 E.g.: An m3u8 top level file contains:  (I believe this is handled by
 variant processing.)

 #EXTM3U
 #EXT-X-STREAM-INF:PROGRAM-
 ID=1,BANDWIDTH=8327000,RESOLUTION=1920x1080,CODECS="avc1.640028,mp4a.40.2"
  HLS_1080_.m3u8
 #EXT-X-STREAM-INF:PROGRAM-
 ID=1,BANDWIDTH=7135000,RESOLUTION=1280x720,CODECS="avc1.4d001f,mp4a.40.2"
  HLS_720_.m3u8
 #EXT-X-STREAM-INF:PROGRAM-
 ID=1,BANDWIDTH=4989000,RESOLUTION=960x540,CODECS="avc1.4d001f,mp4a.40.2"
  HLS_960_.m3u8
 #EXT-X-STREAM-INF:PROGRAM-
 ID=1,BANDWIDTH=1507000,RESOLUTION=640x360,CODECS="avc1.42001f,mp4a.40.2"
  HLS_640_.m3u8
 #EXT-X-STREAM-INF:PROGRAM-
 ID=1,BANDWIDTH=551000,RESOLUTION=480x270,CODECS="avc1.42001e,mp4a.40.2"
  HLS_400_.m3u8

 However, this does not account for the condition where the
 directory/subdirectory contains embedded uri unsafe characters such as a
 space.

 I have tested this idea and it works, but I lack the expertise in ffmpeg
 to determine where the best place to add this processing would be.

 Also, perhaps another place would be ff_make_absolute_url() but I'm not
 sure how that would impact other functions, etc.

 Ralph

--
Ticket URL: <https://trac.ffmpeg.org/ticket/5295#comment:6>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list