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>
This commit is contained in:
Michael Niedermayer 2015-11-20 03:09:28 +01:00
parent 3444c00aab
commit e33d372023

View File

@ -300,9 +300,9 @@ bail_eio:
static void ffm_set_write_index(AVFormatContext *s, int64_t pos, static void ffm_set_write_index(AVFormatContext *s, int64_t pos,
int64_t file_size) int64_t file_size)
{ {
FFMContext *ffm = s->priv_data; av_opt_set_int(s, "server_attached", 1, AV_OPT_SEARCH_CHILDREN);
ffm->write_index = pos; av_opt_set_int(s, "write_index", pos, AV_OPT_SEARCH_CHILDREN);
ffm->file_size = file_size; av_opt_set_int(s, "file_size", file_size, AV_OPT_SEARCH_CHILDREN);
} }
static char *ctime1(char *buf2, size_t buf_size) static char *ctime1(char *buf2, size_t buf_size)