[FFmpeg-devel] [PATCH 1/3] avformat/hlsenc: added segment filename template

Michael Niedermayer michaelni at gmx.at
Fri Dec 5 01:35:26 CET 2014


On Thu, Dec 04, 2014 at 05:05:24PM -0600, Christian Suloway wrote:
> Signed-off-by: Christian Suloway <csuloway at globaleagleent.com>
> ---
>  libavformat/hlsenc.c | 87 +++++++++++++++++++++++++++++++++++++++++-----------
>  1 file changed, 69 insertions(+), 18 deletions(-)

missing documentation


> 
> diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
> index e13f438..0a48919 100644
> --- a/libavformat/hlsenc.c
> +++ b/libavformat/hlsenc.c
> @@ -33,7 +33,7 @@
>  #include "internal.h"
>  
>  typedef struct HLSSegment {

> -    char filename[1024];
> +    char *filename;

this looks unrelated


>      double duration; /* in seconds */
>      int64_t pos;
>      int64_t size;

> @@ -73,14 +73,23 @@ typedef struct HLSContext {
>      HLSSegment *segments;
>      HLSSegment *last_segment;
>  
> +    char *dirname;
>      char *basename;
>      char *baseurl;
>      char *format_options_str;

why is the dirname needed for allowing the user to set the template ?
[...]

> @@ -186,6 +197,7 @@ static int hls_window(AVFormatContext *s, int last)
>             sequence);
>  
>      for (en = hls->segments; en; en = en->next) {
> +
>          avio_printf(hls->pb, "#EXTINF:%f,\n", en->duration);
>          if (hls->flags & HLS_SINGLE_FILE)
>               avio_printf(hls->pb, "#EXT-X-BYTERANGE:%"PRIi64"@%"PRIi64"\n",

stray change

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20141205/b5584fd4/attachment.asc>


More information about the ffmpeg-devel mailing list