summaryrefslogtreecommitdiff
path: root/libavformat/rmenc.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-03-05 21:06:46 +0100
committerAnton Khirnov <anton@khirnov.net>2011-04-03 22:46:40 +0200
commit8978fedaeefdff50ed4deefbfe822ad07f19f616 (patch)
treeffa8b7680649f418f83b1e833e0221749fbb6bdd /libavformat/rmenc.c
parent79997def65fd2313b48a5f3c3a884c6149ae9b5d (diff)
avio: introduce an AVIOContext.seekable field
Use it instead of url_is_streamed and AVIOContext.is_streamed.
Diffstat (limited to 'libavformat/rmenc.c')
-rw-r--r--libavformat/rmenc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/rmenc.c b/libavformat/rmenc.c
index 6f8b0937f3..d64040c1a2 100644
--- a/libavformat/rmenc.c
+++ b/libavformat/rmenc.c
@@ -118,7 +118,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 (url_is_streamed(s))
+ if (!s->seekable)
flags |= 4; /* live broadcast */
avio_wb16(s, flags);
@@ -170,7 +170,7 @@ static int rv10_write_header(AVFormatContext *ctx,
avio_wb32(s, 0); /* start time */
avio_wb32(s, BUFFER_DURATION); /* preroll */
/* duration */
- if (url_is_streamed(s) || !stream->total_frames)
+ if (!s->seekable || !stream->total_frames)
avio_wb32(s, (int)(3600 * 1000));
else
avio_wb32(s, (int)(stream->total_frames * 1000 / stream->frame_rate));
@@ -434,7 +434,7 @@ static int rm_write_trailer(AVFormatContext *s)
int data_size, index_pos, i;
AVIOContext *pb = s->pb;
- if (!url_is_streamed(s->pb)) {
+ if (s->pb->seekable) {
/* end of file: finish to write header */
index_pos = avio_tell(pb);
data_size = index_pos - rm->data_pos;