Re: [FFmpeg-devel] [PATCH 2/3] ffserver: Use AVOption API to access ffm demuxer instead of direct access depending on ABI
On 20.11.2015 03:26, Michael Niedermayer wrote: > From: Michael Niedermayer> > Signed-off-by: Michael Niedermayer > --- > ffserver.c |6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/ffserver.c b/ffserver.c > index fb8ab7d..7e4f620 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) The code change looks very good, but it would be nice, if the commit message would explain that server_attached is newly added (and why). Otherwise one might wonder how it was set previously. Best regards, Andreas ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/3] ffserver: Use AVOption API to access ffm demuxer instead of direct access depending on ABI
On Fri, Nov 20, 2015 at 07:34:02PM +0100, Andreas Cadhalpun wrote: > On 20.11.2015 03:26, Michael Niedermayer wrote: > > From: Michael Niedermayer> > > > Signed-off-by: Michael Niedermayer > > --- > > ffserver.c |6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/ffserver.c b/ffserver.c > > index fb8ab7d..7e4f620 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) > > The code change looks very good, but it would be nice, if the commit > message would explain that server_attached is newly added (and why). > Otherwise one might wonder how it was set previously. explained and applied thx 8...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB You can kill me, but you cannot change the truth. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 2/3] ffserver: Use AVOption API to access ffm demuxer instead of direct access depending on ABI
From: Michael NiedermayerSigned-off-by: Michael Niedermayer --- ffserver.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ffserver.c b/ffserver.c index fb8ab7d..7e4f620 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) -- 1.7.9.5 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel