[FFmpeg-cvslog] avcodec/fft_template: use ff_thread_once on costable initialization

2017-07-06 Thread Muhammad Faiz
ffmpeg | branch: master | Muhammad Faiz  | Wed Jul  5 
12:33:22 2017 +0700| [1af615683e4a1a858407afbaa2fd686842da7e49] | committer: 
Muhammad Faiz

avcodec/fft_template: use ff_thread_once on costable initialization

Make it thread-safe and avoid redundant initialization.

Reviewed-by: Rostislav Pehlivanov 
Reviewed-by: wm4 
Signed-off-by: Muhammad Faiz 

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

 libavcodec/fft_template.c | 81 +--
 1 file changed, 71 insertions(+), 10 deletions(-)

diff --git a/libavcodec/fft_template.c b/libavcodec/fft_template.c
index 6477372274..6c77854e41 100644
--- a/libavcodec/fft_template.c
+++ b/libavcodec/fft_template.c
@@ -29,11 +29,19 @@
 #include 
 #include 
 #include "libavutil/mathematics.h"
+#include "libavutil/thread.h"
 #include "fft.h"
 #include "fft-internal.h"
 
 #if FFT_FIXED_32
 #include "fft_table.h"
+
+static void av_cold fft_lut_init(void)
+{
+int n = 0;
+ff_fft_lut_init(ff_fft_offsets_lut, 0, 1 << 17, );
+}
+
 #else /* FFT_FIXED_32 */
 
 /* cos(2*pi*x/n) for 0<=x<=n/4, followed by its reverse */
@@ -52,6 +60,66 @@ COSTABLE(16384);
 COSTABLE(32768);
 COSTABLE(65536);
 COSTABLE(131072);
+
+static av_cold void init_ff_cos_tabs(int index)
+{
+int i;
+int m = 1<

[FFmpeg-cvslog] avformat/hlsenc: Add missing error check

2017-07-06 Thread Derek Buitenhuis
ffmpeg | branch: master | Derek Buitenhuis  | Fri 
Jul  7 10:08:18 2017 +0800| [2d417076a2a7e7d15c239cd63646dae27ed5c126] | 
committer: Steven Liu

avformat/hlsenc: Add missing error check

Reviewed-by: Steven Liu 
Signed-off-by: Derek Buitenhuis 

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

 libavformat/hlsenc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index d93ca844e4..8a233270b5 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -602,6 +602,8 @@ static int hls_mux_init(AVFormatContext *s)
 av_dict_set(, "fflags", "-autobsf", 0);
 av_dict_set(, "movflags", "frag_custom+dash+delay_moov", 0);
 ret = avformat_init_output(oc, );
+if (ret < 0)
+return ret;
 if (av_dict_count(options)) {
 av_log(s, AV_LOG_ERROR, "Some of the provided format options in 
'%s' are not recognized\n", hls->format_options_str);
 av_dict_free();

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


[FFmpeg-cvslog] avformat/hlsenc: add warn message when use both fmp4 and single_file

2017-07-06 Thread Steven Liu
ffmpeg | branch: master | Steven Liu  | Fri Jul  7 
10:05:54 2017 +0800| [23e21130bbbe3f9c7ee9050e3a720b6ba2767022] | committer: 
Steven Liu

avformat/hlsenc: add warn message when use both fmp4 and single_file

have not implementation the fmp4 single file yet before this commit.

Suggested-by: Derek Buitenhuis 
Signed-off-by: Steven Liu 

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

 libavformat/hlsenc.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index dd6a62b13c..d93ca844e4 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -1304,9 +1304,14 @@ static int hls_write_header(AVFormatContext *s)
 const char *pattern_localtime_fmt = get_default_pattern_localtime_fmt();
 const char *vtt_pattern = "%d.vtt";
 AVDictionary *options = NULL;
+int byterange_mode = (hls->flags & HLS_SINGLE_FILE) || (hls->max_seg_size 
> 0);
 int basename_size;
 int vtt_basename_size;
 
+if (hls->segment_type == SEGMENT_TYPE_FMP4 && byterange_mode) {
+av_log(s, AV_LOG_WARNING, "Have not support fmp4 byterange mode yet 
now\n");
+return AVERROR_PATCHWELCOME;
+}
 if ((hls->start_sequence_source_type == 
HLS_START_SEQUENCE_AS_SECONDS_SINCE_EPOCH) ||
 (hls->start_sequence_source_type == 
HLS_START_SEQUENCE_AS_FORMATTED_DATETIME)) {
 time_t t = time(NULL); // we will need it in either case

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


[FFmpeg-cvslog] h264dec: remove unneeded prototype

2017-07-06 Thread Rafaël Carré
ffmpeg | branch: master | Rafaël Carré  | Thu Jul  6 
13:04:03 2017 +0200| [3b9cf943c97f95368db92a8983a888b441925f18] | committer: 
Michael Niedermayer

h264dec: remove unneeded prototype

Signed-off-by: Michael Niedermayer 

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

 libavcodec/h264dec.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c
index c7abd9d45d..49ebeca6d8 100644
--- a/libavcodec/h264dec.c
+++ b/libavcodec/h264dec.c
@@ -55,8 +55,6 @@
 #include "thread.h"
 #include "vdpau_compat.h"
 
-static int h264_decode_end(AVCodecContext *avctx);
-
 const uint16_t ff_h264_mb_sizes[4] = { 256, 384, 512, 768 };
 
 int avpriv_h264_has_num_reorder_frames(AVCodecContext *avctx)

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


[FFmpeg-cvslog] mpegtsenc: Don't pass NULL to memcpy

2017-07-06 Thread Derek Buitenhuis
ffmpeg | branch: master | Derek Buitenhuis  | Thu 
Jul  6 13:23:06 2017 -0400| [fde9013ab42411ee2015811c28e8921828a81702] | 
committer: Derek Buitenhuis

mpegtsenc: Don't pass NULL to memcpy

Signed-off-by: Derek Buitenhuis 

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

 libavformat/mpegtsenc.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index acea2e93a6..fdfa544ee2 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -277,6 +277,10 @@ static void putstr8(uint8_t **q_ptr, const char *str, int 
write_len)
 len = strlen(str);
 if (write_len)
 *q++ = len;
+if (!str) {
+*q_ptr = q;
+return;
+}
 memcpy(q, str, len);
 q += len;
 *q_ptr = q;

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


[FFmpeg-cvslog] configure: require pkg-config for libvorbis

2017-07-06 Thread Ricardo Constantino
ffmpeg | branch: master | Ricardo Constantino  | Tue Jul  4 
19:01:22 2017 +0100| [3b3501f75cb20b9f7abf43a3a9b1c3de595bc588] | committer: 
Derek Buitenhuis

configure: require pkg-config for libvorbis

libvorbis comes with pkg-config files since at least v1.0.1, way back in 2003.

We need the two checks for vorbis and vorbisenc because we use functions from
both and Xiph considers them separate libraries.

The check is inverted (vorbis first then vorbisenc) because add_extralibs()
prepends to EXTRALIBS instead of appending. For both shared and static linking
the order didn't seem to matter anyway, testing with MinGW.

Signed-off-by: Derek Buitenhuis 

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

 configure | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index 282114d268..1c65b536d5 100755
--- a/configure
+++ b/configure
@@ -5902,7 +5902,8 @@ enabled libtwolame&& require libtwolame twolame.h 
twolame_init -ltwolame
 enabled libv4l2   && require_pkg_config libv4l2 libv4l2.h v4l2_ioctl
 enabled libvidstab&& require_pkg_config "vidstab >= 0.98" 
vid.stab/libvidstab.h vsMotionDetectInit
 enabled libvo_amrwbenc&& require libvo_amrwbenc vo-amrwbenc/enc_if.h 
E_IF_init -lvo-amrwbenc
-enabled libvorbis && require libvorbis vorbis/vorbisenc.h 
vorbis_info_init -lvorbisenc -lvorbis -logg
+enabled libvorbis && require_pkg_config vorbis vorbis/codec.h 
vorbis_info_init &&
+ require_pkg_config vorbisenc vorbis/vorbisenc.h 
vorbis_encode_init
 
 enabled libvpx&& {
 enabled libvpx_vp8_decoder && {

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


[FFmpeg-cvslog] concatdec: Do not pass NULL to memcmp

2017-07-06 Thread Derek Buitenhuis
ffmpeg | branch: master | Derek Buitenhuis  | Thu 
Jul  6 13:15:00 2017 -0400| [99c68861f9c79033e09ad842e2651a4b3aea95ea] | 
committer: Derek Buitenhuis

concatdec: Do not pass NULL to memcmp

Signed-off-by: Derek Buitenhuis 

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

 libavformat/concatdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/concatdec.c b/libavformat/concatdec.c
index e57e5ce0ec..e8b37d6a08 100644
--- a/libavformat/concatdec.c
+++ b/libavformat/concatdec.c
@@ -120,7 +120,7 @@ static int add_file(AVFormatContext *avf, char *filename, 
ConcatFile **rfile,
 
 proto = avio_find_protocol_name(filename);
 proto_len = proto ? strlen(proto) : 0;
-if (!memcmp(filename, proto, proto_len) &&
+if (proto && !memcmp(filename, proto, proto_len) &&
 (filename[proto_len] == ':' || filename[proto_len] == ',')) {
 url = filename;
 filename = NULL;

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


[FFmpeg-cvslog] htmlsubtitles: support tag

2017-07-06 Thread wm4
ffmpeg | branch: master | wm4  | Mon Jul  3 13:42:44 
2017 +0200| [f605b56ad9c5965792359e5474238e318aed1399] | committer: wm4

htmlsubtitles: support  tag

Some .srt files use this tag.

(An alternative implementation would be correctly ignoring unknown tags,
and treating them as whitespace. libass can do automatic line wrapping.)

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

 libavcodec/htmlsubtitles.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/htmlsubtitles.c b/libavcodec/htmlsubtitles.c
index be5c9316ca..fe991678d5 100644
--- a/libavcodec/htmlsubtitles.c
+++ b/libavcodec/htmlsubtitles.c
@@ -167,6 +167,8 @@ int ff_htmlmarkup_to_ass(void *log_ctx, AVBPrint *dst, 
const char *in)
 }
 } else if (tagname[0] && !tagname[1] && strspn(tagname, 
"bisu") == 1) {
 av_bprintf(dst, "{\\%c%d}", tagname[0], !tag_close);
+} else if (!strcmp(tagname, "br")) {
+av_bprintf(dst, "\\N");
 } else {
 unknown = 1;
 snprintf(tmp, sizeof(tmp), "", tagname);

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