From 8978fedaeefdff50ed4deefbfe822ad07f19f616 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sat, 5 Mar 2011 21:06:46 +0100 Subject: avio: introduce an AVIOContext.seekable field Use it instead of url_is_streamed and AVIOContext.is_streamed. --- libavformat/rmenc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libavformat/rmenc.c') 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; -- cgit v1.2.3