mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
smoothstreamingenc: do not open the files as read+write
They are only written to, never read.
This commit is contained in:
parent
d082078a88
commit
e192cd9ce2
@ -121,7 +121,7 @@ static int64_t ism_seek(void *opaque, int64_t offset, int whence)
|
|||||||
AVDictionary *opts = NULL;
|
AVDictionary *opts = NULL;
|
||||||
os->tail_out = os->out;
|
os->tail_out = os->out;
|
||||||
av_dict_set(&opts, "truncate", "0", 0);
|
av_dict_set(&opts, "truncate", "0", 0);
|
||||||
ret = ffurl_open(&os->out, frag->file, AVIO_FLAG_READ_WRITE, &os->ctx->interrupt_callback, &opts);
|
ret = ffurl_open(&os->out, frag->file, AVIO_FLAG_WRITE, &os->ctx->interrupt_callback, &opts);
|
||||||
av_dict_free(&opts);
|
av_dict_free(&opts);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
os->out = os->tail_out;
|
os->out = os->tail_out;
|
||||||
@ -129,7 +129,7 @@ static int64_t ism_seek(void *opaque, int64_t offset, int whence)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
av_dict_set(&opts, "truncate", "0", 0);
|
av_dict_set(&opts, "truncate", "0", 0);
|
||||||
ffurl_open(&os->out2, frag->infofile, AVIO_FLAG_READ_WRITE, &os->ctx->interrupt_callback, &opts);
|
ffurl_open(&os->out2, frag->infofile, AVIO_FLAG_WRITE, &os->ctx->interrupt_callback, &opts);
|
||||||
av_dict_free(&opts);
|
av_dict_free(&opts);
|
||||||
ffurl_seek(os->out, offset - frag->start_pos, SEEK_SET);
|
ffurl_seek(os->out, offset - frag->start_pos, SEEK_SET);
|
||||||
if (os->out2)
|
if (os->out2)
|
||||||
|
Loading…
Reference in New Issue
Block a user