Opened 7 weeks ago

Last modified 7 weeks ago

#9011 new defect

HLS muxer is locale sensitive

Reported by: kurufu Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: hls
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


Summary of the bug:
The HLS Muxer fails to parse parameters when in locales with , radix. The HLS Muxer also outputs invalid playlists when in these same locales.

How to reproduce:
Recompile ffmpeg cli with setlocale(LC_ALL, "") to initialize locales (see diff). This issue affects users of libavformat from within locale sensitive applications but just initializing locales in ffmpeg cli is enough to replicate all the issues.

% ./ffmpeg -i input.mkv -c:v copy -f hls output.m3u8
# Observe the resulting m3u8 contains #EXTINF entries with , radix.
% LC_NUMERIC=es_ES.UTF-8 ./ffmpeg -i input.mkv -c:v copy -hls_time 0.5 -f hls output.m3u8
[hls muxer @ 0x55f949438cc0] [Eval @ 0x7ffd63b5c9a0] Invalid chars '.5' at the end of expression '0.5'
[hls muxer @ 0x55f949438cc0] Unable to parse option value "0.5"
[hls muxer @ 0x55f949438cc0] Error setting option hls_time to value 0.5.
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:1 -- 

Attachments (1)

ffmpeg_locale.diff (515 bytes) - added by kurufu 7 weeks ago.
Apply setlocale

Download all attachments as: .zip

Change History (3)

Changed 7 weeks ago by kurufu

Apply setlocale

comment:1 Changed 7 weeks ago by cehoyos

Do I understand correctly that the issue you report is only reproducible with broken binaries linked against one or more of FFmpeg's libraries?

comment:2 Changed 7 weeks ago by kurufu

Im not sure what you mean by broken binaries. Can you explain what aspect of this you think is broken? The only change here is making the binary locale aware which is a common aspect of locale aware applications such as those using gtk or qt.

Note: See TracTickets for help on using tickets.