[vdr] locale issue with --edit
listaccount at e-tobi.net
Wed Mar 14 03:10:28 CET 2012
This was driving me mad!
I have a NTSC TS-recording with 29.97002997 fps.
When I set cut marks via the VDR-OSD and cut the recording, this works fine.
But when I cut the same recording with the same cut marks with
`vdr --edit`, the cut points are offset by some seconds e.g. the beginning
of the cutted recording is about 9 seconds earlier than it should be.
Reason: When invoking `vdr --edit` LC_NUMERIC is *not* set to "C" yet when
CutRecording() is called. My default locale uses "," as the decimal
point, causing the framerate to be parsed as 29.0 instead of 29.97002997.
setlocale(LC_NUMERIC, "C") should be called earlier in main().
More information about the vdr