mirror of https://git.ffmpeg.org/ffmpeg.git
Do not use format string "%0.3f" for RTSP Range field.
Fixes ticket 10. The format string was locale-depending.
This commit is contained in:
parent
d375c10400
commit
4952afff75
|
@ -59,9 +59,14 @@ static int rtsp_read_play(AVFormatContext *s)
|
||||||
if (rt->state == RTSP_STATE_PAUSED) {
|
if (rt->state == RTSP_STATE_PAUSED) {
|
||||||
cmd[0] = 0;
|
cmd[0] = 0;
|
||||||
} else {
|
} else {
|
||||||
snprintf(cmd, sizeof(cmd),
|
if (!rt->seek_timestamp) {
|
||||||
"Range: npt=%0.3f-\r\n",
|
snprintf(cmd, sizeof(cmd), "Range: npt=0.000-\r\n");
|
||||||
(double)rt->seek_timestamp / AV_TIME_BASE);
|
} else {
|
||||||
|
snprintf(cmd, sizeof(cmd),
|
||||||
|
"Range: npt=%"PRId64".%03"PRId64"-\r\n",
|
||||||
|
rt->seek_timestamp / AV_TIME_BASE,
|
||||||
|
rt->seek_timestamp / (AV_TIME_BASE / 1000) % 1000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ff_rtsp_send_cmd(s, "PLAY", rt->control_uri, cmd, reply, NULL);
|
ff_rtsp_send_cmd(s, "PLAY", rt->control_uri, cmd, reply, NULL);
|
||||||
if (reply->status_code != RTSP_STATUS_OK) {
|
if (reply->status_code != RTSP_STATUS_OK) {
|
||||||
|
|
Loading…
Reference in New Issue