diff options
author | James Almer <jamrial@gmail.com> | 2017-03-21 17:02:30 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2017-03-21 17:02:30 -0300 |
commit | 4de591e6fb7361bd417dcd9563672ed0ad8b361b (patch) | |
tree | ff6b5c51a4891b49f61d53b88bdfb27cc6a89579 /libavformat/rmenc.c | |
parent | 423375d4f06ae7103e575a31c23e62e3ba440845 (diff) | |
parent | 83548fe894cdb455cc127f754d09905b6d23c173 (diff) | |
download | ffmpeg-4de591e6fb7361bd417dcd9563672ed0ad8b361b.tar.gz |
Merge commit '83548fe894cdb455cc127f754d09905b6d23c173'
* commit '83548fe894cdb455cc127f754d09905b6d23c173':
lavf: fix usage of AVIOContext.seekable
Merged-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/rmenc.c')
-rw-r--r-- | libavformat/rmenc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/rmenc.c b/libavformat/rmenc.c index 0bc5bfd92b..f9821d1875 100644 --- a/libavformat/rmenc.c +++ b/libavformat/rmenc.c @@ -123,7 +123,7 @@ static int rv10_write_header(AVFormatContext *ctx, avio_wb32(s, 0); /* data offset : will be patched after */ avio_wb16(s, ctx->nb_streams); /* num streams */ flags = 1 | 2; /* save allowed & perfect play */ - if (!s->seekable) + if (!(s->seekable & AVIO_SEEKABLE_NORMAL)) flags |= 4; /* live broadcast */ avio_wb16(s, flags); @@ -175,7 +175,7 @@ static int rv10_write_header(AVFormatContext *ctx, avio_wb32(s, 0); /* start time */ avio_wb32(s, BUFFER_DURATION); /* preroll */ /* duration */ - if (!s->seekable || !stream->total_frames) + if (!(s->seekable & AVIO_SEEKABLE_NORMAL) || !stream->total_frames) avio_wb32(s, (int)(3600 * 1000)); else avio_wb32(s, av_rescale_q_rnd(stream->total_frames, (AVRational){1000, 1}, stream->frame_rate, AV_ROUND_ZERO)); @@ -444,7 +444,7 @@ static int rm_write_trailer(AVFormatContext *s) int data_size, index_pos, i; AVIOContext *pb = s->pb; - if (s->pb->seekable) { + if (s->pb->seekable & AVIO_SEEKABLE_NORMAL) { /* end of file: finish to write header */ index_pos = avio_tell(pb); data_size = index_pos - rm->data_pos; |