[FFmpeg-cvslog] avcodec/j2kenc: Only allocate cblk.data once

2017-11-23 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri 
Nov 24 03:49:55 2017 +0100| [7c191dfba76ce23e3605d2866f11d5c7ffcafd11] | 
committer: Michael Niedermayer

avcodec/j2kenc: Only allocate cblk.data once

Fixes: memleak
Found-by: 

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7c191dfba76ce23e3605d2866f11d5c7ffcafd11
---

 libavcodec/j2kenc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/j2kenc.c b/libavcodec/j2kenc.c
index 362c7f0f49..32c7fddb74 100644
--- a/libavcodec/j2kenc.c
+++ b/libavcodec/j2kenc.c
@@ -938,7 +938,8 @@ static int encode_tile(Jpeg2000EncoderContext *s, 
Jpeg2000Tile *tile, int tileno
 }
 }
 }
-prec->cblk[cblkno].data = av_malloc(1 + 8192);
+if (!prec->cblk[cblkno].data)
+prec->cblk[cblkno].data = av_malloc(1 + 8192);
 if (!prec->cblk[cblkno].data)
 return AVERROR(ENOMEM);
 encode_cblk(s, , prec->cblk + cblkno, tile, xx1 - 
xx0, yy1 - yy0,

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avformat/hlsenc: Added option to add EXT-X-INDEPENDENT-SEGMENTS tag

2017-11-23 Thread Karthick J
ffmpeg | branch: master | Karthick J  | Fri Nov 24 
06:57:36 2017 +0800| [efb51c8ebbe21f701da816bb78aefc0ce98b378d] | committer: 
Steven Liu

avformat/hlsenc: Added option to add EXT-X-INDEPENDENT-SEGMENTS tag

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=efb51c8ebbe21f701da816bb78aefc0ce98b378d
---

 doc/muxers.texi  |  4 
 libavformat/hlsenc.c | 17 +
 2 files changed, 21 insertions(+)

diff --git a/doc/muxers.texi b/doc/muxers.texi
index 0bb8ad2e2b..9d9ca31cc4 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -737,6 +737,10 @@ The file specified by @code{hls_key_info_file} will be 
checked periodically and
 detect updates to the encryption info. Be sure to replace this file atomically,
 including the file containing the AES encryption key.
 
+@item independent_segments
+Add the @code{#EXT-X-INDEPENDENT-SEGMENTS} to playlists that has video segments
+and when all the segments of that playlist are guaranteed to start with a Key 
frame.
+
 @item split_by_time
 Allow segments to start on frames other than keyframes. This improves
 behavior on some players when the time between keyframes is inconsistent,
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 611cc99b6e..30ccf73d76 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -88,6 +88,7 @@ typedef enum HLSFlags {
 HLS_SECOND_LEVEL_SEGMENT_SIZE = (1 << 10), // include segment size (bytes) 
in segment filenames when use_localtime  e.g.: %%014s
 HLS_TEMP_FILE = (1 << 11),
 HLS_PERIODIC_REKEY = (1 << 12),
+HLS_INDEPENDENT_SEGMENTS = (1 << 13),
 } HLSFlags;
 
 typedef enum {
@@ -1190,6 +1191,10 @@ static int hls_window(AVFormatContext *s, int last, 
VariantStream *vs)
 sequence = 0;
 }
 
+if (hls->flags & HLS_INDEPENDENT_SEGMENTS) {
+hls->version = 6;
+}
+
 if (hls->segment_type == SEGMENT_TYPE_FMP4) {
 hls->version = 7;
 }
@@ -1219,6 +1224,9 @@ static int hls_window(AVFormatContext *s, int last, 
VariantStream *vs)
 avio_printf(out, "#EXT-X-DISCONTINUITY\n");
 vs->discontinuity_set = 1;
 }
+if (vs->has_video && (hls->flags & HLS_INDEPENDENT_SEGMENTS)) {
+avio_printf(out, "#EXT-X-INDEPENDENT-SEGMENTS\n");
+}
 for (en = vs->segments; en; en = en->next) {
 if ((hls->encrypt || hls->key_info_file) && (!key_uri || 
strcmp(en->key_uri, key_uri) ||
 av_strcasecmp(en->iv_string, iv_string))) {
@@ -1731,6 +1739,14 @@ static int hls_write_header(AVFormatContext *s)
 vs->start_pts  = AV_NOPTS_VALUE;
 vs->current_segment_final_filename_fmt[0] = '\0';
 
+if (hls->flags & HLS_SPLIT_BY_TIME && hls->flags & 
HLS_INDEPENDENT_SEGMENTS) {
+// Independent segments cannot be guaranteed when splitting by time
+hls->flags &= ~HLS_INDEPENDENT_SEGMENTS;
+av_log(s, AV_LOG_WARNING,
+   "'split_by_time' and 'independent_segments' cannot be enabled 
together. "
+   "Disabling 'independent_segments' flag\n");
+}
+
 if (hls->flags & HLS_PROGRAM_DATE_TIME) {
 time_t now0;
 time();
@@ -2322,6 +2338,7 @@ static const AVOption options[] = {
 {"second_level_segment_duration", "include segment duration in segment 
filenames when use_localtime", 0, AV_OPT_TYPE_CONST, {.i64 = 
HLS_SECOND_LEVEL_SEGMENT_DURATION }, 0, UINT_MAX,   E, "flags"},
 {"second_level_segment_size", "include segment size in segment filenames 
when use_localtime", 0, AV_OPT_TYPE_CONST, {.i64 = 
HLS_SECOND_LEVEL_SEGMENT_SIZE }, 0, UINT_MAX,   E, "flags"},
 {"periodic_rekey", "reload keyinfo file periodically for re-keying", 0, 
AV_OPT_TYPE_CONST, {.i64 = HLS_PERIODIC_REKEY }, 0, UINT_MAX,   E, "flags"},
+{"independent_segments", "add EXT-X-INDEPENDENT-SEGMENTS, whenever 
applicable", 0, AV_OPT_TYPE_CONST, { .i64 = HLS_INDEPENDENT_SEGMENTS }, 0, 
UINT_MAX, E, "flags"},
 {"use_localtime", "set filename expansion with strftime at segment 
creation", OFFSET(use_localtime), AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1, E },
 {"use_localtime_mkdir", "create last directory component in 
strftime-generated filename", OFFSET(use_localtime_mkdir), AV_OPT_TYPE_BOOL, 
{.i64 = 0 }, 0, 1, E },
 {"hls_playlist_type", "set the HLS playlist type", OFFSET(pl_type), 
AV_OPT_TYPE_INT, {.i64 = PLAYLIST_TYPE_NONE }, 0, PLAYLIST_TYPE_NB-1, E, 
"pl_type" },

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avformat/hlsenc: Refactor an inconsistent variable name

2017-11-23 Thread Karthick J
ffmpeg | branch: master | Karthick J  | Fri Nov 24 
06:42:35 2017 +0800| [241c1192d6b8db17f4ea6055573417a4830d5cc6] | committer: 
Steven Liu

avformat/hlsenc: Refactor an inconsistent variable name

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=241c1192d6b8db17f4ea6055573417a4830d5cc6
---

 libavformat/hlsenc.c | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 525605b8f5..611cc99b6e 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -1074,7 +1074,7 @@ static int create_master_playlist(AVFormatContext *s,
 AVDictionary *options = NULL;
 unsigned int i, j;
 int m3u8_name_size, ret, bandwidth;
-char *m3U8_rel_name;
+char *m3u8_rel_name;
 
 input_vs->m3u8_created = 1;
 if (!hls->master_m3u8_created) {
@@ -1108,14 +1108,14 @@ static int create_master_playlist(AVFormatContext *s,
 vs = &(hls->var_streams[i]);
 
 m3u8_name_size = strlen(vs->m3u8_name) + 1;
-m3U8_rel_name = av_malloc(m3u8_name_size);
-if (!m3U8_rel_name) {
+m3u8_rel_name = av_malloc(m3u8_name_size);
+if (!m3u8_rel_name) {
 ret = AVERROR(ENOMEM);
 goto fail;
 }
-av_strlcpy(m3U8_rel_name, vs->m3u8_name, m3u8_name_size);
+av_strlcpy(m3u8_rel_name, vs->m3u8_name, m3u8_name_size);
 ret = get_relative_url(hls->master_m3u8_url, vs->m3u8_name,
-   m3U8_rel_name, m3u8_name_size);
+   m3u8_rel_name, m3u8_name_size);
 if (ret < 0) {
 av_log(NULL, AV_LOG_ERROR, "Unable to find relative URL\n");
 goto fail;
@@ -1145,7 +1145,7 @@ static int create_master_playlist(AVFormatContext *s,
 if (!bandwidth) {
 av_log(NULL, AV_LOG_WARNING,
 "Bandwidth info not available, set audio and video 
bitrates\n");
-av_freep(_rel_name);
+av_freep(_rel_name);
 continue;
 }
 
@@ -1153,14 +1153,14 @@ static int create_master_playlist(AVFormatContext *s,
 if (vid_st && vid_st->codecpar->width > 0 && vid_st->codecpar->height 
> 0)
 avio_printf(master_pb, ",RESOLUTION=%dx%d", 
vid_st->codecpar->width,
 vid_st->codecpar->height);
-avio_printf(master_pb, "\n%s\n\n", m3U8_rel_name);
+avio_printf(master_pb, "\n%s\n\n", m3u8_rel_name);
 
-av_freep(_rel_name);
+av_freep(_rel_name);
 }
 fail:
 if(ret >=0)
 hls->master_m3u8_created = 1;
-av_freep(_rel_name);
+av_freep(_rel_name);
 ff_format_io_close(s, _pb);
 return ret;
 }

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avformat/hlsenc: Minor fix in setting http options for master playlist

2017-11-23 Thread Karthick J
ffmpeg | branch: master | Karthick J  | Fri Nov 24 
06:41:25 2017 +0800| [f335efc0add8b32b0fe7223c3d897a5e41edbf64] | committer: 
Steven Liu

avformat/hlsenc: Minor fix in setting http options for master playlist

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f335efc0add8b32b0fe7223c3d897a5e41edbf64
---

 libavformat/hlsenc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 3c47ced30d..525605b8f5 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -1089,8 +1089,7 @@ static int create_master_playlist(AVFormatContext *s,
 return 0;
 }
 
-if (hls->user_agent)
-  av_dict_set(, "user-agent", hls->user_agent, 0);
+set_http_options(s, , hls);
 
 ret = s->io_open(s, _pb, hls->master_m3u8_url, AVIO_FLAG_WRITE,\
  );

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avfilter/Makefile: skip building opencl.h when opencl is disabled

2017-11-23 Thread James Almer
ffmpeg | branch: master | James Almer  | Thu Nov 23 19:11:17 
2017 -0300| [ef8979f1992fd7753c2a236ac219a7147b7fe99a] | committer: James Almer

avfilter/Makefile: skip building opencl.h when opencl is disabled

Fixes make checkheaders.

Signed-off-by: James Almer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ef8979f1992fd7753c2a236ac219a7147b7fe99a
---

 libavfilter/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavfilter/Makefile b/libavfilter/Makefile
index 89737b5ad0..ec0deff86f 100644
--- a/libavfilter/Makefile
+++ b/libavfilter/Makefile
@@ -398,6 +398,7 @@ SKIPHEADERS-$(CONFIG_LIBVIDSTAB) += 
vidstabutils.h
 OBJS-$(CONFIG_SHARED)+= log2_tab.o
 
 SKIPHEADERS-$(CONFIG_QSVVPP) += qsvvpp.h
+SKIPHEADERS-$(CONFIG_OPENCL) += opencl.h
 
 TOOLS = graph2dot
 TESTPROGS = drawutils filtfmts formats integral

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] doc/filters: mention (a)loop defaults

2017-11-23 Thread Lou Logan
ffmpeg | branch: master | Lou Logan  | Thu Nov 23 11:54:26 2017 
-0900| [a60b2425c3beaa214af59611988b9ae6c370933c] | committer: Lou Logan

doc/filters: mention (a)loop defaults

Signed-off-by: Lou Logan 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a60b2425c3beaa214af59611988b9ae6c370933c
---

 doc/filters.texi | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/doc/filters.texi b/doc/filters.texi
index b8a4d032e0..bee626e775 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -1145,12 +1145,13 @@ The filter accepts the following options:
 @table @option
 @item loop
 Set the number of loops. Setting this value to -1 will result in infinite 
loops.
+Default is 0.
 
 @item size
-Set maximal number of samples.
+Set maximal number of samples. Default is 0.
 
 @item start
-Set first sample of loop.
+Set first sample of loop. Default is 0.
 @end table
 
 @anchor{amerge}
@@ -9992,12 +9993,13 @@ The filter accepts the following options:
 @table @option
 @item loop
 Set the number of loops. Setting this value to -1 will result in infinite 
loops.
+Default is 0.
 
 @item size
-Set maximal size in number of frames.
+Set maximal size in number of frames. Default is 0.
 
 @item start
-Set first frame of loop.
+Set first frame of loop. Default is 0.
 @end table
 
 @anchor{lut3d}

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] doc/filters.texi: explain infinite looping

2017-11-23 Thread Werner Robitza
ffmpeg | branch: master | Werner Robitza  | Thu Nov 
23 13:16:53 2017 +0100| [5f278620b82610588a4db208c020a32a32c6828c] | committer: 
Lou Logan

doc/filters.texi: explain infinite looping

Explain how to achieve infinite looping with the loop / aloop filters.

Signed-off-by: Werner Robitza 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5f278620b82610588a4db208c020a32a32c6828c
---

 doc/filters.texi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/filters.texi b/doc/filters.texi
index 04a8139c6d..b8a4d032e0 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -1144,7 +1144,7 @@ The filter accepts the following options:
 
 @table @option
 @item loop
-Set the number of loops.
+Set the number of loops. Setting this value to -1 will result in infinite 
loops.
 
 @item size
 Set maximal number of samples.
@@ -9991,7 +9991,7 @@ The filter accepts the following options:
 
 @table @option
 @item loop
-Set the number of loops.
+Set the number of loops. Setting this value to -1 will result in infinite 
loops.
 
 @item size
 Set maximal size in number of frames.

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avcodec/x86/exrdsp : use ymm constant for pb_80

2017-11-23 Thread Martin Vignali
ffmpeg | branch: master | Martin Vignali  | Tue Nov 
21 22:02:07 2017 +0100| [51af6c1737102d24b783f6316a1cdeca6511] | committer: 
Martin Vignali

avcodec/x86/exrdsp : use ymm constant for pb_80

speed seems to be similar, but simplify code

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=51af6c1737102d24b783f6316a1cdeca6511
---

 libavcodec/x86/exrdsp.asm | 6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/libavcodec/x86/exrdsp.asm b/libavcodec/x86/exrdsp.asm
index 23c9397ef8..3bf240c8b1 100644
--- a/libavcodec/x86/exrdsp.asm
+++ b/libavcodec/x86/exrdsp.asm
@@ -73,11 +73,7 @@ REORDER_PIXELS
 
 %macro PREDICTOR 0
 cglobal predictor, 2,2,5, src, size
-%if mmsize == 32
-vbroadcasti128   m0, [pb_80]
-%else
-movaxm0, [pb_80]
-%endif
+mova m0, [pb_80]
 movaxm1, [pb_15]
 movaxm2, xm0
 addsrcq, sizeq

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] Revert "udp: fix compilation when HAVE_PTHREAD_CANCEL isnt defined"

2017-11-23 Thread Derek Buitenhuis
ffmpeg | branch: master | Derek Buitenhuis  | Wed 
Nov 22 15:28:40 2017 +| [cce33ed10fdceda7e634ed8b01cf616d34505924] | 
committer: Derek Buitenhuis

Revert "udp: fix compilation when HAVE_PTHREAD_CANCEL isnt defined"

This was an mplayer-specific hack.

This reverts commit a4f94f24b4f153c30bbcaa700bedfb2b3a581e5e.

Signed-off-by: Derek Buitenhuis 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cce33ed10fdceda7e634ed8b01cf616d34505924
---

 libavformat/udp.c | 4 
 1 file changed, 4 deletions(-)

diff --git a/libavformat/udp.c b/libavformat/udp.c
index 3835f989c4..0dde0353fb 100644
--- a/libavformat/udp.c
+++ b/libavformat/udp.c
@@ -64,10 +64,6 @@
 #include 
 #endif
 
-#ifndef HAVE_PTHREAD_CANCEL
-#define HAVE_PTHREAD_CANCEL 0
-#endif
-
 #ifndef IPV6_ADD_MEMBERSHIP
 #define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP
 #define IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog