Opened 4 years ago
Last modified 4 years 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 |
Description
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)
Change History (3)
by , 4 years ago
Attachment: | ffmpeg_locale.diff added |
---|
comment:1 by , 4 years ago
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 by , 4 years ago
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.
Apply setlocale