Message ID | 1513926282-21191-2-git-send-email-kjeyapal@akamai.com |
---|---|
State | New |
Headers | show |
> On 22 Dec 2017, at 15:04, Karthick J <kjeyapal@akamai.com> wrote: > > From: Karthick Jeyapal <kjeyapal@akamai.com> > > Currently http end of chunk is called implicitly in hlsenc_io_open(). > This mean playlists http writes would have to wait upto a segment duration to signal end of chunk causing delays. > This patch will fix that problem and improve performance. > --- > libavformat/hlsenc.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c > index 0095ca4..65182c5 100644 > --- a/libavformat/hlsenc.c > +++ b/libavformat/hlsenc.c > @@ -268,8 +268,13 @@ static void hlsenc_io_close(AVFormatContext *s, AVIOContext **pb, char *filename > > if (!http_base_proto || !hls->http_persistent || hls->key_info_file || hls->encrypt) { > ff_format_io_close(s, pb); > +#if CONFIG_HTTP_PROTOCOL > } else { > + URLContext *http_url_context = ffio_geturlcontext(*pb); > + av_assert0(http_url_context); > avio_flush(*pb); > + ff_http_signal_end_of_chunk(http_url_context); > +#endif > } > } > > -- > 1.9.1 > LGTM, if the libavformat/http no problem. thanks Steven
>On 12/22/17, 2:06 PM, "刘歧" <lq@chinaffmpeg.org> wrote: > >> On 22 Dec 2017, at 15:04, Karthick J <kjeyapal@akamai.com> wrote: >> >> From: Karthick Jeyapal <kjeyapal@akamai.com> >> >> Currently http end of chunk is called implicitly in hlsenc_io_open(). >> This mean playlists http writes would have to wait upto a segment duration to signal end of chunk causing delays. >> This patch will fix that problem and improve performance. >> […] >LGTM, if the libavformat/http no problem. Thanks for the comments. I have sent a new patch v2 to address the http issue raised by wm4 Regards, Karthick > > >thanks > >Steven
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 0095ca4..65182c5 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -268,8 +268,13 @@ static void hlsenc_io_close(AVFormatContext *s, AVIOContext **pb, char *filename if (!http_base_proto || !hls->http_persistent || hls->key_info_file || hls->encrypt) { ff_format_io_close(s, pb); +#if CONFIG_HTTP_PROTOCOL } else { + URLContext *http_url_context = ffio_geturlcontext(*pb); + av_assert0(http_url_context); avio_flush(*pb); + ff_http_signal_end_of_chunk(http_url_context); +#endif } }
From: Karthick Jeyapal <kjeyapal@akamai.com> Currently http end of chunk is called implicitly in hlsenc_io_open(). This mean playlists http writes would have to wait upto a segment duration to signal end of chunk causing delays. This patch will fix that problem and improve performance. --- libavformat/hlsenc.c | 5 +++++ 1 file changed, 5 insertions(+)