summaryrefslogtreecommitdiff
path: root/ffserver.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-11-20 03:09:28 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2015-11-20 20:03:12 +0100
commite33d3720239314d28a48c64c1071ba9c048280d1 (patch)
tree3001be3698ae052b91dfc207e9b1c172a03ceca7 /ffserver.c
parent3444c00aab6e187360a5aa66216abeb15d26ddc6 (diff)
downloadffmpeg-e33d3720239314d28a48c64c1071ba9c048280d1.tar.gz
ffserver: Use AVOption API to access ffm demuxer instead of direct access depending on ABI
server_attached is newly added so the demuxer knows if there is an attached server that can update the write index. This is needed to fix a infinite loop Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'ffserver.c')
-rw-r--r--ffserver.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ffserver.c b/ffserver.c
index fb8ab7d3e7..7e4f6208c5 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -300,9 +300,9 @@ bail_eio:
static void ffm_set_write_index(AVFormatContext *s, int64_t pos,
int64_t file_size)
{
- FFMContext *ffm = s->priv_data;
- ffm->write_index = pos;
- ffm->file_size = file_size;
+ av_opt_set_int(s, "server_attached", 1, AV_OPT_SEARCH_CHILDREN);
+ av_opt_set_int(s, "write_index", pos, AV_OPT_SEARCH_CHILDREN);
+ av_opt_set_int(s, "file_size", file_size, AV_OPT_SEARCH_CHILDREN);
}
static char *ctime1(char *buf2, size_t buf_size)