Re: [FFmpeg-devel] [PATCH] lavf/os_support: Add safe win32 dlopen/dlclose/dlsym functions.

2016-10-29 Thread Matt Oliver
>
> FYI, last time i tried to include this file from libavcodec i was told
>> not to since it's libavformat specific.
>>
>> The proper place for these wrappers is probably the compat folder, in
>> a new file similar to w32threads.h
>>
>
OK finally updated the patch. it now adds the safe dll function into a new
file "compat/w32dlfcn.h" and each source file that needs this header has
been updated accordingly. Otherwise the code is the same as the last
version that was tested by Michael.

If there are no other outstanding objections then let me know so i can push
this.


0001-compat-w32dlfcn.h-Add-safe-win32-dlopen-dlclose-dlsy.patch
Description: Binary data


0002-avutil-hwcontext_dxva.c-Use-new-safe-dlopen-code.patch
Description: Binary data


0003-avformat-avisynth.c-Use-new-safe-dlopen-code.patch
Description: Binary data


0004-avcodec-nvenc.c-Use-new-safe-dlopen-code.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] openssl: Allow newer TLS versions than TLSv1

2016-10-29 Thread Mark Thompson
The use of TLSv1_*_method() disallows newer protocol versions; instead
use SSLv23_*_method() and then explicitly disable the deprecated
protocol versions which should not be supported.

Fixes ticket #5915.
---
On 28/10/16 22:15, Hendrik Leppkes wrote:
> I should have looked further when commenting on the other patch - I guess. :)
> Looks good to me, the OpenSSL API seems to be rather confusing in this
> regard. Maybe a comment might be  useful to indicate why this is done.

Hopefully this is clearer.

Thanks,

- Mark


 libavformat/tls_openssl.c | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c
index c551ac7..178ca9e 100644
--- a/libavformat/tls_openssl.c
+++ b/libavformat/tls_openssl.c
@@ -233,12 +233,17 @@ static int tls_open(URLContext *h, const char *uri, int 
flags, AVDictionary **op
 if ((ret = ff_tls_open_underlying(c, h, uri, options)) < 0)
 goto fail;

-p->ctx = SSL_CTX_new(c->listen ? TLSv1_server_method() : 
TLSv1_client_method());
+// We want to support all versions of TLS >= 1.0, but not the deprecated
+// and insecure SSLv2 and SSLv3.  Despite the name, SSLv23_*_method()
+// enables support for all versions of SSL and TLS, and we then disable
+// support for the old protocols immediately after creating the context.
+p->ctx = SSL_CTX_new(c->listen ? SSLv23_server_method() : 
SSLv23_client_method());
 if (!p->ctx) {
 av_log(h, AV_LOG_ERROR, "%s\n", ERR_error_string(ERR_get_error(), 
NULL));
 ret = AVERROR(EIO);
 goto fail;
 }
+SSL_CTX_set_options(p->ctx, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3);
 if (c->ca_file) {
 if (!SSL_CTX_load_verify_locations(p->ctx, c->ca_file, NULL))
 av_log(h, AV_LOG_ERROR, "SSL_CTX_load_verify_locations %s\n", 
ERR_error_string(ERR_get_error(), NULL));
-- 
2.9.3

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


Re: [FFmpeg-devel] [PATCH 1/2] ffmpeg: move some unrelated code out of a filter loop

2016-10-29 Thread Clément Bœsch
On Mon, Oct 24, 2016 at 11:05:06PM +0200, Clément Bœsch wrote:
> ---
> Not sure if the chunk is even needed
> ---
>  ffmpeg.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/ffmpeg.c b/ffmpeg.c
> index 3b91710..e8088c0 100644
> --- a/ffmpeg.c
> +++ b/ffmpeg.c
> @@ -2317,10 +2317,9 @@ static int decode_video(InputStream *ist, AVPacket 
> *pkt, int *got_output, int eo
>  }
>  
>  frame_sample_aspect= av_opt_ptr(avcodec_get_frame_class(), 
> decoded_frame, "sample_aspect_ratio");
> +if (!frame_sample_aspect->num)
> +*frame_sample_aspect = ist->st->sample_aspect_ratio;
>  for (i = 0; i < ist->nb_filters; i++) {
> -if (!frame_sample_aspect->num)
> -*frame_sample_aspect = ist->st->sample_aspect_ratio;
> -
>  if (i < ist->nb_filters - 1) {
>  f = ist->filter_frame;
>  err = av_frame_ref(f, decoded_frame);

ping

-- 
Clément B.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] lavf/os_support: Add safe win32 dlopen/dlclose/dlsym functions.

2016-10-29 Thread Moritz Barsnick
On Sat, Oct 29, 2016 at 18:35:19 +1100, Matt Oliver wrote:

> +#endif /* COMPAT_W32DLFCN_H */
> \ No newline at end of file

This shouldn't happen.

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


Re: [FFmpeg-devel] [PATCH] lavfi/pan: allow negative gain parameters also for other inputs than the first named

2016-10-29 Thread Nicolas George
Le septidi 7 brumaire, an CCXXV, Moritz Barsnick a écrit :
> Expands the parser to also accept the separator '-' in addition to
> '+', and take the negative sign into consideration.
> 
> The optional sign for the first factor in the expression is already
> covered by parsing for an integer.
> 
> Signed-off-by: Moritz Barsnick 
> ---
>  doc/filters.texi |  2 +-
>  libavfilter/af_pan.c | 10 +++---
>  2 files changed, 8 insertions(+), 4 deletions(-)

Still LGTM, of course, thanks.

Regards,

-- 
  Nicolas George


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] lavf/os_support: Add safe win32 dlopen/dlclose/dlsym functions.

2016-10-29 Thread Matt Oliver
On 29 October 2016 at 23:54, Moritz Barsnick  wrote:

> On Sat, Oct 29, 2016 at 18:35:19 +1100, Matt Oliver wrote:
>
> > +#endif /* COMPAT_W32DLFCN_H */
> > \ No newline at end of file
>
> This shouldn't happen.


thanks, Ive fixed that locally
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] doc: fix spelling errors

2016-10-29 Thread Andreas Cadhalpun
Signed-off-by: Andreas Cadhalpun 
---
 doc/filters.texi | 2 +-
 doc/formats.texi | 2 +-
 libavcodec/4xm.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/filters.texi b/doc/filters.texi
index c37fa29..1ebf251 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -9665,7 +9665,7 @@ Scene change detection method. Scene change leads motion 
vectors to be in random
 @item none
 Disable scene change detection.
 @item fdiff
-Frame difference. Corresponding pixel values are compared and if it statisfies 
@var{scd_threshold} scene change is detected.
+Frame difference. Corresponding pixel values are compared and if it satisfies 
@var{scd_threshold} scene change is detected.
 @end table
 Default method is @samp{fdiff}.
 
diff --git a/doc/formats.texi b/doc/formats.texi
index 5ef7fad..87704af 100644
--- a/doc/formats.texi
+++ b/doc/formats.texi
@@ -63,7 +63,7 @@ This ensures that file and data checksums are reproducible 
and match between
 platforms. Its primary use is for regression testing.
 @item shortest
 Stop muxing at the end of the shortest stream.
-It may be needed to increase max_interleave_delta to avoid flusing the longer
+It may be needed to increase max_interleave_delta to avoid flushing the longer
 streams before EOF.
 @end table
 
diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
index a7a757a..5547dfd 100644
--- a/libavcodec/4xm.c
+++ b/libavcodec/4xm.c
@@ -532,7 +532,7 @@ static int decode_i_block(FourXContext *f, int16_t *block)
 }
 i+= code >> 4;
 if (i >= 64) {
-av_log(f->avctx, AV_LOG_ERROR, "run %d oveflow\n", i);
+av_log(f->avctx, AV_LOG_ERROR, "run %d overflow\n", i);
 return 0;
 }
 
-- 
2.10.1
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] lavf/os_support: Add safe win32 dlopen/dlclose/dlsym functions.

2016-10-29 Thread Michael Niedermayer
On Sat, Oct 29, 2016 at 06:35:19PM +1100, Matt Oliver wrote:
> >
> > FYI, last time i tried to include this file from libavcodec i was told
> >> not to since it's libavformat specific.
> >>
> >> The proper place for these wrappers is probably the compat folder, in
> >> a new file similar to w32threads.h
> >>
> >
> OK finally updated the patch. it now adds the safe dll function into a new
> file "compat/w32dlfcn.h" and each source file that needs this header has
> been updated accordingly. Otherwise the code is the same as the last
> version that was tested by Michael.
> 
> If there are no other outstanding objections then let me know so i can push
> this.

>  w32dlfcn.h |   83 
> +
>  1 file changed, 83 insertions(+)
> 421c4543291a80c2e52c7e029da921ffcf071f34  
> 0001-compat-w32dlfcn.h-Add-safe-win32-dlopen-dlclose-dlsy.patch
> From 37327de38eb366421ff66246e18cd93b0eb7026a Mon Sep 17 00:00:00 2001
> From: Matt Oliver 
> Date: Sat, 29 Oct 2016 18:28:27 +1100
> Subject: [PATCH] compat/w32dlfcn.h: Add safe win32 dlopen/dlclose/dlsym
>  functions.
> 
> ---
>  compat/w32dlfcn.h | 83 
> +++
>  1 file changed, 83 insertions(+)
>  create mode 100644 compat/w32dlfcn.h
> 
> diff --git a/compat/w32dlfcn.h b/compat/w32dlfcn.h
> new file mode 100644
> index 000..23db85d
> --- /dev/null
> +++ b/compat/w32dlfcn.h
> @@ -0,0 +1,83 @@
> +/*
> + * This file is part of FFmpeg.
> + *
> + * FFmpeg is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2.1 of the License, or (at your option) any later version.
> + *
> + * FFmpeg is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with FFmpeg; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
> USA
> + */
> +
> +#ifndef COMPAT_W32DLFCN_H
> +#define COMPAT_W32DLFCN_H
> +
> +#ifdef _WIN32
> +#include 
> +#if _WIN32_WINNT < 0x0602
> +#include "libavutil/wchar_filename.h"
> +#endif
> +/**
> + * Safe function used to open dynamic libs. This attempts to improve program 
> security
> + * by removing the current directory from the dll search path. Only dll's 
> found in the
> + * executable or system directory are allowed to be loaded.
> + * @param name  The dynamic lib name.
> + * @return A handle to the opened lib.
> + */
> +static inline HMODULE win32_dlopen(const char *name)
> +{
> +#if _WIN32_WINNT < 0x0602
> +// Need to check if KB2533623 is available
> +if (!GetProcAddress(GetModuleHandleW(L"kernel32.dll"), 
> "SetDefaultDllDirectories")) {
> +HMODULE module = NULL;
> +wchar_t *path = NULL, *name_w = NULL;
> +DWORD pathlen;
> +if (utf8towchar(name, &name_w))
> +goto exit;
> +path = (wchar_t *)av_mallocz_array(MAX_PATH, sizeof(wchar_t));
> +// Try local directory first
> +pathlen = GetModuleFileNameW(NULL, path, MAX_PATH);
> +pathlen = wcsrchr(path, '\\') - path;
> +if (pathlen == 0 || pathlen + wcslen(name_w) + 2 > MAX_PATH)
> +goto exit;
> +path[pathlen] = '\\';
> +wcscpy(path + pathlen + 1, name_w);
> +module = LoadLibraryExW(path, NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
> +if (module == NULL) {
> +// Next try System32 directory
> +pathlen = GetSystemDirectoryW(path, MAX_PATH);
> +if (pathlen == 0 || pathlen + wcslen(name_w) + 2 > MAX_PATH)
> +goto exit;
> +path[pathlen] = '\\';
> +wcscpy(path + pathlen + 1, name_w);
> +module = LoadLibraryExW(path, NULL, 
> LOAD_WITH_ALTERED_SEARCH_PATH);
> +}
> +exit:
> +av_free(path);
> +av_free(name_w);
> +return module;
> +}
> +#endif
> +#ifndef LOAD_LIBRARY_SEARCH_APPLICATION_DIR
> +#   define LOAD_LIBRARY_SEARCH_APPLICATION_DIR 0x0200
> +#endif
> +#ifndef LOAD_LIBRARY_SEARCH_SYSTEM32
> +#   define LOAD_LIBRARY_SEARCH_SYSTEM320x0800
> +#endif
> +return LoadLibraryExA(name, NULL, LOAD_LIBRARY_SEARCH_APPLICATION_DIR | 
> LOAD_LIBRARY_SEARCH_SYSTEM32);
> +}
> +#define dlopen(name, flags) win32_dlopen(name)
> +#define dlclose FreeLibrary
> +#define dlsym GetProcAddress
> +#else
> +#include 
> +#endif
> +
> +#endif /* COMPAT_W32DLFCN_H */
> \ No newline at end of file
> -- 
> 2.10.1.windows.1
> 

>  hwcontext_dxva2.c |   15 ---
>  1 file changed, 8 insertions(+), 7 deletions(-)
> c3b4294a0e4734cfa780064ab66919f430e596bc  
> 0002-avutil-hwcontext_dxva.c-Use-new

Re: [FFmpeg-devel] [PATCH] avfilter/avf_showcqt: add bar_t option

2016-10-29 Thread Muhammad Faiz
On 10/28/16, Muhammad Faiz  wrote:
> custom bargraph transparency
>
> Signed-off-by: Muhammad Faiz 
> ---
>  doc/filters.texi  |  4 
>  libavfilter/avf_showcqt.c | 14 +-
>  libavfilter/avf_showcqt.h |  3 ++-
>  3 files changed, 15 insertions(+), 6 deletions(-)
>
> diff --git a/doc/filters.texi b/doc/filters.texi
> index c37fa29..fb04a56 100644
> --- a/doc/filters.texi
> +++ b/doc/filters.texi
> @@ -16835,6 +16835,10 @@ Acceptable range is @code{[1, 7]}.
>  Specify the bargraph gamma. Default value is @code{1}. Acceptable range is
>  @code{[1, 7]}.
>
> +@item bar_t
> +Specify the bargraph transparency level. Lower value makes the bargraph
> sharper.
> +Default value is @code{1}. Acceptable range is @code{[0, 1]}.
> +
>  @item timeclamp, tc
>  Specify the transform timeclamp. At low frequency, there is trade-off
> between
>  accuracy in time domain and frequency domain. If timeclamp is lower,
> diff --git a/libavfilter/avf_showcqt.c b/libavfilter/avf_showcqt.c
> index 49b950c..a25176d 100644
> --- a/libavfilter/avf_showcqt.c
> +++ b/libavfilter/avf_showcqt.c
> @@ -75,6 +75,7 @@ static const AVOption showcqt_options[] = {
>  { "gamma","set sonogram gamma", OFFSET(sono_g),
> AV_OPT_TYPE_FLOAT, { .dbl = 3.0 },1.0, 7.0,  FLAGS },
>  { "bar_g","set bargraph gamma", OFFSET(bar_g),
> AV_OPT_TYPE_FLOAT, { .dbl = 1.0 },1.0, 7.0,  FLAGS },
>  { "gamma2",   "set bargraph gamma", OFFSET(bar_g),
> AV_OPT_TYPE_FLOAT, { .dbl = 1.0 },1.0, 7.0,  FLAGS },
> +{ "bar_t",  "set bar transparency", OFFSET(bar_t),
> AV_OPT_TYPE_FLOAT, { .dbl = 1.0 },0.0, 1.0,  FLAGS },
>  { "timeclamp", "set timeclamp", OFFSET(timeclamp),
> AV_OPT_TYPE_DOUBLE, { .dbl = 0.17 },   0.1, 1.0,  FLAGS },
>  { "tc","set timeclamp", OFFSET(timeclamp),
> AV_OPT_TYPE_DOUBLE, { .dbl = 0.17 },   0.1, 1.0,  FLAGS },
>  { "basefreq", "set base frequency", OFFSET(basefreq),
> AV_OPT_TYPE_DOUBLE, { .dbl = BASEFREQ },  10.0, 10.0, FLAGS },
> @@ -752,10 +753,10 @@ static void yuv_from_cqt(ColorFloat *c, const
> FFTComplex *v, float gamma, int le
>  }
>
>  static void draw_bar_rgb(AVFrame *out, const float *h, const float *rcp_h,
> - const ColorFloat *c, int bar_h)
> + const ColorFloat *c, int bar_h, float bar_t)
>  {
>  int x, y, w = out->width;
> -float mul, ht, rcp_bar_h = 1.0f / bar_h;
> +float mul, ht, rcp_bar_h = 1.0f / bar_h, rcp_bar_t = 1.0f / bar_t;
>  uint8_t *v = out->data[0], *lp;
>  int ls = out->linesize[0];
>
> @@ -769,6 +770,7 @@ static void draw_bar_rgb(AVFrame *out, const float *h,
> const float *rcp_h,
>  *lp++ = 0;
>  } else {
>  mul = (h[x] - ht) * rcp_h[x];
> +mul = (mul < bar_t) ? (mul * rcp_bar_t) : 1.0f;
>  *lp++ = lrintf(mul * c[x].rgb.r);
>  *lp++ = lrintf(mul * c[x].rgb.g);
>  *lp++ = lrintf(mul * c[x].rgb.b);
> @@ -785,6 +787,7 @@ do { \
>  *lpv++ = 128; \
>  } else { \
>  mul = (h[x] - ht) * rcp_h[x]; \
> +mul = (mul < bar_t) ? (mul * rcp_bar_t) : 1.0f; \
>  *lpy++ = lrintf(mul * c[x].yuv.y + 16.0f); \
>  *lpu++ = lrintf(mul * c[x].yuv.u + 128.0f); \
>  *lpv++ = lrintf(mul * c[x].yuv.v + 128.0f); \
> @@ -797,15 +800,16 @@ do { \
>  *lpy++ = 16; \
>  } else { \
>  mul = (h[x] - ht) * rcp_h[x]; \
> +mul = (mul < bar_t) ? (mul * rcp_bar_t) : 1.0f; \
>  *lpy++ = lrintf(mul * c[x].yuv.y + 16.0f); \
>  } \
>  } while (0)
>
>  static void draw_bar_yuv(AVFrame *out, const float *h, const float *rcp_h,
> - const ColorFloat *c, int bar_h)
> + const ColorFloat *c, int bar_h, float bar_t)
>  {
>  int x, y, yh, w = out->width;
> -float mul, ht, rcp_bar_h = 1.0f / bar_h;
> +float mul, ht, rcp_bar_h = 1.0f / bar_h, rcp_bar_t = 1.0f / bar_t;
>  uint8_t *vy = out->data[0], *vu = out->data[1], *vv = out->data[2];
>  uint8_t *lpy, *lpu, *lpv;
>  int lsy = out->linesize[0], lsu = out->linesize[1], lsv =
> out->linesize[2];
> @@ -1160,7 +1164,7 @@ static int plot_cqt(AVFilterContext *ctx, AVFrame
> **frameout)
>  UPDATE_TIME(s->alloc_time);
>
>  if (s->bar_h) {
> -s->draw_bar(out, s->h_buf, s->rcp_h_buf, s->c_buf, s->bar_h);
> +s->draw_bar(out, s->h_buf, s->rcp_h_buf, s->c_buf, s->bar_h,
> s->bar_t);
>  UPDATE_TIME(s->bar_time);
>  }
>
> diff --git a/libavfilter/avf_showcqt.h b/libavfilter/avf_showcqt.h
> index 165d36e..3fa36f8 100644
> --- a/libavfilter/avf_showcqt.h
> +++ b/libavfilter/avf_showcqt.h
> @@ -78,7 +78,7 @@ typedef struct {
>  int len, int fft_len);
>  void(*permute_coeffs)(float *v, int len);
>  void(*draw_b

Re: [FFmpeg-devel] [PATCH 1/2] ffmpeg: move some unrelated code out of a filter loop

2016-10-29 Thread Andreas Cadhalpun
On 29.10.2016 12:03, Clément Bœsch wrote:
> On Mon, Oct 24, 2016 at 11:05:06PM +0200, Clément Bœsch wrote:
>> ---
>> Not sure if the chunk is even needed

I'm not sure either.

>> ---
>>  ffmpeg.c | 5 ++---
>>  1 file changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/ffmpeg.c b/ffmpeg.c
>> index 3b91710..e8088c0 100644
>> --- a/ffmpeg.c
>> +++ b/ffmpeg.c
>> @@ -2317,10 +2317,9 @@ static int decode_video(InputStream *ist, AVPacket 
>> *pkt, int *got_output, int eo
>>  }
>>  
>>  frame_sample_aspect= av_opt_ptr(avcodec_get_frame_class(), 
>> decoded_frame, "sample_aspect_ratio");
>> +if (!frame_sample_aspect->num)
>> +*frame_sample_aspect = ist->st->sample_aspect_ratio;
>>  for (i = 0; i < ist->nb_filters; i++) {

This is only entered for 'ist->nb_filters > 0', so to preserve the current 
behavior,
you'd need to add a check for that.

>> -if (!frame_sample_aspect->num)
>> -*frame_sample_aspect = ist->st->sample_aspect_ratio;
>> -
>>  if (i < ist->nb_filters - 1) {
>>  f = ist->filter_frame;
>>  err = av_frame_ref(f, decoded_frame);

Otherwise this is probably OK.

Best regards,
Andreas 

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


Re: [FFmpeg-devel] [PATCH] Remove the ffserver program and the ffm muxer/demuxer

2016-10-29 Thread Andreas Cadhalpun
On 28.10.2016 19:31, compn wrote:
> On Thu, 27 Oct 2016 15:42:22 -0300 James Almer wrote:
>> On 10/27/2016 3:36 PM, Reynaldo H. Verdejo Pinochet wrote:
>>> On 10/27/2016 11:25 AM, James Almer wrote:
 This is not how things were agreed.
>>> I haven't agreed to this.
>> You could have shown your displeasure in the relevant discussion and
>> patch threads, and on IRC. Why didn't you?
>>
>> A quick search on the archive shows
>> https://ffmpeg.org/pipermail/ffmpeg-devel/2016-April/192808.html
>> https://ffmpeg.org/pipermail/ffmpeg-devel/2016-July/196500.html
> 
> but then there was this in september, after the news entry was posted
> 
> http://ffmpeg.org/pipermail/ffmpeg-devel/2016-September/199686.html
> 
> i'd suggest talking to that person before applying said patch.
> 
> we can talk before applying a patch still, right? :)

What's the current status of this "Resurrection of ffserver"?
Is there a work-in-progress git repository available somewhere?

Best regards,
Andreas



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


Re: [FFmpeg-devel] [PATCH] Remove the ffserver program and the ffm muxer/demuxer

2016-10-29 Thread Andreas Cadhalpun
Hi Reynaldo,

On 28.10.2016 20:41, Reynaldo H. Verdejo Pinochet wrote:
> I'm already working on what I think it's a proper transition in
> line with the idea presented on my first reply to this thread.
> 
> My impression from today's discussion on IRC is that James
> and Rostislav are willing to give this process some time but
> nothing past next release.

I appreciate that you care about ffserver.
However, ffserver still uses symbols that were declared private
in 2011/2012, so there has been ample time to fix ffserver.
I'd really like libavformat not exporting them anymore as soon
as possible, i.e. at the next major bump.
I don't really mind keeping ffserver until then, as we have
to keep backwards-compatibility anyway, but if it still uses
private symbols when the next major bump happens, it will have
to go.

Best regards,
Andreas
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 4/4] qsv: Merge libav implementation

2016-10-29 Thread Mark Thompson
Merged as-at libav 398f015, and therefore includes outstanding
skipped merges 04b17ff and 130e1f1.

All features not in libav are preserved, and no options change.
---
v4 (patch 4/4 only, the others are unchanged).

Changes from v3:
- Revert to using the software decoder plugin by default for H.265; apparently 
the hardware decoder plugin segfaults if you load on unsupported hardware, so 
make the user request it explicitly.
- Never pass FF_UNKNOWN_LEVEL to libmfx (MFX_LEVEL_UNKNOWN has a different 
value).
- Minor cosmetics to make merging easier.


 libavcodec/qsv.c  | 333 ---
 libavcodec/qsv_internal.h |  40 ++--
 libavcodec/qsvdec.c   | 568 +++---
 libavcodec/qsvdec.h   |  30 +--
 libavcodec/qsvdec_h2645.c |  29 ++-
 libavcodec/qsvdec_mpeg2.c |  85 ++-
 libavcodec/qsvdec_vc1.c   |  89 +++-
 libavcodec/qsvenc.c   | 160 +++--
 libavcodec/qsvenc.h   |   6 +-
 libavcodec/qsvenc_h264.c  |   3 +-
 10 files changed, 746 insertions(+), 597 deletions(-)

diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c
index 11d453d..efd7cea 100644
--- a/libavcodec/qsv.c
+++ b/libavcodec/qsv.c
@@ -25,7 +25,10 @@
 #include 

 #include "libavutil/avstring.h"
+#include "libavutil/common.h"
 #include "libavutil/error.h"
+#include "libavutil/hwcontext.h"
+#include "libavutil/hwcontext_qsv.h"

 #include "avcodec.h"
 #include "qsv_internal.h"
@@ -51,6 +54,22 @@ int ff_qsv_codec_id_to_mfx(enum AVCodecID codec_id)
 return AVERROR(ENOSYS);
 }

+int ff_qsv_profile_to_mfx(enum AVCodecID codec_id, int profile)
+{
+if (profile == FF_PROFILE_UNKNOWN)
+return MFX_PROFILE_UNKNOWN;
+switch (codec_id) {
+case AV_CODEC_ID_H264:
+case AV_CODEC_ID_HEVC:
+return profile;
+case AV_CODEC_ID_VC1:
+return 4 * profile + 1;
+case AV_CODEC_ID_MPEG2VIDEO:
+return 0x10 * profile;
+}
+return MFX_PROFILE_UNKNOWN;
+}
+
 int ff_qsv_error(int mfx_err)
 {
 switch (mfx_err) {
@@ -85,90 +104,58 @@ int ff_qsv_error(int mfx_err)
 return AVERROR_UNKNOWN;
 }
 }
-static int ff_qsv_set_display_handle(AVCodecContext *avctx, QSVSession *qs)
+
+static int qsv_load_plugins(mfxSession session, const char *load_plugins,
+void *logctx)
 {
-// this code is only required for Linux.  It searches for a valid
-// display handle.  First in /dev/dri/renderD then in /dev/dri/card
-#ifdef AVCODEC_QSV_LINUX_SESSION_HANDLE
-// VAAPI display handle
-int ret = 0;
-VADisplay va_dpy = NULL;
-VAStatus va_res = VA_STATUS_SUCCESS;
-int major_version = 0, minor_version = 0;
-int fd = -1;
-char adapterpath[256];
-int adapter_num;
-
-qs->fd_display = -1;
-qs->va_display = NULL;
-
-//search for valid graphics device
-for (adapter_num = 0;adapter_num < 6;adapter_num++) {
-
-if (adapter_num<3) {
-snprintf(adapterpath,sizeof(adapterpath),
-"/dev/dri/renderD%d", adapter_num+128);
-} else {
-snprintf(adapterpath,sizeof(adapterpath),
-"/dev/dri/card%d", adapter_num-3);
-}
+if (!load_plugins || !*load_plugins)
+return 0;

-fd = open(adapterpath, O_RDWR);
-if (fd < 0) {
-av_log(avctx, AV_LOG_ERROR,
-"mfx init: %s fd open failed\n", adapterpath);
-continue;
-}
+while (*load_plugins) {
+mfxPluginUID uid;
+mfxStatus ret;
+int i, err = 0;

-va_dpy = vaGetDisplayDRM(fd);
-if (!va_dpy) {
-av_log(avctx, AV_LOG_ERROR,
-"mfx init: %s vaGetDisplayDRM failed\n", adapterpath);
-close(fd);
-continue;
+char *plugin = av_get_token(&load_plugins, ":");
+if (!plugin)
+return AVERROR(ENOMEM);
+if (strlen(plugin) != 2 * sizeof(uid.Data)) {
+av_log(logctx, AV_LOG_ERROR, "Invalid plugin UID length\n");
+err = AVERROR(EINVAL);
+goto load_plugin_fail;
 }

-va_res = vaInitialize(va_dpy, &major_version, &minor_version);
-if (VA_STATUS_SUCCESS != va_res) {
-av_log(avctx, AV_LOG_ERROR,
-"mfx init: %s vaInitialize failed\n", adapterpath);
-close(fd);
-fd = -1;
-continue;
-} else {
-av_log(avctx, AV_LOG_VERBOSE,
-"mfx initialization: %s vaInitialize successful\n",adapterpath);
-qs->fd_display = fd;
-qs->va_display = va_dpy;
-ret = MFXVideoCORE_SetHandle(qs->session,
-  (mfxHandleType)MFX_HANDLE_VA_DISPLAY, (mfxHDL)va_dpy);
-if (ret < 0) {
-av_log(avctx, AV_LOG_ERROR,
-"Error %d during set display handle\n", ret);
-return ff_qsv_error(ret);
+for (i = 0; i < sizeof(uid.Data); i++) {
+err = sscanf(plugin + 2 

Re: [FFmpeg-devel] [PATCH] lavf/os_support: Add safe win32 dlopen/dlclose/dlsym functions.

2016-10-29 Thread Stephen Hutchinson

On 10/29/2016 11:22 AM, Michael Niedermayer wrote:

On Sat, Oct 29, 2016 at 06:35:19PM +1100, Matt Oliver wrote:

 configure  |5 +
 libavformat/avisynth.c |   14 +-
 2 files changed, 6 insertions(+), 13 deletions(-)
b1568f39504e5e14c924d27c8f11ba8f5816d68c  
0003-avformat-avisynth.c-Use-new-safe-dlopen-code.patch
From 633212cf1246b3fde61dd6515229e6a893005664 Mon Sep 17 00:00:00 2001
From: Matt Oliver 
Date: Sat, 29 Oct 2016 18:25:25 +1100
Subject: [PATCH 3/4] avformat/avisynth.c: Use new safe dlopen code.


breaks --enable-avisynth on linux/ubuntu

--- config.h2016-10-29 17:17:55.214014842 +0200
+++ delth/config.h  2016-10-29 17:15:41.906012034 +0200
@@ -1155,7 +1155,7 @@
 #define CONFIG_AST_DEMUXER 1
 #define CONFIG_AU_DEMUXER 1
 #define CONFIG_AVI_DEMUXER 1
-#define CONFIG_AVISYNTH_DEMUXER 1
+#define CONFIG_AVISYNTH_DEMUXER 0
 #define CONFIG_AVR_DEMUXER 1
 #define CONFIG_AVS_DEMUXER 1
 #define CONFIG_BETHSOFTVID_DEMUXER 1

[...]



Yeah, libdl needs to be linked to on non-Windows, and the
check for it got removed with the rest of the 'enabled avisynth'
case in configure. Just putting dlopen under avisynth_demuxer_deps 
doesn't seem to be sufficient for that to work.

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


Re: [FFmpeg-devel] [PATCHv2 2/3] lavfi/loudnorm: add an internal libebur128 library

2016-10-29 Thread Marton Balint


On Sun, 23 Oct 2016, Marton Balint wrote:


Also contains the following changes to the library:
- add ff_ prefix to functions
- remove cplusplus defines.
- add FF_ prefix to contants and some structs
- remove true peak calculation feature, since it uses its own resampler, and
 af_audnorm does not need it.
- remove version info and some fprintf(stderr) functions
- convert to use av_malloc
- always use histogram mode for LRA calculation, otherwise LRA data is slowly
 consuming memory making af_loudnorm unfit for 24/7 operation. It also uses a
 BSD style linked list implementation which is probably not available on all
 platforms. So let's just remove the classic mode which not uses histogram.
- add ff_thread_once for calculating static histogram tables
- convert some functions to void which cannot fail
- remove intrinsics and some unused headers
- add support for planar audio
- remove channel / sample rate changer function, in ffmpeg usually we simply
 alloc a new context
- convert some static variables to defines
- declare static histogram variables as aligned
- convert some initalizations to mallocz
- add window size parameter to init function and remove window size setter
 function
- fix indentation

Signed-off-by: Marton Balint 
---
configure |   5 -
doc/filters.texi  |   3 -
libavfilter/Makefile  |   2 +-
libavfilter/af_loudnorm.c |  60 ++--
libavfilter/ebur128.c | 782 ++
libavfilter/ebur128.h | 313 +++
6 files changed, 1126 insertions(+), 39 deletions(-)
create mode 100644 libavfilter/ebur128.c
create mode 100644 libavfilter/ebur128.h



I will apply this patch soon.

Regards,
Marton
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH v2] ffmpeg: parameters for filter thread counts

2016-10-29 Thread DeHackEd
Enables specifying how many threads are available to each filtergraph.
---

Changes:
- Reworded documentation
- Removed hunk from ffmpeg_filter.c not directly applicable to patch

 doc/ffmpeg.texi | 10 ++
 ffmpeg.h|  3 +++
 ffmpeg_filter.c |  7 +++
 ffmpeg_opt.c|  4 
 4 files changed, 24 insertions(+)

diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi
index 47c8935..c9199cc 100644
--- a/doc/ffmpeg.texi
+++ b/doc/ffmpeg.texi
@@ -415,6 +415,11 @@ This option is similar to @option{-filter}, the only 
difference is that its
 argument is the name of the file from which a filtergraph description is to be
 read.
 
+@item -filter_threads @var{nb_thraeds} (@emph{global})
+Defines how many threads are used to process a filter pipeline. Each pipeline
+will produce a thread pool with this many threads available for parallel 
processing.
+The default is the number of available CPUs.
+
 @item -pre[:@var{stream_specifier}] @var{preset_name} 
(@emph{output,per-stream})
 Specify the preset for matching stream(s).
 
@@ -1201,6 +1206,11 @@ To generate 5 seconds of pure red video using lavfi 
@code{color} source:
 ffmpeg -filter_complex 'color=c=red' -t 5 out.mkv
 @end example
 
+@item -filter_complex_threads @var{nb_threads} (@emph{global})
+Defines how many threads are used to process a filter_compltex graph.
+Similar to filter_threads but used for @code{-filter_complex} graphs only.
+The default is the number of available CPUs.
+
 @item -lavfi @var{filtergraph} (@emph{global})
 Define a complex filtergraph, i.e. one with arbitrary number of inputs and/or
 outputs. Equivalent to @option{-filter_complex}.
diff --git a/ffmpeg.h b/ffmpeg.h
index e1d4593..9a4389f 100644
--- a/ffmpeg.h
+++ b/ffmpeg.h
@@ -569,6 +569,9 @@ extern AVIOContext *progress_avio;
 extern float max_error_rate;
 extern char *videotoolbox_pixfmt;
 
+extern int filter_nbthreads;
+extern int filter_complex_nbthreads;
+
 extern const AVIOInterruptCB int_cb;
 
 extern const OptionDef options[];
diff --git a/ffmpeg_filter.c b/ffmpeg_filter.c
index 27aeca0..95b9c43 100644
--- a/ffmpeg_filter.c
+++ b/ffmpeg_filter.c
@@ -39,6 +39,9 @@
 #include "libavutil/imgutils.h"
 #include "libavutil/samplefmt.h"
 
+int filter_nbthreads = -1;
+int filter_complex_nbthreads = -1;
+
 static const enum AVPixelFormat *get_compliance_unofficial_pix_fmts(enum 
AVCodecID codec_id, const enum AVPixelFormat default_formats[])
 {
 static const enum AVPixelFormat mjpeg_formats[] =
@@ -992,6 +995,8 @@ int configure_filtergraph(FilterGraph *fg)
 char args[512];
 AVDictionaryEntry *e = NULL;
 
+fg->graph->nb_threads = filter_complex_nbthreads;
+
 args[0] = 0;
 while ((e = av_dict_get(ost->sws_dict, "", e,
 AV_DICT_IGNORE_SUFFIX))) {
@@ -1022,6 +1027,8 @@ int configure_filtergraph(FilterGraph *fg)
 e = av_dict_get(ost->encoder_opts, "threads", NULL, 0);
 if (e)
 av_opt_set(fg->graph, "threads", e->value, 0);
+} else {
+fg->graph->nb_threads = filter_nbthreads;
 }
 
 if ((ret = avfilter_graph_parse2(fg->graph, graph_desc, &inputs, 
&outputs)) < 0)
diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
index 4d25fff..dc94380 100644
--- a/ffmpeg_opt.c
+++ b/ffmpeg_opt.c
@@ -3365,12 +3365,16 @@ const OptionDef options[] = {
 "set profile", "profile" },
 { "filter", HAS_ARG | OPT_STRING | OPT_SPEC | OPT_OUTPUT, { .off = 
OFFSET(filters) },
 "set stream filtergraph", "filter_graph" },
+{ "filter_threads",  HAS_ARG | OPT_INT,  { 
&filter_nbthreads },
+"number of non-complex filter threads" },
 { "filter_script",  HAS_ARG | OPT_STRING | OPT_SPEC | OPT_OUTPUT, { .off = 
OFFSET(filter_scripts) },
 "read stream filtergraph description from a file", "filename" },
 { "reinit_filter",  HAS_ARG | OPT_INT | OPT_SPEC | OPT_INPUT,{ .off = 
OFFSET(reinit_filters) },
 "reinit filtergraph on input parameter changes", "" },
 { "filter_complex", HAS_ARG | OPT_EXPERT,{ 
.func_arg = opt_filter_complex },
 "create a complex filtergraph", "graph_description" },
+{ "filter_complex_threads", HAS_ARG | OPT_INT,   { 
&filter_complex_nbthreads },
+"number of threads for -filter_complex" },
 { "lavfi",  HAS_ARG | OPT_EXPERT,{ 
.func_arg = opt_filter_complex },
 "create a complex filtergraph", "graph_description" },
 { "filter_complex_script", HAS_ARG | OPT_EXPERT, { 
.func_arg = opt_filter_complex_script },
-- 
1.8.4.1

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


Re: [FFmpeg-devel] [PATCH] doc: fix spelling errors

2016-10-29 Thread Lou Logan
On Sat, Oct 29, 2016, at 06:57 AM, Andreas Cadhalpun wrote:
> Signed-off-by: Andreas Cadhalpun 
> ---
>  doc/filters.texi | 2 +-
>  doc/formats.texi | 2 +-
>  libavcodec/4xm.c | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)

LGTM, thanks. Feel free to push trivial typo patches without sending
them to the mailing list (unless of course you prefer a review or feel
more comfortable doing so).
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] doc: fix spelling errors

2016-10-29 Thread Andreas Cadhalpun
On 29.10.2016 20:12, Lou Logan wrote:
> On Sat, Oct 29, 2016, at 06:57 AM, Andreas Cadhalpun wrote:
>> Signed-off-by: Andreas Cadhalpun 
>> ---
>>  doc/filters.texi | 2 +-
>>  doc/formats.texi | 2 +-
>>  libavcodec/4xm.c | 2 +-
>>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> LGTM, thanks.

Pushed.

> Feel free to push trivial typo patches without sending
> them to the mailing list (unless of course you prefer a review or feel
> more comfortable doing so).

OK, I might do that next time.

Best regards,
Andreas

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


Re: [FFmpeg-devel] [PATCH v2] ffmpeg: parameters for filter thread counts

2016-10-29 Thread Moritz Barsnick
On Thu, Oct 27, 2016 at 10:45:10 -0400, DeHackEd wrote:
> +@item -filter_threads @var{nb_thraeds} (@emph{global})
 ^ threads

> +Defines how many threads are used to process a filter_compltex graph.
 ^ complex

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


Re: [FFmpeg-devel] [PATCHv2 2/3] lavfi/loudnorm: add an internal libebur128 library

2016-10-29 Thread Paul B Mahol
On 10/29/16, Marton Balint  wrote:
>
> On Sun, 23 Oct 2016, Marton Balint wrote:
>
>> Also contains the following changes to the library:
>> - add ff_ prefix to functions
>> - remove cplusplus defines.
>> - add FF_ prefix to contants and some structs
>> - remove true peak calculation feature, since it uses its own resampler,
>> and
>>  af_audnorm does not need it.

af_loudnorm

>> - remove version info and some fprintf(stderr) functions
>> - convert to use av_malloc
>> - always use histogram mode for LRA calculation, otherwise LRA data is
>> slowly
>>  consuming memory making af_loudnorm unfit for 24/7 operation. It also
>> uses a
>>  BSD style linked list implementation which is probably not available on
>> all
>>  platforms. So let's just remove the classic mode which not uses
>> histogram.
>> - add ff_thread_once for calculating static histogram tables
>> - convert some functions to void which cannot fail
>> - remove intrinsics and some unused headers
>> - add support for planar audio
>> - remove channel / sample rate changer function, in ffmpeg usually we
>> simply
>>  alloc a new context
>> - convert some static variables to defines
>> - declare static histogram variables as aligned
>> - convert some initalizations to mallocz
>> - add window size parameter to init function and remove window size setter
>>  function
>> - fix indentation
>>
>> Signed-off-by: Marton Balint 
>> ---
>> configure |   5 -
>> doc/filters.texi  |   3 -
>> libavfilter/Makefile  |   2 +-
>> libavfilter/af_loudnorm.c |  60 ++--
>> libavfilter/ebur128.c | 782
>> ++
>> libavfilter/ebur128.h | 313 +++
>> 6 files changed, 1126 insertions(+), 39 deletions(-)
>> create mode 100644 libavfilter/ebur128.c
>> create mode 100644 libavfilter/ebur128.h
>>
>
> I will apply this patch soon.
>
> Regards,
> Marton
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] qsvdec: Avoid probing with qsv decoders

2016-10-29 Thread Mark Thompson
Set the AV_CODEC_CAP_AVOID_PROBING flag on all of the qsv decoders.
---
To apply after the libav merge set.

The specific problem this fixes is attempting to use the H.265 decoder when the 
appropriate plugin isn't loaded, but it seems like a sensible change to make 
for all of the decoders.


 libavcodec/qsvdec_h2645.c | 4 ++--
 libavcodec/qsvdec_mpeg2.c | 2 +-
 libavcodec/qsvdec_vc1.c   | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavcodec/qsvdec_h2645.c b/libavcodec/qsvdec_h2645.c
index df86eea..94fbd07 100644
--- a/libavcodec/qsvdec_h2645.c
+++ b/libavcodec/qsvdec_h2645.c
@@ -266,7 +266,7 @@ AVCodec ff_hevc_qsv_decoder = {
 .decode = qsv_decode_frame,
 .flush  = qsv_decode_flush,
 .close  = qsv_decode_close,
-.capabilities   = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1,
+.capabilities   = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | 
AV_CODEC_CAP_AVOID_PROBING,
 .priv_class = &hevc_class,
 .pix_fmts   = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12,
 AV_PIX_FMT_QSV,
@@ -304,7 +304,7 @@ AVCodec ff_h264_qsv_decoder = {
 .decode = qsv_decode_frame,
 .flush  = qsv_decode_flush,
 .close  = qsv_decode_close,
-.capabilities   = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1,
+.capabilities   = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | 
AV_CODEC_CAP_AVOID_PROBING,
 .priv_class = &class,
 .pix_fmts   = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12,
 AV_PIX_FMT_QSV,
diff --git a/libavcodec/qsvdec_mpeg2.c b/libavcodec/qsvdec_mpeg2.c
index c080657..e558ca0 100644
--- a/libavcodec/qsvdec_mpeg2.c
+++ b/libavcodec/qsvdec_mpeg2.c
@@ -171,7 +171,7 @@ AVCodec ff_mpeg2_qsv_decoder = {
 .decode = qsv_decode_frame,
 .flush  = qsv_decode_flush,
 .close  = qsv_decode_close,
-.capabilities   = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1,
+.capabilities   = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | 
AV_CODEC_CAP_AVOID_PROBING,
 .priv_class = &class,
 .pix_fmts   = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12,
 AV_PIX_FMT_QSV,
diff --git a/libavcodec/qsvdec_vc1.c b/libavcodec/qsvdec_vc1.c
index f7b1fb0..70a47b1 100644
--- a/libavcodec/qsvdec_vc1.c
+++ b/libavcodec/qsvdec_vc1.c
@@ -168,7 +168,7 @@ AVCodec ff_vc1_qsv_decoder = {
 .decode = qsv_decode_frame,
 .flush  = qsv_decode_flush,
 .close  = qsv_decode_close,
-.capabilities   = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1,
+.capabilities   = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | 
AV_CODEC_CAP_AVOID_PROBING,
 .priv_class = &class,
 .pix_fmts   = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12,
 AV_PIX_FMT_QSV,
-- 
2.7.4

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


Re: [FFmpeg-devel] [PATCH] openssl: Allow newer TLS versions than TLSv1

2016-10-29 Thread Michael Niedermayer
On Sat, Oct 29, 2016 at 09:53:30AM +0100, Mark Thompson wrote:
> The use of TLSv1_*_method() disallows newer protocol versions; instead
> use SSLv23_*_method() and then explicitly disable the deprecated
> protocol versions which should not be supported.
> 
> Fixes ticket #5915.
> ---
> On 28/10/16 22:15, Hendrik Leppkes wrote:
> > I should have looked further when commenting on the other patch - I guess. 
> > :)
> > Looks good to me, the OpenSSL API seems to be rather confusing in this
> > regard. Maybe a comment might be  useful to indicate why this is done.
> 
> Hopefully this is clearer.
> 
> Thanks,
> 
> - Mark
> 
> 
>  libavformat/tls_openssl.c | 7 ++-
>  1 file changed, 6 insertions(+), 1 deletion(-)

should be ok

thx

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

The worst form of inequality is to try to make unequal things equal.
-- Aristotle


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] tests/fate/avformat: add segment.c tests

2016-10-29 Thread Rodger Combs
---
 tests/fate/avformat.mak   |  56 +++
 tests/ref/fate/segment-adts-to-mkv-header-000 |  21 
 tests/ref/fate/segment-adts-to-mkv-header-001 |  22 +
 tests/ref/fate/segment-adts-to-mkv-header-002 |   9 ++
 tests/ref/fate/segment-adts-to-mkv-header-all |  40 
 tests/ref/fate/segment-mp4-to-ts  | 132 ++
 6 files changed, 280 insertions(+)
 create mode 100644 tests/ref/fate/segment-adts-to-mkv-header-000
 create mode 100644 tests/ref/fate/segment-adts-to-mkv-header-001
 create mode 100644 tests/ref/fate/segment-adts-to-mkv-header-002
 create mode 100644 tests/ref/fate/segment-adts-to-mkv-header-all
 create mode 100644 tests/ref/fate/segment-mp4-to-ts

diff --git a/tests/fate/avformat.mak b/tests/fate/avformat.mak
index 3760e41..cdea970 100644
--- a/tests/fate/avformat.mak
+++ b/tests/fate/avformat.mak
@@ -80,3 +80,59 @@ $(FATE_LAVF_FATE): CMD = lavffatetest
 
 FATE_SAMPLES_FFMPEG += $(FATE_LAVF_FATE)
 fate-lavf-fate:$(FATE_LAVF_FATE)
+
+tests/data/mp4-to-ts.m3u8: TAG = GEN
+tests/data/mp4-to-ts.m3u8: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data
+   $(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \
+-i $(TARGET_SAMPLES)/h264/interlaced_crop.mp4 \
+-f ssegment -segment_time 1 -map 0 -flags +bitexact -codec copy \
+-segment_list $(TARGET_PATH)/$@ -y 
$(TARGET_PATH)/tests/data/mp4-to-ts-%03d.ts 2>/dev/null
+
+tests/data/adts-to-mkv.m3u8: TAG = GEN
+tests/data/adts-to-mkv.m3u8: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data
+   $(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \
+-i $(TARGET_SAMPLES)/audiomatch/tones_afconvert_16000_mono_aac_lc.adts 
\
+-f segment -segment_time 1 -map 0 -flags +bitexact -codec copy 
-segment_format_options live=1 \
+-segment_list $(TARGET_PATH)/$@ -y 
$(TARGET_PATH)/tests/data/adts-to-mkv-%03d.mkv 2>/dev/null
+
+tests/data/adts-to-mkv-header.mkv: TAG = GEN
+tests/data/adts-to-mkv-header.mkv: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data
+   $(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \
+-i $(TARGET_SAMPLES)/audiomatch/tones_afconvert_16000_mono_aac_lc.adts 
\
+-f segment -segment_time 1 -map 0 -flags +bitexact -codec copy 
-segment_format_options live=1 \
+-segment_header_filename 
$(TARGET_PATH)/tests/data/adts-to-mkv-header.mkv \
+-y $(TARGET_PATH)/tests/data/adts-to-mkv-header-%03d.mkv 2>/dev/null
+
+tests/data/adts-to-mkv-header-%.mkv: tests/data/adts-to-mkv-header.mkv ;
+
+FATE_SEGMENT_PARTS += 000 001 002
+
+tests/data/adts-to-mkv-cated-all.mkv: TAG = GEN
+tests/data/adts-to-mkv-cated-all.mkv: tests/data/adts-to-mkv-header.mkv 
$(FATE_SEGMENT_PARTS:%=tests/data/adts-to-mkv-header-%.mkv) | tests/data
+   $(M)cat $^ >$@
+
+tests/data/adts-to-mkv-cated-%.mkv: TAG = GEN
+tests/data/adts-to-mkv-cated-%.mkv: tests/data/adts-to-mkv-header.mkv 
tests/data/adts-to-mkv-header-%.mkv | tests/data
+   $(M)cat $^ >$@
+
+FATE_SEGMENT += fate-segment-mp4-to-ts
+fate-segment-mp4-to-ts: tests/data/mp4-to-ts.m3u8
+fate-segment-mp4-to-ts: CMD = framecrc -flags +bitexact -i 
$(TARGET_PATH)/tests/data/mp4-to-ts.m3u8 -c copy
+FATE_SEGMENT-$(call ALLYES, MOV_DEMUXER H264_MP4TOANNEXB_BSF MPEGTS_MUXER 
MATROSKA_DEMUXER SEGMENT_MUXER HLS_DEMUXER) += fate-segment-mp4-to-ts
+
+FATE_SEGMENT += fate-segment-adts-to-mkv
+fate-segment-adts-to-mkv: tests/data/adts-to-mkv.m3u8
+fate-segment-adts-to-mkv: CMD = framecrc -flags +bitexact -i 
$(TARGET_PATH)/tests/data/adts-to-mkv.m3u8 -c copy
+fate-segment-adts-to-mkv: REF = 
$(SRC_PATH)/tests/ref/fate/segment-adts-to-mkv-header-all
+FATE_SEGMENT-$(call ALLYES, AAC_DEMUXER AAC_ADTSTOASC_BSF MATROSKA_MUXER 
MATROSKA_DEMUXER SEGMENT_MUXER HLS_DEMUXER) += fate-segment-adts-to-mkv
+
+FATE_SEGMENT_ALLPARTS = $(FATE_SEGMENT_PARTS)
+FATE_SEGMENT_ALLPARTS += all
+FATE_SEGMENT_SPLIT += 
$(FATE_SEGMENT_ALLPARTS:%=fate-segment-adts-to-mkv-header-%)
+$(foreach N,$(FATE_SEGMENT_ALLPARTS),$(eval 
$(N:%=fate-segment-adts-to-mkv-header-%): 
tests/data/adts-to-mkv-cated-$(N).mkv))
+fate-segment-adts-to-mkv-header-%: CMD = framecrc -flags +bitexact -i 
$(TARGET_PATH)/tests/data/$(@:fate-segment-adts-to-mkv-header-%=adts-to-mkv-cated-%).mkv
 -c copy
+FATE_SEGMENT-$(call ALLYES, AAC_DEMUXER AAC_ADTSTOASC_BSF MATROSKA_MUXER 
MATROSKA_DEMUXER SEGMENT_MUXER HLS_DEMUXER) += $(FATE_SEGMENT_SPLIT)
+
+FATE_SAMPLES_FFMPEG += $(FATE_SEGMENT-yes)
+
+fate-segment: $(FATE_SEGMENT-yes)
diff --git a/tests/ref/fate/segment-adts-to-mkv-header-000 
b/tests/ref/fate/segment-adts-to-mkv-header-000
new file mode 100644
index 000..d00e886
--- /dev/null
+++ b/tests/ref/fate/segment-adts-to-mkv-header-000
@@ -0,0 +1,21 @@
+#extradata 0:2, 0x0030001c
+#tb 0: 1/1000
+#media_type 0: audio
+#codec_id 0: aac
+#sample_rate 0: 16000
+#channel_layout 0: 4
+0,  0,  0,   64,4, 0x02f70117
+0, 64, 64,   64,  163, 0xd5f85007
+0,128,128,   64,  127, 0x66484065
+0,192,192,   6

[FFmpeg-devel] [PATCH]lavfi/mergeplanes: Fix >8bit formats

2016-10-29 Thread Carl Eugen Hoyos

Hi!

Attached patch fixes the command line provided in ticket #5916.

Please comment, Carl EugenFrom 4cb6347dd80bac8ffe65ba65c819a947d25955f6 Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos 
Date: Sun, 30 Oct 2016 00:25:12 +0200
Subject: [PATCH] lavfi/mergeplanes: Fix >8 bit for big endian formats.

Fixes part of ticket #5916.
---
 libavfilter/vf_mergeplanes.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavfilter/vf_mergeplanes.c b/libavfilter/vf_mergeplanes.c
index 8128f33..c4948cc 100644
--- a/libavfilter/vf_mergeplanes.c
+++ b/libavfilter/vf_mergeplanes.c
@@ -192,9 +192,9 @@ static int config_output(AVFilterLink *outlink)
 outlink->sample_aspect_ratio = ctx->inputs[0]->sample_aspect_ratio;
 
 s->planewidth[1]  =
-s->planewidth[2]  = AV_CEIL_RSHIFT(outlink->w, s->outdesc->log2_chroma_w);
+s->planewidth[2]  = AV_CEIL_RSHIFT(((s->outdesc->comp[1].depth > 8) + 1) * outlink->w, s->outdesc->log2_chroma_w);
 s->planewidth[0]  =
-s->planewidth[3]  = outlink->w;
+s->planewidth[3]  = ((s->outdesc->comp[0].depth > 8) + 1) * outlink->w;
 s->planeheight[1] =
 s->planeheight[2] = AV_CEIL_RSHIFT(outlink->h, s->outdesc->log2_chroma_h);
 s->planeheight[0] =
@@ -220,9 +220,9 @@ static int config_output(AVFilterLink *outlink)
 }
 
 inputp->planewidth[1]  =
-inputp->planewidth[2]  = AV_CEIL_RSHIFT(inlink->w, indesc->log2_chroma_w);
+inputp->planewidth[2]  = AV_CEIL_RSHIFT(((indesc->comp[1].depth > 8) + 1) * inlink->w, indesc->log2_chroma_w);
 inputp->planewidth[0]  =
-inputp->planewidth[3]  = inlink->w;
+inputp->planewidth[3]  = ((indesc->comp[0].depth > 8) + 1) * inlink->w;
 inputp->planeheight[1] =
 inputp->planeheight[2] = AV_CEIL_RSHIFT(inlink->h, indesc->log2_chroma_h);
 inputp->planeheight[0] =
-- 
1.8.4.5

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


Re: [FFmpeg-devel] [PATCH] Fix build with LibreSSL

2016-10-29 Thread Michael Niedermayer
On Fri, Oct 28, 2016 at 12:47:08AM -0700, Michael Forney wrote:
> Signed-off-by: Michael Forney 
> ---
>  libavformat/tls_openssl.c | 12 ++--
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c
> index c551ac7..9712856 100644
> --- a/libavformat/tls_openssl.c
> +++ b/libavformat/tls_openssl.c
> @@ -43,7 +43,7 @@ typedef struct TLSContext {
>  TLSShared tls_shared;
>  SSL_CTX *ctx;
>  SSL *ssl;
> -#if OPENSSL_VERSION_NUMBER >= 0x101fL
> +#if OPENSSL_VERSION_NUMBER >= 0x101fL && 
> !defined(LIBRESSL_VERSION_NUMBER)
>  BIO_METHOD* url_bio_method;
>  #endif
>  } TLSContext;
> @@ -68,7 +68,7 @@ static unsigned long openssl_thread_id(void)
>  
>  static int url_bio_create(BIO *b)
>  {
> -#if OPENSSL_VERSION_NUMBER >= 0x101fL
> +#if OPENSSL_VERSION_NUMBER >= 0x101fL && 
> !defined(LIBRESSL_VERSION_NUMBER)
>  BIO_set_init(b, 1);
>  BIO_set_data(b, NULL);
>  BIO_set_flags(b, 0);
> @@ -85,7 +85,7 @@ static int url_bio_destroy(BIO *b)
>  return 1;
>  }
>  
> -#if OPENSSL_VERSION_NUMBER >= 0x101fL
> +#if OPENSSL_VERSION_NUMBER >= 0x101fL && 
> !defined(LIBRESSL_VERSION_NUMBER)
>  #define GET_BIO_DATA(x) BIO_get_data(x);
>  #else
>  #define GET_BIO_DATA(x) (x)->ptr;
> @@ -133,7 +133,7 @@ static int url_bio_bputs(BIO *b, const char *str)
>  return url_bio_bwrite(b, str, strlen(str));
>  }
>  
> -#if OPENSSL_VERSION_NUMBER < 0x101fL
> +#if OPENSSL_VERSION_NUMBER < 0x101fL || defined(LIBRESSL_VERSION_NUMBER)
>  static BIO_METHOD url_bio_method = {
>  .type = BIO_TYPE_SOURCE_SINK,
>  .name = "urlprotocol bio",
> @@ -212,7 +212,7 @@ static int tls_close(URLContext *h)
>  SSL_CTX_free(c->ctx);
>  if (c->tls_shared.tcp)
>  ffurl_close(c->tls_shared.tcp);
> -#if OPENSSL_VERSION_NUMBER >= 0x101fL
> +#if OPENSSL_VERSION_NUMBER >= 0x101fL && 
> !defined(LIBRESSL_VERSION_NUMBER)
>  if (c->url_bio_method)
>  BIO_meth_free(c->url_bio_method);
>  #endif
> @@ -265,7 +265,7 @@ static int tls_open(URLContext *h, const char *uri, int 
> flags, AVDictionary **op
>  ret = AVERROR(EIO);
>  goto fail;
>  }
> -#if OPENSSL_VERSION_NUMBER >= 0x101fL
> +#if OPENSSL_VERSION_NUMBER >= 0x101fL && 
> !defined(LIBRESSL_VERSION_NUMBER)
>  p->url_bio_method = BIO_meth_new(BIO_TYPE_SOURCE_SINK, "urlprotocol 
> bio");
>  BIO_meth_set_write(p->url_bio_method, url_bio_bwrite);
>  BIO_meth_set_read(p->url_bio_method, url_bio_bread);

The same condition is repeated
instead whatever the underlaying thing is that is intended to be
checkd for should be set by configure and used in something like
that

#if HAVE_BIO_METHODS_WHATEVER
...
#endif



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

Modern terrorism, a quick summary: Need oil, start war with country that
has oil, kill hundread thousand in war. Let country fall into chaos,
be surprised about raise of fundamantalists. Drop more bombs, kill more
people, be surprised about them taking revenge and drop even more bombs
and strip your own citizens of their rights and freedoms. to be continued


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH]lavfi/mergeplanes: Fix little endian formats >8 bit.

2016-10-29 Thread Carl Eugen Hoyos

Hi!

Attached patch fixes ticket #5916 for (for example) yuv444p9le.

Please comment, Carl EugenFrom e50c9ee93ce6a8ceb21d3319667eb1b392c1d2da Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos 
Date: Sun, 30 Oct 2016 00:39:19 +0200
Subject: [PATCH] lavfi/mergeplanes: Fix little endian formats >8 bit.

Fixes ticket #5916.
---
 libavfilter/vf_mergeplanes.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavfilter/vf_mergeplanes.c b/libavfilter/vf_mergeplanes.c
index c4948cc..c211043 100644
--- a/libavfilter/vf_mergeplanes.c
+++ b/libavfilter/vf_mergeplanes.c
@@ -122,6 +122,7 @@ static int query_formats(AVFilterContext *ctx)
 for (i = 0; av_pix_fmt_desc_get(i); i++) {
 const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(i);
 if (desc->comp[0].depth == s->outdesc->comp[0].depth &&
+(desc->comp[0].depth <= 8 || (desc->flags & AV_PIX_FMT_FLAG_BE) == (s->outdesc->flags & AV_PIX_FMT_FLAG_BE)) &&
 av_pix_fmt_count_planes(i) == desc->nb_components &&
 (ret = ff_add_format(&formats, i)) < 0)
 return ret;
-- 
1.8.4.5

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


Re: [FFmpeg-devel] [PATCH] avformat/utils: only call h264 decoder private function if h264 decoder is in use

2016-10-29 Thread Michael Niedermayer
On Sun, Sep 18, 2016 at 01:46:07PM +0200, Timo Rothenpieler wrote:
> Fixes a crash when decoding with for example h264_cuvid, as
> avpriv_h264_has_num_reorder_frames assumes the AVCodecContext->priv_data
> to be a H264Context.
> ---
>  libavformat/utils.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavformat/utils.c b/libavformat/utils.c
> index d605a96..06003dd 100644
> --- a/libavformat/utils.c
> +++ b/libavformat/utils.c
> @@ -935,7 +935,7 @@ static int has_decode_delay_been_guessed(AVStream *st)
>  if (!st->info) // if we have left find_stream_info then 
> nb_decoded_frames won't increase anymore for stream copy
>  return 1;
>  #if CONFIG_H264_DECODER
> -if (st->internal->avctx->has_b_frames &&
> +if (st->internal->avctx->has_b_frames && 
> !strcmp(st->internal->avctx->codec->name, "h264") &&
> avpriv_h264_has_num_reorder_frames(st->internal->avctx) == 
> st->internal->avctx->has_b_frames)
>  return 1;

has the issue been fixed for all branches an cases or is something
missing that needs this ?
(if so this needs a null pointer check i think)


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

The real ebay dictionary, page 2
"100% positive feedback" - "All either got their money back or didnt complain"
"Best seller ever, very honest" - "Seller refunded buyer after failed scam"


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Fix build with LibreSSL

2016-10-29 Thread Matt Oliver
On 30 October 2016 at 09:39, Michael Niedermayer 
wrote:

> On Fri, Oct 28, 2016 at 12:47:08AM -0700, Michael Forney wrote:
> > Signed-off-by: Michael Forney 
> > ---
> >  libavformat/tls_openssl.c | 12 ++--
> >  1 file changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c
> > index c551ac7..9712856 100644
> > --- a/libavformat/tls_openssl.c
> > +++ b/libavformat/tls_openssl.c
> > @@ -43,7 +43,7 @@ typedef struct TLSContext {
> >  TLSShared tls_shared;
> >  SSL_CTX *ctx;
> >  SSL *ssl;
> > -#if OPENSSL_VERSION_NUMBER >= 0x101fL
> > +#if OPENSSL_VERSION_NUMBER >= 0x101fL && !defined(LIBRESSL_VERSION_
> NUMBER)
> >  BIO_METHOD* url_bio_method;
> >  #endif
> >  } TLSContext;
> > @@ -68,7 +68,7 @@ static unsigned long openssl_thread_id(void)
> >
> >  static int url_bio_create(BIO *b)
> >  {
> > -#if OPENSSL_VERSION_NUMBER >= 0x101fL
> > +#if OPENSSL_VERSION_NUMBER >= 0x101fL && !defined(LIBRESSL_VERSION_
> NUMBER)
> >  BIO_set_init(b, 1);
> >  BIO_set_data(b, NULL);
> >  BIO_set_flags(b, 0);
> > @@ -85,7 +85,7 @@ static int url_bio_destroy(BIO *b)
> >  return 1;
> >  }
> >
> > -#if OPENSSL_VERSION_NUMBER >= 0x101fL
> > +#if OPENSSL_VERSION_NUMBER >= 0x101fL && !defined(LIBRESSL_VERSION_
> NUMBER)
> >  #define GET_BIO_DATA(x) BIO_get_data(x);
> >  #else
> >  #define GET_BIO_DATA(x) (x)->ptr;
> > @@ -133,7 +133,7 @@ static int url_bio_bputs(BIO *b, const char *str)
> >  return url_bio_bwrite(b, str, strlen(str));
> >  }
> >
> > -#if OPENSSL_VERSION_NUMBER < 0x101fL
> > +#if OPENSSL_VERSION_NUMBER < 0x101fL || defined(LIBRESSL_VERSION_
> NUMBER)
> >  static BIO_METHOD url_bio_method = {
> >  .type = BIO_TYPE_SOURCE_SINK,
> >  .name = "urlprotocol bio",
> > @@ -212,7 +212,7 @@ static int tls_close(URLContext *h)
> >  SSL_CTX_free(c->ctx);
> >  if (c->tls_shared.tcp)
> >  ffurl_close(c->tls_shared.tcp);
> > -#if OPENSSL_VERSION_NUMBER >= 0x101fL
> > +#if OPENSSL_VERSION_NUMBER >= 0x101fL && !defined(LIBRESSL_VERSION_
> NUMBER)
> >  if (c->url_bio_method)
> >  BIO_meth_free(c->url_bio_method);
> >  #endif
> > @@ -265,7 +265,7 @@ static int tls_open(URLContext *h, const char *uri,
> int flags, AVDictionary **op
> >  ret = AVERROR(EIO);
> >  goto fail;
> >  }
> > -#if OPENSSL_VERSION_NUMBER >= 0x101fL
> > +#if OPENSSL_VERSION_NUMBER >= 0x101fL && !defined(LIBRESSL_VERSION_
> NUMBER)
> >  p->url_bio_method = BIO_meth_new(BIO_TYPE_SOURCE_SINK,
> "urlprotocol bio");
> >  BIO_meth_set_write(p->url_bio_method, url_bio_bwrite);
> >  BIO_meth_set_read(p->url_bio_method, url_bio_bread);
>

This also seems a bit odd, why is libreSSL setting an openssl version
number of 1.1.0 or higher when it doesnt actually conform to the
corresponding openssl version. LibreSSl setting the openssl version number
to 2.0.0 seems to be problematic and causes problems not just for ffmpeg.
Of course theres not much we can do about that but perhaps an alternative
to Michaels suggestion would be to just add a single check near the top of
the file that checks for libressl and then redefines the openssl version to
the api libressl actually supports. i.e.

#ifdef LIBRESSL_VERSION_NUMBER
#undef OPENSSL_VERSION_NUMBER
#define OPENSSL_VERSION_NUMBER 0x1000107fL
#endif

This I believe is what some other projects have done to avoid this issue
and is rather simple to add and prevents further clutter in our configure.
I dont have any preference between this and the other suggestion, im just
providing some alternatives. The above is pretty simple so if it works for
you i can write up a patch for that pretty easily.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] lavf/os_support: Add safe win32 dlopen/dlclose/dlsym functions.

2016-10-29 Thread Matt Oliver
On 30 October 2016 at 03:41, Stephen Hutchinson  wrote:

> On 10/29/2016 11:22 AM, Michael Niedermayer wrote:
>
>> On Sat, Oct 29, 2016 at 06:35:19PM +1100, Matt Oliver wrote:
>>
>>>  configure  |5 +
>>>  libavformat/avisynth.c |   14 +-
>>>  2 files changed, 6 insertions(+), 13 deletions(-)
>>> b1568f39504e5e14c924d27c8f11ba8f5816d68c  0003-avformat-avisynth.c-Use-n
>>> ew-safe-dlopen-code.patch
>>> From 633212cf1246b3fde61dd6515229e6a893005664 Mon Sep 17 00:00:00 2001
>>> From: Matt Oliver 
>>> Date: Sat, 29 Oct 2016 18:25:25 +1100
>>> Subject: [PATCH 3/4] avformat/avisynth.c: Use new safe dlopen code.
>>>
>>
>> breaks --enable-avisynth on linux/ubuntu
>>
>> --- config.h2016-10-29 17:17:55.214014842 +0200
>> +++ delth/config.h  2016-10-29 17:15:41.906012034 +0200
>> @@ -1155,7 +1155,7 @@
>>  #define CONFIG_AST_DEMUXER 1
>>  #define CONFIG_AU_DEMUXER 1
>>  #define CONFIG_AVI_DEMUXER 1
>> -#define CONFIG_AVISYNTH_DEMUXER 1
>> +#define CONFIG_AVISYNTH_DEMUXER 0
>>  #define CONFIG_AVR_DEMUXER 1
>>  #define CONFIG_AVS_DEMUXER 1
>>  #define CONFIG_BETHSOFTVID_DEMUXER 1
>>
>> [...]
>>
>>
> Yeah, libdl needs to be linked to on non-Windows, and the
> check for it got removed with the rest of the 'enabled avisynth'
> case in configure. Just putting dlopen under avisynth_demuxer_deps doesn't
> seem to be sufficient for that to work.


Looks like I missed a line, my apologies. Updated version attached.


0003-avformat-avisynth.c-Use-new-safe-dlopen-code.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Fix build with LibreSSL

2016-10-29 Thread Michael Forney
On 10/29/16, Matt Oliver  wrote:
> This also seems a bit odd, why is libreSSL setting an openssl version
> number of 1.1.0 or higher when it doesnt actually conform to the
> corresponding openssl version. LibreSSl setting the openssl version number
> to 2.0.0 seems to be problematic and causes problems not just for ffmpeg.
> Of course theres not much we can do about that but perhaps an alternative
> to Michaels suggestion would be to just add a single check near the top of
> the file that checks for libressl and then redefines the openssl version to
> the api libressl actually supports. i.e.
>
> #ifdef LIBRESSL_VERSION_NUMBER
> #undef OPENSSL_VERSION_NUMBER
> #define OPENSSL_VERSION_NUMBER 0x1000107fL
> #endif
>
> This I believe is what some other projects have done to avoid this issue
> and is rather simple to add and prevents further clutter in our configure.
> I dont have any preference between this and the other suggestion, im just
> providing some alternatives. The above is pretty simple so if it works for
> you i can write up a patch for that pretty easily.

I'm not sure why libressl sets OPENSSL_VERSION_NUMBER to 0x2000L.
Maybe so that they can pick and choose which openssl APIs to implement
(rather than everything up through some version)?

I'm fine with any of the suggested approaches. I just went with
!defined(LIBRESSL_VERSION_NUMBER) in my original patch because that's
what I've seen projects like curl, wpa_supplicant, and openvpn do. It
also seems to be what openbsd is doing itself with patches in its
ports tree (xca, stunnel, postfix).
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel