[FFmpeg-devel] [PATCH V3 2/2] hwaccel_mpeg: check reference pictures are available

2017-10-12 Thread Zhong Li
some reference pictures are not existed but valiad surface_ids are set,
(for example, the second field of the first key frame can be
P_Picture_Type but there is no preivous frame.)
then may cause some driver problems (e.g, segment fault on  mesa/AMD driver).

Signed-off-by: Zhong Li 
---
 libavcodec/dxva2_mpeg2.c  |  4 ++--
 libavcodec/vaapi_mpeg2.c  |  6 --
 libavcodec/vdpau_mpeg12.c | 15 ++-
 3 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/libavcodec/dxva2_mpeg2.c b/libavcodec/dxva2_mpeg2.c
index b7c69378f0..9117a3d7b1 100644
--- a/libavcodec/dxva2_mpeg2.c
+++ b/libavcodec/dxva2_mpeg2.c
@@ -51,11 +51,11 @@ static void fill_picture_parameters(AVCodecContext *avctx,
 memset(pp, 0, sizeof(*pp));
 pp->wDecodedPictureIndex = ff_dxva2_get_surface_index(avctx, ctx, 
current_picture->f);
 pp->wDeblockedPictureIndex   = 0;
-if (s->pict_type != AV_PICTURE_TYPE_I)
+if (s->pict_type != AV_PICTURE_TYPE_I && s->last_picture_ptr)
 pp->wForwardRefPictureIndex  = ff_dxva2_get_surface_index(avctx, ctx, 
s->last_picture.f);
 else
 pp->wForwardRefPictureIndex  = 0x;
-if (s->pict_type == AV_PICTURE_TYPE_B)
+if (s->pict_type == AV_PICTURE_TYPE_B && s->next_picture_ptr)
 pp->wBackwardRefPictureIndex = ff_dxva2_get_surface_index(avctx, ctx, 
s->next_picture.f);
 else
 pp->wBackwardRefPictureIndex = 0x;
diff --git a/libavcodec/vaapi_mpeg2.c b/libavcodec/vaapi_mpeg2.c
index 0d197c9692..942711b39f 100644
--- a/libavcodec/vaapi_mpeg2.c
+++ b/libavcodec/vaapi_mpeg2.c
@@ -73,10 +73,12 @@ static int vaapi_mpeg2_start_frame(AVCodecContext *avctx, 
av_unused const uint8_
 
 switch (s->pict_type) {
 case AV_PICTURE_TYPE_B:
-pic_param.backward_reference_picture = 
ff_vaapi_get_surface_id(s->next_picture.f);
+if (s->next_picture_ptr)
+pic_param.backward_reference_picture = 
ff_vaapi_get_surface_id(s->next_picture.f);
 // fall-through
 case AV_PICTURE_TYPE_P:
-pic_param.forward_reference_picture = 
ff_vaapi_get_surface_id(s->last_picture.f);
+if (s->last_picture_ptr)
+pic_param.forward_reference_picture = 
ff_vaapi_get_surface_id(s->last_picture.f);
 break;
 }
 
diff --git a/libavcodec/vdpau_mpeg12.c b/libavcodec/vdpau_mpeg12.c
index b657007ee7..6d73d45f1a 100644
--- a/libavcodec/vdpau_mpeg12.c
+++ b/libavcodec/vdpau_mpeg12.c
@@ -45,13 +45,18 @@ static int vdpau_mpeg_start_frame(AVCodecContext *avctx,
 
 switch (s->pict_type) {
 case AV_PICTURE_TYPE_B:
-ref = ff_vdpau_get_surface_id(s->next_picture.f);
-assert(ref != VDP_INVALID_HANDLE);
-info->backward_reference = ref;
+if (s->next_picture_ptr) {
+ref = ff_vdpau_get_surface_id(s->next_picture.f);
+assert(ref != VDP_INVALID_HANDLE);
+info->backward_reference = ref;
+}
 /* fall through to forward prediction */
 case AV_PICTURE_TYPE_P:
-ref = ff_vdpau_get_surface_id(s->last_picture.f);
-info->forward_reference  = ref;
+if (s->last_picture_ptr) {
+ref = ff_vdpau_get_surface_id(s->last_picture.f);
+assert(ref != VDP_INVALID_HANDLE);
+info->forward_reference  = ref;
+}
 }
 
 info->slice_count= 0;
-- 
2.11.0

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


[FFmpeg-devel] [PATCH V3 1/2] mpeg2_hwaccel: always submit twice for a frame with two fileds.

2017-10-12 Thread Zhong Li
Though this patch to fix https://trac.ffmpeg.org/ticket/6668, I belive it
is unnecessary to set SLICE_FLAG_ALLOW_FIELD flag to other
hwaccels(dxva, vdpau, etc).

Signed-off-by: Zhong Li 
---
 libavcodec/mpeg12dec.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index 4e68be27f1..5dc4612c77 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -1689,8 +1689,7 @@ static int mpeg_field_start(MpegEncContext *s, const 
uint8_t *buf, int buf_size)
 return AVERROR_INVALIDDATA;
 }
 
-if (s->avctx->hwaccel &&
-(s->avctx->slice_flags & SLICE_FLAG_ALLOW_FIELD)) {
+if (s->avctx->hwaccel) {
 if ((ret = s->avctx->hwaccel->end_frame(s->avctx)) < 0) {
 av_log(avctx, AV_LOG_ERROR,
"hardware accelerator failed to decode first field\n");
-- 
2.11.0

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


Re: [FFmpeg-devel] [PATCH] mpegdec: fix redundant dummy frames issue of interlaced clips

2017-10-12 Thread Li, Zhong
> -Original Message-
> From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf
> Of Michael Niedermayer
> Sent: Wednesday, October 4, 2017 8:16 AM
> To: FFmpeg development discussions and patches
> 
> Subject: Re: [FFmpeg-devel] [PATCH] mpegdec: fix redundant dummy frames
> issue of interlaced clips
> 
> On Sat, Sep 30, 2017 at 11:22:57AM +0800, Zhong Li wrote:
> > It is to fix https://trac.ffmpeg.org/ticket/6677. Actucally it is a
> > regression of commit 99e07a4453732058df90885f80b3db3b4f37cb3c
> which
> > always inserts a dummy frame when decode the first key field picture.
> >
> > Signed-off-by: Zhong Li 
> > ---
> >  libavcodec/mpegvideo.c | 6 +-
> >  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> applied
> 
> please add a fate test
> 
Thank for remind. FATE test will be added. 
> thanks
> 
> [...]
> --
> Michael GnuPG fingerprint:
> 9FF2128B147EF6730BADF133611EC787040B0FAB
> 
> Elect your leaders based on what they did after the last election, not based
> on what they say before an election.

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


Re: [FFmpeg-devel] [PATCH] ffmpeg.c: Fallback to duration_dts, when duration_pts can't be determined.

2017-10-12 Thread Thomas Mundt
Hi Michael,

2017-10-12 1:28 GMT+02:00 Michael Niedermayer :

> On Tue, Oct 10, 2017 at 10:26:13PM +0200, Thomas Mundt wrote:
> > 2017-10-10 19:36 GMT+02:00 Sasi Inguva :
> >
> > > This is required for FLV files, for which duration_pts comes out to be
> > > zero.
> > >
> > > Signed-off-by: Sasi Inguva 
> > > ---
> > >  fftools/ffmpeg.c | 9 +++--
> > >  1 file changed, 7 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
> > > index 6d64bc1043..3ee31473dc 100644
> > > --- a/fftools/ffmpeg.c
> > > +++ b/fftools/ffmpeg.c
> > > @@ -2665,8 +2665,13 @@ static int process_input_packet(InputStream
> *ist,
> > > const AVPacket *pkt, int no_eo
> > >  ist->next_dts = AV_NOPTS_VALUE;
> > >  }
> > >
> > > -if (got_output)
> > > -ist->next_pts += av_rescale_q(duration_pts,
> > > ist->st->time_base, AV_TIME_BASE_Q);
> > > +if (got_output) {
> > > +if (duration_pts > 0) {
> > > +ist->next_pts += av_rescale_q(duration_pts,
> > > ist->st->time_base, AV_TIME_BASE_Q);
> > > +} else {
> > > +ist->next_pts += duration_dts;
> > > +}
> > > +}
> > >  break;
> > >  case AVMEDIA_TYPE_SUBTITLE:
> > >  if (repeating)
> > > --
> > >
> >
> > Patch LGTM.
>
> will apply
>

would you mind pushing this patch to the 3.4 branch also?

Thank you,
Thomas
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] ffmpeg.c: Fallback to duration_dts, when duration_pts can't be determined.

2017-10-12 Thread Nicolas George
L'octidi 18 vendémiaire, an CCXXVI, Sasi Inguva a écrit :
> This is required for FLV files, for which duration_pts comes out to be zero.
> 
> Signed-off-by: Sasi Inguva 
> ---
>  fftools/ffmpeg.c | 3 +++
>  1 file changed, 3 insertions(+)

Could you make a FATE test so that it stays fixed?

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] avformat/srt: add Haivision Open SRT protocol

2017-10-12 Thread Nicolas George
Le primidi 21 vendémiaire, an CCXXVI, nablet developer a écrit :
> that's true - 90% of your comments are for original udp.c code I didn't
> touch.

When you are copy-pasting code, you are not only copy-pasting features,
you are also copy-pasting bugs and maintenance burden. When a bug is
found in udp.c, or when a change is needed due to changes in other parts
of the code, it will require the same fix to be made in opensrt.c:
useless work duplication. Furthermore, since this feature is a protocol
that nobody uses (yet?) depending on a library that nobody has (not in
Debian AFAICS), there will be very little testing, so the bugs will not
be found, and will stay.

And since it is a network protocol, bugs are likely to be
security-relevant.

Therefore, this level of code duplication (that I had not noticed until
now, I has not looked at the code) is a big no.

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] libavcodec/proresdec : add qmat dsp with SSE2, AVX2 simd

2017-10-12 Thread Martin Vignali
2017-10-10 3:16 GMT+02:00 Ivan Kalvachev :

> On 10/9/17, Martin Vignali  wrote:
> > 2017-10-07 18:16 GMT+02:00 Ronald S. Bultje :
> >
> >> Hi Martin,
> >>
> >> On Sat, Oct 7, 2017 at 11:49 AM, Martin Vignali <
> martin.vign...@gmail.com>
> >> wrote:
> >>
> >> > 2017-10-07 17:30 GMT+02:00 Ronald S. Bultje :
> >> > > On Sat, Oct 7, 2017 at 10:22 AM, Martin Vignali <
> >> > martin.vign...@gmail.com>
> >> > > wrote:
> >> > > > Patch in attach add a new dsp
> >> > > > for manipulation of qmat
> >> > > >
> >> > > > for now, i move this code inside
> >> > > >
> >> > > > for (i = 0; i < 64; i++) {
> >> > > > qmat_luma_scaled  [i] = ctx->qmat_luma  [i] * qscale;
> >> > > > qmat_chroma_scaled[i] = ctx->qmat_chroma[i] * qscale;
> >> > > > }
> >> > > >
> >> > > > i add a special case for qscale == 1
> >> > > > and SSE2, AVX2 optimization
> >> > >
> >> > > This loop only executes once per slice. We typically do not
> >> SIMD-optimize
> >> > > at that level, because it won't give significant speed gains...
> >> >
> >> > Ok didn't know that.
> >> > I mostly follow, what there are already done, like in
> >> blockdsp.clear_block
> >> >
> >>
> >> Right, so consider that blockdsp is done per block (16x16 pixels), not
> per
> >> slice.
> >>
> > Ok on principle (only improve, a func which is called quite often)
>
> It's more of:  We can't refuse code that makes a measurable improvement.
>
> Also have in mind that compilers are getting smarter and this code is
> good target for auto-vectorization. Of course FFmpeg disables is,
> because of long history of compiler bugs related to it.
>
> >> You could remove this entirely from the slice processing code by simply
> >> pre-calculating the values in the init function once for the whole
> stream,
> >> there's only 224 qscale values so it's 224*64*2 multiplications, which
> is
> >> (in the context of prores) virtually negligible.
> >>
> >
> > Not sure, we can do that for prores decoder
> > the qmat seems to be set on the decode frame header func
> > (based on the header of the frame).
>
> You can at least check if the qscale has changed and avoid recalculation.
> I think that the lgpl decoder does that.
>
> Yes you're right, the lgpl decoder only calculate it, if qscale (and qmat)
doesn't change
I will take a look on this

Thanks

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


Re: [FFmpeg-devel] libavcodec/blockdsp : add clear_blocks_prores func (SSE, AVX) for prores decoding

2017-10-12 Thread Martin Vignali
2017-10-11 16:00 GMT+02:00 Ronald S. Bultje :

> Hi Martin,
>
> (as you've probably noticed, I'm generally particularly interested in
> optimization patches, not just the SIMD, but also the general algorithmic
> thought behind it.)
>
> On Thu, Oct 5, 2017 at 10:58 AM, Martin Vignali 
> wrote:
>
> > In attach patchs to add a dedicated func for clear_block inside
> > prores decoding (proresdec2)
> >
>
> The idea here is that N (where N=blocks_per_slice) calls is more expensive
> than 1 call, which is indeed true. One way we've tried to "fix" this in
> some decoders is to not call clear_blocks() at all, instead clearing the
> coefficient arrays in the call to idct() - see e.g. h264/hevc, vp8/9, and
> probably some more. Given that the prores idct lives in its own
> proresdspcontext, we could adjust it here as well. The advantage of having
> 0 calls should be obvious. :-).
>
>
>
Hi Ronald,

Ok i will take a look on this.
The clear block part is also called in the slice_alpha decoding, but not
sure it's necessary
(or at least not for the entire blocks)

Thanks

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


Re: [FFmpeg-devel] [PATCH] ffmpeg: always init output stream before reaping filters

2017-10-12 Thread Marton Balint



On Sun, 8 Oct 2017, Marton Balint wrote:




On Sat, 7 Oct 2017, Hendrik Leppkes wrote:


On Wed, Oct 4, 2017 at 12:48 AM, Marton Balint  wrote:

Otherwise the frame size of the codec is not set in the buffersink.

Fixes ticket #6603 and the following simpler case:

ffmpeg -c aac -filter_complex "sine=d=0.1,asetnsamples=1025" out.aac

Signed-off-by: Marton Balint 
---
 fftools/ffmpeg.c | 9 +
 1 file changed, 9 insertions(+)

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 1d248bc269..5be8788ea8 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -4528,6 +4528,15 @@ static int transcode_step(void)
 }

 if (ost->filter && ost->filter->graph->graph) {
+if (!ost->initialized) {
+char error[1024] = {0};
+ret = init_output_stream(ost, error, sizeof(error));
+if (ret < 0) {
+av_log(NULL, AV_LOG_ERROR, "Error initializing output 

stream %d:%d -- %s\n",

+   ost->file_index, ost->index, error);
+exit_program(1);
+}
+}
 if ((ret = transcode_from_filter(ost->filter->graph, &ist)) < 0)
 return ret;
 if (!ist)


Doesn't this basically void all the work that was done to get proper
output frame information before initializing the output, so its
created with the proper info at all times?


To be frank, I am not entirely sure. Fate passes, so this can't be that 
bad. The original patch that caused the regression is 
af1761f7b5b1b72197dc40934953b775c2d951cc which in the commit message only 
mentions the delayed initialization of filters, this patch keeps that.




Will push this soon.

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


Re: [FFmpeg-devel] warning: unknown warning option '-Wno-bool-operation'; did you mean '-Wno-bool-conversion'? [-Wunknown-warning-option]

2017-10-12 Thread Ronald S. Bultje
Hi,

On Wed, Oct 11, 2017 at 10:04 PM, Helmut K. C. Tessarek <
tessa...@evermeet.cx> wrote:

> On 2017-10-11 21:59, James Almer wrote:
> > Clang seems to warn instead of fail when an option does not exist, so
> > configure things it exists.
> >
> > A solution could be to somehow make clang fail instead of warn (-Werror
> > only during the test maybe?). Or just revert this again and ignore the
> > two or so cases where gcc thinks it should warn about boolean operations.
>
> This sounds pretty much the same as Mark Thompson suggested in another
> thread:
>
> ---
> The test in configure passes, I think because:
>
> :
> """
> When an unrecognized warning option is requested (e.g.,
> -Wunknown-warning), GCC emits a diagnostic stating that the option is
> not recognized. However, if the -Wno- form is used, the behavior is
> slightly different: no diagnostic is produced for -Wno-unknown-warning
> unless other diagnostics are being produced. This allows the use of new
> -Wno- options with old compilers, but if something goes wrong, the
> compiler warns that an unrecognized option is present.
> """
>
> Not sure exactly how to fix that.  Could we replace the check with
> something like "-Werror=bool-operation", which does error out when it
> doesn't find the warning option, and only add the "-Wno-bool-operation"
> if that works?
>

From IRC yesterday (gcc=clang here):

bash-4.4$ gcc /dev/null -Wno-bool-operation -c -o /tmp/x.o && echo success
clang: warning: /dev/null: 'linker' input unused
[-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-Wno-bool-operation'
[-Wunused-command-line-argument]
success
bash-4.4$ gcc -Wno-bool-operation /tmp/x.c -c -o /tmp/x.o
-Werror=unused-command-line-argument && echo success
warning: unknown warning option '-Wno-bool-operation'; did you mean
'-Wno-bool-conversion'? [-Wunknown-warning-option]
1 warning generated.
successbash-4.4$ gcc -Wno-bool-operation /tmp/x.c -c -o /tmp/x.o
-Werror=unused-command-line-argument -Werror=unknown-warning-option && echo
success
error: unknown warning option '-Wno-bool-operation'; did you mean
'-Wno-bool-conversion'? [-Werror,-Wunknown-warning-option]

That last one should allow this to work.

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


Re: [FFmpeg-devel] [PATCH] ffmpeg.c: Fallback to duration_dts, when duration_pts can't be determined.

2017-10-12 Thread wm4
On Thu, 12 Oct 2017 01:28:01 +0200
Michael Niedermayer  wrote:

> On Tue, Oct 10, 2017 at 10:26:13PM +0200, Thomas Mundt wrote:
> > 2017-10-10 19:36 GMT+02:00 Sasi Inguva :
> >   
> > > This is required for FLV files, for which duration_pts comes out to be
> > > zero.
> > >
> > > Signed-off-by: Sasi Inguva 
> > > ---
> > >  fftools/ffmpeg.c | 9 +++--
> > >  1 file changed, 7 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
> > > index 6d64bc1043..3ee31473dc 100644
> > > --- a/fftools/ffmpeg.c
> > > +++ b/fftools/ffmpeg.c
> > > @@ -2665,8 +2665,13 @@ static int process_input_packet(InputStream *ist,
> > > const AVPacket *pkt, int no_eo
> > >  ist->next_dts = AV_NOPTS_VALUE;
> > >  }
> > >
> > > -if (got_output)
> > > -ist->next_pts += av_rescale_q(duration_pts,
> > > ist->st->time_base, AV_TIME_BASE_Q);
> > > +if (got_output) {
> > > +if (duration_pts > 0) {
> > > +ist->next_pts += av_rescale_q(duration_pts,
> > > ist->st->time_base, AV_TIME_BASE_Q);
> > > +} else {
> > > +ist->next_pts += duration_dts;
> > > +}
> > > +}
> > >  break;
> > >  case AVMEDIA_TYPE_SUBTITLE:
> > >  if (repeating)
> > > --
> > >  
> > 
> > Patch LGTM.  
> 
> will apply

I don't feel like this was sufficiently discussed.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] doc/filters: correct typo and incomplete desc

2017-10-12 Thread Gyan Doshi
Correct typo in signalstats filter section and qualify description for 
variable in select filter.
From fe780adb77b98d0c76671fdeb98d3123d7834550 Mon Sep 17 00:00:00 2001
From: Gyan Doshi 
Date: Thu, 12 Oct 2017 18:46:06 +0530
Subject: [PATCH] doc/filters: correct typo and incomplete desc.

Correct typo in signalstats filter section and qualify description for variable
in select filter.

Signed-off-by: Gyan Doshi 
---
 doc/filters.texi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/filters.texi b/doc/filters.texi
index e26dde4b1a..13eb62b307 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -17679,7 +17679,7 @@ with AV_LOG_INFO loglevel.
 
 @itemize
 @item
-Print all metadata values for frames with key @code{lavfi.singnalstats.YDIF} 
with values
+Print all metadata values for frames with key @code{lavfi.signalstats.YDIF} 
with values
 between 0 and 1.
 @example
 
signalstats,metadata=print:key=lavfi.signalstats.YDIF:value=0:function=expr:expr='between(VALUE1,0,1)'
@@ -17807,7 +17807,7 @@ The PTS of the previously filtered video frame. It's 
NAN if undefined.
 The PTS of the last previously filtered video frame. It's NAN if undefined.
 
 @item prev_selected_t
-The PTS of the last previously selected video frame. It's NAN if undefined.
+The PTS of the last previously selected video frame, expressed in seconds. 
It's NAN if undefined.
 
 @item start_pts
 The PTS of the first video frame in the video. It's NAN if undefined.
-- 
2.12.2.windows.2___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] udp: added option to ignore empty UDP packets

2017-10-12 Thread Nicolas George
Le quintidi 15 vendémiaire, an CCXXVI, Daniel Kučera a écrit :
> I'm not sure if you mean this patch is unacceptable but if so, I want
> to note, that this patch is not the same as I submitted before: this
> one adds cmdlne option to ignore empty packets and it doesn't ignore
> them when not explicitly enabled.

As for this particular solution, I think it exposes to the user the
innards of a work-around, this is not good at all.

The good approach is to fix the bugs. You do not need to fix all of
them, just fix the one or two instances that break things for you: in
your use case, there is one line of code in the whole project that gets
ret=0 and thinks it means EOF: find it and fix it, and you should be
good. Other instance, if any, can be fixed as needed.

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] udp: added option to ignore empty UDP packets

2017-10-12 Thread wm4
On Thu, 12 Oct 2017 16:16:31 +0200
Nicolas George  wrote:

> Le quintidi 15 vendémiaire, an CCXXVI, Daniel Kučera a écrit :
> > I'm not sure if you mean this patch is unacceptable but if so, I want
> > to note, that this patch is not the same as I submitted before: this
> > one adds cmdlne option to ignore empty packets and it doesn't ignore
> > them when not explicitly enabled.  
> 
> As for this particular solution, I think it exposes to the user the
> innards of a work-around, this is not good at all.
> 
> The good approach is to fix the bugs. You do not need to fix all of
> them, just fix the one or two instances that break things for you: in
> your use case, there is one line of code in the whole project that gets
> ret=0 and thinks it means EOF: find it and fix it, and you should be
> good. Other instance, if any, can be fixed as needed.

You can't force an occasional contributor to fix deep issues to fix a
minor bug, especially not with such a smug attitude.

You need to provide some leeway.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [FFmpeg-cvslog] Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

2017-10-12 Thread Michael Niedermayer
On Wed, Oct 11, 2017 at 10:30:13PM -0300, James Almer wrote:
> On 10/11/2017 9:22 PM, Michael Niedermayer wrote:
> > On Wed, Oct 11, 2017 at 09:26:18PM +, James Almer wrote:
> >> ffmpeg | branch: master | James Almer  | Wed Oct 11 
> >> 17:55:25 2017 -0300| [6dfcbd80ad446ff163b47f2bf432bbf706436ea8] | 
> >> committer: James Almer
> >>
> >> Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'
> >>
> >> * commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63':
> >>   build: Fine-grained link-time dependency settings
> >>
> >> Also included are bug fix commits 5ff3b5cafcc685b6936d16602b0f80aa09a95870,
> >> d9da7151eef7fc469787e7298196cea291acfd82 and
> >> 5e27ef800bfa2be17a6353ddedac6b7400e4624f.
> >>
> >> Merged-by: James Almer 
> >>
> >>> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6dfcbd80ad446ff163b47f2bf432bbf706436ea8
> >> ---
> >>
> >>  Makefile|   3 +-
> >>  configure   | 297 
> >> +---
> >>  ffbuild/common.mak  |   2 +-
> >>  ffbuild/library.mak |   2 +-
> >>  tests/checkasm/Makefile |   2 +-
> >>  5 files changed, 187 insertions(+), 119 deletions(-)
> > 
> > This breaks build here (linux x86-64)
> > 
> > ./configure --enable-libxavs --enable-gpl
> > ERROR: libxavs not found
> > 
> > Iam trying to test most patches for FFmpeg before they are pushed, but
> > i can only test what is posted for review on ffmpeg-devel ...
> 
> Testing locally i see it's complaining about missing pthreads and libm
> ldflag, since they of course are not part of the global extralibs anymore.
> Switching detection to pkg-config would be ideal, but for some reason
> even the supplied .pc file doesn't include the -lm ldflag, only the
> pthreads one, and libxavs looks like it hasn't been updated for six
> years now (at least the one in sourceforge), so it's unlikely to be
> fixed on their end.
> 
> Can you test the attached patch?

seems to fix it but i get a build failure with fontconfig now:

../configure  --enable-fontconfig  && make -j12

LD  ffmpeg_g
libavfilter/libavfilter.a(avf_showcqt.o): In function `render_fontconfig':
ffmpeg/nasm/src/libavfilter/avf_showcqt.c:606: undefined reference to 
`FcInitLoadConfigAndFonts'
ffmpeg/nasm/src/libavfilter/avf_showcqt.c:611: undefined reference to 
`FcNameParse'
ffmpeg/nasm/src/libavfilter/avf_showcqt.c:617: undefined reference to 
`FcDefaultSubstitute'
ffmpeg/nasm/src/libavfilter/avf_showcqt.c:619: undefined reference to 
`FcConfigSubstitute'
ffmpeg/nasm/src/libavfilter/avf_showcqt.c:626: undefined reference to 
`FcFontMatch'
ffmpeg/nasm/src/libavfilter/avf_showcqt.c:627: undefined reference to 
`FcPatternDestroy'
ffmpeg/nasm/src/libavfilter/avf_showcqt.c:643: undefined reference to 
`FcPatternDestroy'
ffmpeg/nasm/src/libavfilter/avf_showcqt.c:644: undefined reference to 
`FcConfigDestroy'
ffmpeg/nasm/src/libavfilter/avf_showcqt.c:621: undefined reference to 
`FcPatternDestroy'
ffmpeg/nasm/src/libavfilter/avf_showcqt.c:622: undefined reference to 
`FcConfigDestroy'
ffmpeg/nasm/src/libavfilter/avf_showcqt.c:635: undefined reference to 
`FcPatternGetString'
ffmpeg/nasm/src/libavfilter/avf_showcqt.c:613: undefined reference to 
`FcConfigDestroy'
collect2: error: ld returned 1 exit status
make: *** [ffmpeg_g] Error 1

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The educated differ from the uneducated as much as the living from the
dead. -- Aristotle 


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


Re: [FFmpeg-devel] [PATCH] mov: fix decode of fragments that overlap in time

2017-10-12 Thread Michael Niedermayer
On Wed, Oct 11, 2017 at 10:56:41PM -0700, John Stebbins wrote:
> On 10/11/2017 06:25 PM, Michael Niedermayer wrote:
> >On Tue, Oct 10, 2017 at 06:11:08PM -0700, John Stebbins wrote:
> >>When keyframe intervals of dash segments are not perfectly aligned,
> >>fragments in the stream can overlap in time. The previous sorting by
> >>timestamp causes packets to be read out of decode order and results
> >>in decode errors.
> >>
> >>Insert new "trun" index entries into index_entries in the order that
> >>the trun are referenced by the sidx.
> >>---
> >>  libavformat/isom.h |  26 +-
> >>  libavformat/mov.c  | 684 
> >> -
> >>  2 files changed, 485 insertions(+), 225 deletions(-)
> >This still crashes: (not sure i can share the file, tell me if the
> >valgrind output is enough)
> >
> >==16990== Conditional jump or move depends on uninitialised value(s)
> >==16990==at 0x6C518B: search_frag_moof_offset (mov.c:1227)
> >==16990==by 0x6C543D: update_frag_index (mov.c:1318)
> >==16990==by 0x6D4F77: read_tfra (mov.c:6384)
> >==16990==by 0x6D51EF: mov_read_mfra (mov.c:6432)
> >==16990==by 0x6C57F7: mov_read_moof (mov.c:1384)
> >==16990==by 0x6D38E5: mov_read_default (mov.c:5949)
> >==16990==by 0x6D5395: mov_read_header (mov.c:6473)
> >==16990==by 0x7AB6FA: avformat_open_input (utils.c:595)
> >==16990==by 0x41540A: open_input_file (ffmpeg_opt.c:1060)
> >==16990==by 0x41F0F9: open_files (ffmpeg_opt.c:3278)
> >==16990==by 0x41F28B: ffmpeg_parse_options (ffmpeg_opt.c:3318)
> >==16990==by 0x43D263: main (ffmpeg.c:4794)
> >==16990==
> >[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1187f060] wav header size < 14 is not 
> >implemented. Update your FFmpeg version to the newest one from Git. If the 
> >problem still occurs, it means that your file has a feature which has not 
> >been implemented.
> >[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1187f060] If you want to help, upload a sample 
> >of this file to ftp://upload.ffmpeg.org/incoming/ and contact the 
> >ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org)
> >[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1187f060] get_wav_header failed
> >[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1187f060] error reading header
> >==16990==at 0x117D019: VALGRIND_PRINTF_BACKTRACE (valgrind.h:4550)
> >==16990==by 0x117DA89: av_log_default_callback (log.c:355)
> >==16990==by 0x117DC28: av_vlog (log.c:383)
> >==16990==by 0x117DBE8: av_log (log.c:375)
> >==16990==by 0x6D53C2: mov_read_header (mov.c:6474)
> >==16990==by 0x7AB6FA: avformat_open_input (utils.c:595)
> >==16990==by 0x41540A: open_input_file (ffmpeg_opt.c:1060)
> >==16990==by 0x41F0F9: open_files (ffmpeg_opt.c:3278)
> >==16990==by 0x41F28B: ffmpeg_parse_options (ffmpeg_opt.c:3318)
> >==16990==by 0x43D263: main (ffmpeg.c:4794)
> >==16990== Conditional jump or move depends on uninitialised value(s)
> >==16990==at 0x4C2B58C: free (vg_replace_malloc.c:446)
> >==16990==by 0x11807BD: av_free (mem.c:209)
> >==16990==by 0x11807F5: av_freep (mem.c:219)
> >==16990==by 0x6D4CA9: mov_read_close (mov.c:6303)
> >==16990==by 0x6D53D1: mov_read_header (mov.c:6475)
> >==16990==by 0x7AB6FA: avformat_open_input (utils.c:595)
> >==16990==by 0x41540A: open_input_file (ffmpeg_opt.c:1060)
> >==16990==by 0x41F0F9: open_files (ffmpeg_opt.c:3278)
> >==16990==by 0x41F28B: ffmpeg_parse_options (ffmpeg_opt.c:3318)
> >==16990==by 0x43D263: main (ffmpeg.c:4794)
> >==16990==
> >test.mp4: Invalid data found when processing input
> >==16990==at 0x117D019: VALGRIND_PRINTF_BACKTRACE (valgrind.h:4550)
> >==16990==by 0x117DA89: av_log_default_callback (log.c:355)
> >==16990==by 0x117DC28: av_vlog (log.c:383)
> >==16990==by 0x117DBE8: av_log (log.c:375)
> >==16990==by 0x4274D1: print_error (cmdutils.c:1058)
> >==16990==by 0x415430: open_input_file (ffmpeg_opt.c:1062)
> >==16990==by 0x41F0F9: open_files (ffmpeg_opt.c:3278)
> >==16990==by 0x41F28B: ffmpeg_parse_options (ffmpeg_opt.c:3318)
> >==16990==by 0x43D263: main (ffmpeg.c:4794)
> >==16990==at 0x117D019: VALGRIND_PRINTF_BACKTRACE (valgrind.h:4550)
> >==16990==by 0x117DA89: av_log_default_callback (log.c:355)
> >==16990==by 0x117DC28: av_vlog (log.c:383)
> >==16990==by 0x117DBE8: av_log (log.c:375)
> >==16990==by 0x42B964: term_exit (ffmpeg.c:317)
> >==16990==by 0x42C64B: ffmpeg_cleanup (ffmpeg.c:618)
> >==16990==by 0x42483F: exit_program (cmdutils.c:138)
> >==16990==by 0x415469: open_input_file (ffmpeg_opt.c:1065)
> >==16990==by 0x41F0F9: open_files (ffmpeg_opt.c:3278)
> >==16990==by 0x41F28B: ffmpeg_parse_options (ffmpeg_opt.c:3318)
> >==16990==by 0x43D263: main (ffmpeg.c:4794)
> >
> >
> >
> >
> 
> Something seems off with the valgrind output.  For example, the
> first warning:
> 
> ==16990== Conditional jump or move depends on uninitialised value(s)
> ==16990==at 0x6C518B: search_frag_moof_offset (mov.c:1227)
> 
> Line 12

Re: [FFmpeg-devel] [FFmpeg-cvslog] Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

2017-10-12 Thread James Almer
On 10/12/2017 1:56 PM, Michael Niedermayer wrote:
> On Wed, Oct 11, 2017 at 10:30:13PM -0300, James Almer wrote:
>> On 10/11/2017 9:22 PM, Michael Niedermayer wrote:
>>> On Wed, Oct 11, 2017 at 09:26:18PM +, James Almer wrote:
 ffmpeg | branch: master | James Almer  | Wed Oct 11 
 17:55:25 2017 -0300| [6dfcbd80ad446ff163b47f2bf432bbf706436ea8] | 
 committer: James Almer

 Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

 * commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63':
   build: Fine-grained link-time dependency settings

 Also included are bug fix commits 5ff3b5cafcc685b6936d16602b0f80aa09a95870,
 d9da7151eef7fc469787e7298196cea291acfd82 and
 5e27ef800bfa2be17a6353ddedac6b7400e4624f.

 Merged-by: James Almer 

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

  Makefile|   3 +-
  configure   | 297 
 +---
  ffbuild/common.mak  |   2 +-
  ffbuild/library.mak |   2 +-
  tests/checkasm/Makefile |   2 +-
  5 files changed, 187 insertions(+), 119 deletions(-)
>>>
>>> This breaks build here (linux x86-64)
>>>
>>> ./configure --enable-libxavs --enable-gpl
>>> ERROR: libxavs not found
>>>
>>> Iam trying to test most patches for FFmpeg before they are pushed, but
>>> i can only test what is posted for review on ffmpeg-devel ...
>>
>> Testing locally i see it's complaining about missing pthreads and libm
>> ldflag, since they of course are not part of the global extralibs anymore.
>> Switching detection to pkg-config would be ideal, but for some reason
>> even the supplied .pc file doesn't include the -lm ldflag, only the
>> pthreads one, and libxavs looks like it hasn't been updated for six
>> years now (at least the one in sourceforge), so it's unlikely to be
>> fixed on their end.
>>
>> Can you test the attached patch?
> 
> seems to fix it

Pushed then. Thanks.

> but i get a build failure with fontconfig now:
> 
> ../configure  --enable-fontconfig  && make -j12
> 
> LD  ffmpeg_g
> libavfilter/libavfilter.a(avf_showcqt.o): In function `render_fontconfig':
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:606: undefined reference to 
> `FcInitLoadConfigAndFonts'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:611: undefined reference to 
> `FcNameParse'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:617: undefined reference to 
> `FcDefaultSubstitute'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:619: undefined reference to 
> `FcConfigSubstitute'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:626: undefined reference to 
> `FcFontMatch'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:627: undefined reference to 
> `FcPatternDestroy'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:643: undefined reference to 
> `FcPatternDestroy'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:644: undefined reference to 
> `FcConfigDestroy'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:621: undefined reference to 
> `FcPatternDestroy'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:622: undefined reference to 
> `FcConfigDestroy'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:635: undefined reference to 
> `FcPatternGetString'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:613: undefined reference to 
> `FcConfigDestroy'
> collect2: error: ld returned 1 exit status
> make: *** [ffmpeg_g] Error 1

That'd be because showcqt is missing its fontconfig and freetype deps in
configure, a mistake that was hidden by extralibs being global before
this merge.

Does the attached patch fix it?
From 4043aa1b28dfe6a86a1d68884da6716d18c93b4b Mon Sep 17 00:00:00 2001
From: James Almer 
Date: Thu, 12 Oct 2017 14:17:43 -0300
Subject: [PATCH] configure: add missing libfontconfig and libfreetype
 dependencies to showcqt filter

Signed-off-by: James Almer 
---
 configure | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configure b/configure
index 2de19fab0f..211ce9e33b 100755
--- a/configure
+++ b/configure
@@ -3267,6 +3267,7 @@ scale_filter_deps="swscale"
 scale_qsv_filter_deps="libmfx"
 select_filter_select="pixelutils"
 showcqt_filter_deps="avcodec avformat swscale"
+showcqt_filter_suggest="libfontconfig libfreetype"
 showcqt_filter_select="fft"
 showfreqs_filter_deps="avcodec"
 showfreqs_filter_select="fft"
-- 
2.14.2

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


Re: [FFmpeg-devel] [PATCH] mov: fix decode of fragments that overlap in time

2017-10-12 Thread John Stebbins
On 10/12/2017 10:22 AM, Michael Niedermayer wrote:
> On Wed, Oct 11, 2017 at 10:56:41PM -0700, John Stebbins wrote:
>> On 10/11/2017 06:25 PM, Michael Niedermayer wrote:
>>> On Tue, Oct 10, 2017 at 06:11:08PM -0700, John Stebbins wrote:
 When keyframe intervals of dash segments are not perfectly aligned,
 fragments in the stream can overlap in time. The previous sorting by
 timestamp causes packets to be read out of decode order and results
 in decode errors.

 Insert new "trun" index entries into index_entries in the order that
 the trun are referenced by the sidx.
 ---
  libavformat/isom.h |  26 +-
  libavformat/mov.c  | 684 
 -
  2 files changed, 485 insertions(+), 225 deletions(-)
>>> This still crashes: (not sure i can share the file, tell me if the
>>> valgrind output is enough)
>>>
>>> ==16990== Conditional jump or move depends on uninitialised value(s)
>>> ==16990==at 0x6C518B: search_frag_moof_offset (mov.c:1227)
>>> ==16990==by 0x6C543D: update_frag_index (mov.c:1318)
>>> ==16990==by 0x6D4F77: read_tfra (mov.c:6384)
>>> ==16990==by 0x6D51EF: mov_read_mfra (mov.c:6432)
>>> ==16990==by 0x6C57F7: mov_read_moof (mov.c:1384)
>>> ==16990==by 0x6D38E5: mov_read_default (mov.c:5949)
>>> ==16990==by 0x6D5395: mov_read_header (mov.c:6473)
>>> ==16990==by 0x7AB6FA: avformat_open_input (utils.c:595)
>>> ==16990==by 0x41540A: open_input_file (ffmpeg_opt.c:1060)
>>> ==16990==by 0x41F0F9: open_files (ffmpeg_opt.c:3278)
>>> ==16990==by 0x41F28B: ffmpeg_parse_options (ffmpeg_opt.c:3318)
>>> ==16990==by 0x43D263: main (ffmpeg.c:4794)
>>> ==16990==
>>> [mov,mp4,m4a,3gp,3g2,mj2 @ 0x1187f060] wav header size < 14 is not 
>>> implemented. Update your FFmpeg version to the newest one from Git. If the 
>>> problem still occurs, it means that your file has a feature which has not 
>>> been implemented.
>>> [mov,mp4,m4a,3gp,3g2,mj2 @ 0x1187f060] If you want to help, upload a sample 
>>> of this file to ftp://upload.ffmpeg.org/incoming/ and contact the 
>>> ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org)
>>> [mov,mp4,m4a,3gp,3g2,mj2 @ 0x1187f060] get_wav_header failed
>>> [mov,mp4,m4a,3gp,3g2,mj2 @ 0x1187f060] error reading header
>>> ==16990==at 0x117D019: VALGRIND_PRINTF_BACKTRACE (valgrind.h:4550)
>>> ==16990==by 0x117DA89: av_log_default_callback (log.c:355)
>>> ==16990==by 0x117DC28: av_vlog (log.c:383)
>>> ==16990==by 0x117DBE8: av_log (log.c:375)
>>> ==16990==by 0x6D53C2: mov_read_header (mov.c:6474)
>>> ==16990==by 0x7AB6FA: avformat_open_input (utils.c:595)
>>> ==16990==by 0x41540A: open_input_file (ffmpeg_opt.c:1060)
>>> ==16990==by 0x41F0F9: open_files (ffmpeg_opt.c:3278)
>>> ==16990==by 0x41F28B: ffmpeg_parse_options (ffmpeg_opt.c:3318)
>>> ==16990==by 0x43D263: main (ffmpeg.c:4794)
>>> ==16990== Conditional jump or move depends on uninitialised value(s)
>>> ==16990==at 0x4C2B58C: free (vg_replace_malloc.c:446)
>>> ==16990==by 0x11807BD: av_free (mem.c:209)
>>> ==16990==by 0x11807F5: av_freep (mem.c:219)
>>> ==16990==by 0x6D4CA9: mov_read_close (mov.c:6303)
>>> ==16990==by 0x6D53D1: mov_read_header (mov.c:6475)
>>> ==16990==by 0x7AB6FA: avformat_open_input (utils.c:595)
>>> ==16990==by 0x41540A: open_input_file (ffmpeg_opt.c:1060)
>>> ==16990==by 0x41F0F9: open_files (ffmpeg_opt.c:3278)
>>> ==16990==by 0x41F28B: ffmpeg_parse_options (ffmpeg_opt.c:3318)
>>> ==16990==by 0x43D263: main (ffmpeg.c:4794)
>>> ==16990==
>>> test.mp4: Invalid data found when processing input
>>> ==16990==at 0x117D019: VALGRIND_PRINTF_BACKTRACE (valgrind.h:4550)
>>> ==16990==by 0x117DA89: av_log_default_callback (log.c:355)
>>> ==16990==by 0x117DC28: av_vlog (log.c:383)
>>> ==16990==by 0x117DBE8: av_log (log.c:375)
>>> ==16990==by 0x4274D1: print_error (cmdutils.c:1058)
>>> ==16990==by 0x415430: open_input_file (ffmpeg_opt.c:1062)
>>> ==16990==by 0x41F0F9: open_files (ffmpeg_opt.c:3278)
>>> ==16990==by 0x41F28B: ffmpeg_parse_options (ffmpeg_opt.c:3318)
>>> ==16990==by 0x43D263: main (ffmpeg.c:4794)
>>> ==16990==at 0x117D019: VALGRIND_PRINTF_BACKTRACE (valgrind.h:4550)
>>> ==16990==by 0x117DA89: av_log_default_callback (log.c:355)
>>> ==16990==by 0x117DC28: av_vlog (log.c:383)
>>> ==16990==by 0x117DBE8: av_log (log.c:375)
>>> ==16990==by 0x42B964: term_exit (ffmpeg.c:317)
>>> ==16990==by 0x42C64B: ffmpeg_cleanup (ffmpeg.c:618)
>>> ==16990==by 0x42483F: exit_program (cmdutils.c:138)
>>> ==16990==by 0x415469: open_input_file (ffmpeg_opt.c:1065)
>>> ==16990==by 0x41F0F9: open_files (ffmpeg_opt.c:3278)
>>> ==16990==by 0x41F28B: ffmpeg_parse_options (ffmpeg_opt.c:3318)
>>> ==16990==by 0x43D263: main (ffmpeg.c:4794)
>>>
>>>
>>>
>>>
>> Something seems off with the valgrind output.  For example, the
>> first warning:
>>
>> ==16990== Condit

[FFmpeg-devel] [PATCH] mov: fix decode of fragments that overlap in time

2017-10-12 Thread John Stebbins
When keyframe intervals of dash segments are not perfectly aligned,
fragments in the stream can overlap in time. The previous sorting by
timestamp causes packets to be read out of decode order and results
in decode errors.

Insert new "trun" index entries into index_entries in the order that
the trun are referenced by the sidx.
---
 libavformat/isom.h |  26 +-
 libavformat/mov.c  | 684 -
 2 files changed, 485 insertions(+), 225 deletions(-)

diff --git a/libavformat/isom.h b/libavformat/isom.h
index b9380e9dcc..395d20d25c 100644
--- a/libavformat/isom.h
+++ b/libavformat/isom.h
@@ -93,7 +93,6 @@ typedef struct MOVFragment {
 unsigned duration;
 unsigned size;
 unsigned flags;
-int64_t time;
 } MOVFragment;
 
 typedef struct MOVTrackExt {
@@ -109,17 +108,28 @@ typedef struct MOVSbgp {
 unsigned int index;
 } MOVSbgp;
 
+typedef struct MOVFragmentStreamInfo {
+int id;
+int64_t sidx_pts;
+int64_t first_tfra_pts;
+int64_t tfdt_dts;
+int index_entry;
+} MOVFragmentStreamInfo;
+
 typedef struct MOVFragmentIndexItem {
 int64_t moof_offset;
-int64_t time;
 int headers_read;
+int current;
+int nb_stream_info;
+MOVFragmentStreamInfo * stream_info;
 } MOVFragmentIndexItem;
 
 typedef struct MOVFragmentIndex {
-unsigned track_id;
-unsigned item_count;
-unsigned current_item;
-MOVFragmentIndexItem *items;
+int allocated_size;
+int complete;
+int current;
+int nb_items;
+MOVFragmentIndexItem * item;
 } MOVFragmentIndex;
 
 typedef struct MOVIndexRange {
@@ -250,9 +260,7 @@ typedef struct MOVContext {
 int moov_retry;
 int use_mfra_for;
 int has_looked_for_mfra;
-MOVFragmentIndex** fragment_index_data;
-unsigned fragment_index_count;
-int fragment_index_complete;
+MOVFragmentIndex frag_index;
 int atom_depth;
 unsigned int aax_mode;  ///< 'aax' file has been detected
 uint8_t file_key[20];
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 899690d920..d6d2c813a8 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1168,6 +1168,211 @@ static int mov_read_moov(MOVContext *c, AVIOContext 
*pb, MOVAtom atom)
 return 0; /* now go for mdat */
 }
 
+static MOVFragmentStreamInfo * get_frag_stream_info(
+MOVFragmentIndex *frag_index,
+int index,
+int id)
+{
+int i;
+MOVFragmentIndexItem * item;
+
+if (index < 0 || index >= frag_index->nb_items)
+return NULL;
+item = &frag_index->item[index];
+for (i = 0; i < item->nb_stream_info; i++)
+if (item->stream_info[i].id == id)
+return &item->stream_info[i];
+
+// This shouldn't happen
+return NULL;
+}
+
+static void set_frag_stream(MOVFragmentIndex *frag_index, int id)
+{
+int i;
+MOVFragmentIndexItem * item;
+
+if (frag_index->current < 0 ||
+frag_index->current >= frag_index->nb_items)
+return;
+
+item = &frag_index->item[frag_index->current];
+for (i = 0; i < item->nb_stream_info; i++)
+if (item->stream_info[i].id == id) {
+item->current = i;
+return;
+}
+
+// id not found.  This shouldn't happen.
+item->current = -1;
+}
+
+static MOVFragmentStreamInfo * get_current_frag_stream_info(
+MOVFragmentIndex *frag_index)
+{
+MOVFragmentIndexItem * item = &frag_index->item[frag_index->current];
+if (item->current >= 0 && item->current < item->nb_stream_info)
+return &item->stream_info[item->current];
+
+// This shouldn't happen
+return NULL;
+}
+
+static int search_frag_moof_offset(MOVFragmentIndex *frag_index, int64_t 
offset)
+{
+int a, b, m;
+int64_t moof_offset;
+
+// Optimize for appending new entries
+if (!frag_index->nb_items ||
+frag_index->item[frag_index->nb_items - 1].moof_offset < offset)
+return frag_index->nb_items;
+
+a = -1;
+b = frag_index->nb_items;
+
+while (b - a > 1) {
+m = (a + b) >> 1;
+moof_offset = frag_index->item[m].moof_offset;
+if (moof_offset >= offset)
+b = m;
+if (moof_offset <= offset)
+a = m;
+}
+return b;
+}
+
+static int64_t get_stream_info_time(MOVFragmentStreamInfo * frag_stream_info)
+{
+
+if (frag_stream_info) {
+if (frag_stream_info->sidx_pts != AV_NOPTS_VALUE)
+return frag_stream_info->sidx_pts;
+if (frag_stream_info->first_tfra_pts != AV_NOPTS_VALUE)
+return frag_stream_info->first_tfra_pts;
+if (frag_stream_info->tfdt_dts != AV_NOPTS_VALUE)
+return frag_stream_info->tfdt_dts;
+}
+return AV_NOPTS_VALUE;
+}
+
+static int64_t get_frag_time(MOVFragmentIndex *frag_index,
+ int index, int track_id)
+{
+MOVFragmentStreamInfo * frag_stream_info;
+int64_t timestamp;
+int i;
+
+if (track_id >= 0) {
+frag_stream_info = get_frag_stream_info(frag_index,

Re: [FFmpeg-devel] [FFmpeg-cvslog] Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

2017-10-12 Thread Helmut K. C. Tessarek
I'm not sure why you guys have to make all these changes to the build
process lately.

All of a sudden ffmpeg does not compile anymore. During configure I get:

ERROR: libbluray not found using pkg-config

which worked perfectly 2 days ago. So, whatever changes you made, they
screwed up other things.
I'm doing the snapshots for OSX and I'm currently having a lot of issues
fixing the build problems in my scripts. Currently I am not able to
compile a valid build.


-- 
regards Helmut K. C. Tessarek  KeyID 0xF7832007C11F128D
Key fingerprint = 28A3 1666 4FE8 D72C CFD5 8B23 F783 2007 C11F 128D

/*
   Thou shalt not follow the NULL pointer for chaos and madness
   await thee at its end.
*/
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [FFmpeg-cvslog] Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

2017-10-12 Thread James Almer
On 10/12/2017 3:11 PM, Helmut K. C. Tessarek wrote:
> I'm not sure why you guys have to make all these changes to the build
> process lately.

It's part of a cleaning process. It's specifically left out of the 3.4
release since breakages like this were a possibility. I'm fixing them as
they are reported.

> 
> All of a sudden ffmpeg does not compile anymore. During configure I get:
> 
> ERROR: libbluray not found using pkg-config
> 
> which worked perfectly 2 days ago. So, whatever changes you made, they
> screwed up other things.
> I'm doing the snapshots for OSX and I'm currently having a lot of issues
> fixing the build problems in my scripts. Currently I am not able to
> compile a valid build.

Can you open a bug in http://trac.ffmpeg.org/ and attach your config.log
there? Also, what are the contents of the .pc file for libbluray? It
sounds like it's missing some dependencies and might have to be reported
to their bug tracker.

Mac builds are something I've been trying to debug, especially when
linking libavutil if videotoolbox is enabled, but i haven't gotten much
help in that regard so far and i lack such a system, so if you can
provide which configure command lines are failing and the corresponding
config.log output for them it would be really helpful.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [FFmpeg-cvslog] Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

2017-10-12 Thread Helmut K. C. Tessarek
On 2017-10-12 13:25, James Almer wrote:
> That'd be because showcqt is missing its fontconfig and freetype deps in
> configure, a mistake that was hidden by extralibs being global before
> this merge.

This does not seem to be the only mistake in configure.

It looks like there are dependencies missing for freetype as well:


BEGIN
/var/folders/vy/kxs_g1ls45j727l50qsk17csgtbq59/T//ffconf.0jMRbTUA/test.c
1   #include 
2   #include 
3   long check_bd_open(void) { return (long) bd_open; }
4   int main(void) { int ret = 0;
5ret |= ((intptr_t)check_bd_open) & 0x;
6   return ret; }
END /var/folders/vy/kxs_g1ls45j727l50qsk17csgtbq59/T//ffconf.0jMRbTUA/test.c
/usr/bin/clang -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -I$(SRC_PATH)/compat/dispatch_semaphore -DPIC
-I/Users/Shared/ffmpeg/sw/include -arch x86_64
-L/Users/Shared/ffmpeg/sw/lib -std=c11 -fomit-frame-pointer -fPIC
-pthread -I/Users/Shared/ffmpeg/sw/include
-I/Users/Shared/ffmpeg/sw/include/freetype2
-I/Users/Shared/ffmpeg/sw/include
-I/Users/Shared/ffmpeg/sw/include/fribidi
-I/Users/Shared/ffmpeg/sw/include/freetype2
-I/Users/Shared/ffmpeg/sw/include -I/Users/Shared/ffmpeg/sw/include
-L/Users/Shared/ffmpeg/sw/lib -c -o
/var/folders/vy/kxs_g1ls45j727l50qsk17csgtbq59/T//ffconf.0jMRbTUA/test.o
/var/folders/vy/kxs_g1ls45j727l50qsk17csgtbq59/T//ffconf.0jMRbTUA/test.c
clang: warning: argument unused during compilation:
'-L/Users/Shared/ffmpeg/sw/lib'
clang: warning: argument unused during compilation:
'-L/Users/Shared/ffmpeg/sw/lib'
/usr/bin/clang -L/Users/Shared/ffmpeg/sw/lib
-I/Users/Shared/ffmpeg/sw/include -arch x86_64
-L/Users/Shared/ffmpeg/sw/lib -lstdc++ -lass -lfontconfig -lexpat -lenca
-lfribidi -lfreetype -framework CoreText
-Wl,-dynamic,-search_paths_first -I/Users/Shared/ffmpeg/sw/include
-L/Users/Shared/ffmpeg/sw/lib -o
/var/folders/vy/kxs_g1ls45j727l50qsk17csgtbq59/T//ffconf.0jMRbTUA/test
/var/folders/vy/kxs_g1ls45j727l50qsk17csgtbq59/T//ffconf.0jMRbTUA/test.o
-lbluray
Undefined symbols for architecture x86_64:
  "_BZ2_bzDecompress", referenced from:
  _ft_bzip2_file_fill_output in libfreetype.a(ftbzip2.o)
  "_BZ2_bzDecompressEnd", referenced from:
  _ft_bzip2_file_reset in libfreetype.a(ftbzip2.o)
  _ft_bzip2_file_done in libfreetype.a(ftbzip2.o)
  "_BZ2_bzDecompressInit", referenced from:
  _ft_bzip2_file_init in libfreetype.a(ftbzip2.o)
  _ft_bzip2_file_reset in libfreetype.a(ftbzip2.o)
  "_inflate", referenced from:
  _FT_Gzip_Uncompress in libfreetype.a(ftgzip.o)
  _ft_gzip_file_fill_output in libfreetype.a(ftgzip.o)
  "_inflateEnd", referenced from:
  _ft_gzip_file_done in libfreetype.a(ftgzip.o)
  _FT_Gzip_Uncompress in libfreetype.a(ftgzip.o)
  "_inflateInit2_", referenced from:
  _ft_gzip_file_init in libfreetype.a(ftgzip.o)
  _FT_Gzip_Uncompress in libfreetype.a(ftgzip.o)
  "_inflateReset", referenced from:
  _ft_gzip_file_reset in libfreetype.a(ftgzip.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
ERROR: libbluray not found using pkg-config






-- 
regards Helmut K. C. Tessarek  KeyID 0xF7832007C11F128D
Key fingerprint = 28A3 1666 4FE8 D72C CFD5 8B23 F783 2007 C11F 128D

/*
   Thou shalt not follow the NULL pointer for chaos and madness
   await thee at its end.
*/
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [FFmpeg-cvslog] Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

2017-10-12 Thread Helmut K. C. Tessarek
On 2017-10-12 14:19, James Almer wrote:
> Can you open a bug in http://trac.ffmpeg.org/ and attach your config.log
> there? Also, what are the contents of the .pc file for libbluray? It
> sounds like it's missing some dependencies and might have to be reported
> to their bug tracker.

I can, but I believe it's no a libbluray issue after all. I sent a
separate reply. Dependency issues with freetype???

> Mac builds are something I've been trying to debug, especially when
> linking libavutil if videotoolbox is enabled, but i haven't gotten much
> help in that regard so far and i lack such a system, so if you can
> provide which configure command lines are failing and the corresponding
> config.log output for them it would be really helpful.

I'm rather busy, and creating my compile script is an ongoing process
which I have been maintaining for the last 6 years.
But if you send me exact steps to test something (and I can automate
this somehow), then I can provide you feedback.

-- 
regards Helmut K. C. Tessarek  KeyID 0xF7832007C11F128D
Key fingerprint = 28A3 1666 4FE8 D72C CFD5 8B23 F783 2007 C11F 128D

/*
   Thou shalt not follow the NULL pointer for chaos and madness
   await thee at its end.
*/
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [FFmpeg-cvslog] Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

2017-10-12 Thread wm4
On Thu, 12 Oct 2017 14:28:01 -0400
"Helmut K. C. Tessarek"  wrote:

> I'm rather busy, and creating my compile script is an ongoing process
> which I have been maintaining for the last 6 years.

Probably better not to use bleeding edge git master, then.

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


Re: [FFmpeg-devel] [FFmpeg-cvslog] Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

2017-10-12 Thread Clément Bœsch
On Thu, Oct 12, 2017 at 02:22:08PM -0400, Helmut K. C. Tessarek wrote:
> On 2017-10-12 13:25, James Almer wrote:
> > That'd be because showcqt is missing its fontconfig and freetype deps in
> > configure, a mistake that was hidden by extralibs being global before
> > this merge.
> 
> This does not seem to be the only mistake in configure.
> 
> It looks like there are dependencies missing for freetype as well:
> 

what's your configure line?

how is freetype built?

-- 
Clément B.


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


Re: [FFmpeg-devel] [FFmpeg-cvslog] Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

2017-10-12 Thread Michael Niedermayer
On Thu, Oct 12, 2017 at 02:25:46PM -0300, James Almer wrote:
> On 10/12/2017 1:56 PM, Michael Niedermayer wrote:
> > On Wed, Oct 11, 2017 at 10:30:13PM -0300, James Almer wrote:
> >> On 10/11/2017 9:22 PM, Michael Niedermayer wrote:
> >>> On Wed, Oct 11, 2017 at 09:26:18PM +, James Almer wrote:
>  ffmpeg | branch: master | James Almer  | Wed Oct 11 
>  17:55:25 2017 -0300| [6dfcbd80ad446ff163b47f2bf432bbf706436ea8] | 
>  committer: James Almer
> 
>  Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'
> 
>  * commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63':
>    build: Fine-grained link-time dependency settings
> 
>  Also included are bug fix commits 
>  5ff3b5cafcc685b6936d16602b0f80aa09a95870,
>  d9da7151eef7fc469787e7298196cea291acfd82 and
>  5e27ef800bfa2be17a6353ddedac6b7400e4624f.
> 
>  Merged-by: James Almer 
> 
> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6dfcbd80ad446ff163b47f2bf432bbf706436ea8
>  ---
> 
>   Makefile|   3 +-
>   configure   | 297 
>  +---
>   ffbuild/common.mak  |   2 +-
>   ffbuild/library.mak |   2 +-
>   tests/checkasm/Makefile |   2 +-
>   5 files changed, 187 insertions(+), 119 deletions(-)
> >>>
> >>> This breaks build here (linux x86-64)
> >>>
> >>> ./configure --enable-libxavs --enable-gpl
> >>> ERROR: libxavs not found
> >>>
> >>> Iam trying to test most patches for FFmpeg before they are pushed, but
> >>> i can only test what is posted for review on ffmpeg-devel ...
> >>
> >> Testing locally i see it's complaining about missing pthreads and libm
> >> ldflag, since they of course are not part of the global extralibs anymore.
> >> Switching detection to pkg-config would be ideal, but for some reason
> >> even the supplied .pc file doesn't include the -lm ldflag, only the
> >> pthreads one, and libxavs looks like it hasn't been updated for six
> >> years now (at least the one in sourceforge), so it's unlikely to be
> >> fixed on their end.
> >>
> >> Can you test the attached patch?
> > 
> > seems to fix it
> 
> Pushed then. Thanks.
> 
> > but i get a build failure with fontconfig now:
> > 
> > ../configure  --enable-fontconfig  && make -j12
> > 
> > LD  ffmpeg_g
> > libavfilter/libavfilter.a(avf_showcqt.o): In function `render_fontconfig':
> > ffmpeg/nasm/src/libavfilter/avf_showcqt.c:606: undefined reference to 
> > `FcInitLoadConfigAndFonts'
> > ffmpeg/nasm/src/libavfilter/avf_showcqt.c:611: undefined reference to 
> > `FcNameParse'
> > ffmpeg/nasm/src/libavfilter/avf_showcqt.c:617: undefined reference to 
> > `FcDefaultSubstitute'
> > ffmpeg/nasm/src/libavfilter/avf_showcqt.c:619: undefined reference to 
> > `FcConfigSubstitute'
> > ffmpeg/nasm/src/libavfilter/avf_showcqt.c:626: undefined reference to 
> > `FcFontMatch'
> > ffmpeg/nasm/src/libavfilter/avf_showcqt.c:627: undefined reference to 
> > `FcPatternDestroy'
> > ffmpeg/nasm/src/libavfilter/avf_showcqt.c:643: undefined reference to 
> > `FcPatternDestroy'
> > ffmpeg/nasm/src/libavfilter/avf_showcqt.c:644: undefined reference to 
> > `FcConfigDestroy'
> > ffmpeg/nasm/src/libavfilter/avf_showcqt.c:621: undefined reference to 
> > `FcPatternDestroy'
> > ffmpeg/nasm/src/libavfilter/avf_showcqt.c:622: undefined reference to 
> > `FcConfigDestroy'
> > ffmpeg/nasm/src/libavfilter/avf_showcqt.c:635: undefined reference to 
> > `FcPatternGetString'
> > ffmpeg/nasm/src/libavfilter/avf_showcqt.c:613: undefined reference to 
> > `FcConfigDestroy'
> > collect2: error: ld returned 1 exit status
> > make: *** [ffmpeg_g] Error 1
> 
> That'd be because showcqt is missing its fontconfig and freetype deps in
> configure, a mistake that was hidden by extralibs being global before
> this merge.
> 
> Does the attached patch fix it?

it seems so but it just results in the next failure

make distclean ; ../configure --build-suffix=asterix && make -j12

LD  ffmpeg_g
fftools/ffmpeg_opt.o: In function `new_output_stream':
ffmpeg/linux32/src/fftools/ffmpeg_opt.c:1334: undefined reference to 
`avcodec_parameters_alloc'
ffmpeg/linux32/src/fftools/ffmpeg_opt.c:1421: undefined reference to 
`av_bsf_get_by_name'
ffmpeg/linux32/src/fftools/ffmpeg_opt.c:1433: undefined reference to 
`av_bsf_alloc'
fftools/ffmpeg_opt.o: In function `opt_init_hw_device':
ffmpeg/linux32/src/fftools/ffmpeg_opt.c:513: undefined reference to 
`av_hwdevice_get_type_name'
ffmpeg/linux32/src/fftools/ffmpeg_opt.c:511: undefined reference to 
`av_hwdevice_iterate_types'
fftools/ffmpeg_opt.o: In function `new_output_stream':
ffmpeg/linux32/src/fftools/ffmpeg_opt.c:1334: undefined reference to 
`avcodec_parameters_alloc'
ffmpeg/linux32/src/fftools/ffmpeg_opt.c:1421: undefined reference to 
`av_bsf_get_by_name'
ffmpeg/linux32/src/fftools/ffmpeg_opt.c:1433: undefined reference to 
`av_bsf_alloc'
fftools/ffmpeg_opt.o: In function `add_input_streams':
ffmpeg/linux32/s

Re: [FFmpeg-devel] [PATCH] ffmpeg.c: Fallback to duration_dts, when duration_pts can't be determined.

2017-10-12 Thread Sasi Inguva
I can initialize duration_pts to -1, and check against duration_pts < 0 ,
if you think that's better.

On Thu, Oct 12, 2017 at 3:51 AM, wm4  wrote:

> On Thu, 12 Oct 2017 01:28:01 +0200
> Michael Niedermayer  wrote:
>
> > On Tue, Oct 10, 2017 at 10:26:13PM +0200, Thomas Mundt wrote:
> > > 2017-10-10 19:36 GMT+02:00 Sasi Inguva  >:
> > >
> > > > This is required for FLV files, for which duration_pts comes out to
> be
> > > > zero.
> > > >
> > > > Signed-off-by: Sasi Inguva 
> > > > ---
> > > >  fftools/ffmpeg.c | 9 +++--
> > > >  1 file changed, 7 insertions(+), 2 deletions(-)
> > > >
> > > > diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
> > > > index 6d64bc1043..3ee31473dc 100644
> > > > --- a/fftools/ffmpeg.c
> > > > +++ b/fftools/ffmpeg.c
> > > > @@ -2665,8 +2665,13 @@ static int process_input_packet(InputStream
> *ist,
> > > > const AVPacket *pkt, int no_eo
> > > >  ist->next_dts = AV_NOPTS_VALUE;
> > > >  }
> > > >
> > > > -if (got_output)
> > > > -ist->next_pts += av_rescale_q(duration_pts,
> > > > ist->st->time_base, AV_TIME_BASE_Q);
> > > > +if (got_output) {
> > > > +if (duration_pts > 0) {
> > > > +ist->next_pts += av_rescale_q(duration_pts,
> > > > ist->st->time_base, AV_TIME_BASE_Q);
> > > > +} else {
> > > > +ist->next_pts += duration_dts;
> > > > +}
> > > > +}
> > > >  break;
> > > >  case AVMEDIA_TYPE_SUBTITLE:
> > > >  if (repeating)
> > > > --
> > > >
> > >
> > > Patch LGTM.
> >
> > will apply
>
> I don't feel like this was sufficiently discussed.
> ___
> 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


Re: [FFmpeg-devel] [FFmpeg-cvslog] Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

2017-10-12 Thread Helmut K. C. Tessarek
On 2017-10-12 14:53, wm4 wrote:
> Probably better not to use bleeding edge git master, then.

Hmm, kind of detrimental when I provide snapshots almost daily.

-- 
regards Helmut K. C. Tessarek  KeyID 0xF7832007C11F128D
Key fingerprint = 28A3 1666 4FE8 D72C CFD5 8B23 F783 2007 C11F 128D

/*
   Thou shalt not follow the NULL pointer for chaos and madness
   await thee at its end.
*/
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [FFmpeg-cvslog] Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

2017-10-12 Thread Helmut K. C. Tessarek
I'm building ffmpeg for the last 6 years and provide snapshots and
releases for OSX.

On 2017-10-12 15:00, Clément Bœsch wrote:
> what's your configure line?

./configure --cc=/usr/bin/clang --prefix=/opt/ffmpeg
--extra-version=tessus --enable-avisynth --enable-fontconfig
--enable-gpl --enable-libass --enable-libbluray --enable-libfreetype
--enable-libgsm --enable-libmodplug --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus
--enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora
--enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis
--enable-libvpx --enable-libwavpack --enable-libx264 --enable-libx265
--enable-libxavs --enable-libxvid --enable-libzmq --enable-libzvbi
--enable-version3 --disable-ffplay

> how is freetype built?
./configure --prefix=${TARGET} --without-png --disable-shared
--enable-static --with-harfbuzz=no


Please note that I build static ffmpeg binaries and I have an isolated
dev env, so that no other libs than system libs and libs that I have
compiled are used.

I also had to set the following to satisfy build dependency issues due
to errors in the build process (wrong dependencies in configure and/or
pkg_config files).

export LDFLAGS="$LDFLAGS -lstdc++ -lass -lfontconfig -lexpat -lenca
-lfribidi -lfreetype -framework CoreText"

I'm pretty sure I can fix my problem by just adding all libraries that
can't be found to LDFLAGS, but this is just a workaround and does not
solve the root problem.

e.g. why do I have to specify libfontconfig manually, although the
fontconfig.pc is perfectly valid? That was a rhetorical question.

The build process has been broken forever and it is still broken.
Otherwise I would not have to set any of the LDFLAGS manually.


-- 
regards Helmut K. C. Tessarek  KeyID 0xF7832007C11F128D
Key fingerprint = 28A3 1666 4FE8 D72C CFD5 8B23 F783 2007 C11F 128D

/*
   Thou shalt not follow the NULL pointer for chaos and madness
   await thee at its end.
*/
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [FFmpeg-cvslog] Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

2017-10-12 Thread James Almer
On 10/12/2017 4:25 PM, Michael Niedermayer wrote:
> On Thu, Oct 12, 2017 at 02:25:46PM -0300, James Almer wrote:
>> On 10/12/2017 1:56 PM, Michael Niedermayer wrote:
>>> On Wed, Oct 11, 2017 at 10:30:13PM -0300, James Almer wrote:
 On 10/11/2017 9:22 PM, Michael Niedermayer wrote:
> On Wed, Oct 11, 2017 at 09:26:18PM +, James Almer wrote:
>> ffmpeg | branch: master | James Almer  | Wed Oct 11 
>> 17:55:25 2017 -0300| [6dfcbd80ad446ff163b47f2bf432bbf706436ea8] | 
>> committer: James Almer
>>
>> Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'
>>
>> * commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63':
>>   build: Fine-grained link-time dependency settings
>>
>> Also included are bug fix commits 
>> 5ff3b5cafcc685b6936d16602b0f80aa09a95870,
>> d9da7151eef7fc469787e7298196cea291acfd82 and
>> 5e27ef800bfa2be17a6353ddedac6b7400e4624f.
>>
>> Merged-by: James Almer 
>>
>>> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6dfcbd80ad446ff163b47f2bf432bbf706436ea8
>> ---
>>
>>  Makefile|   3 +-
>>  configure   | 297 
>> +---
>>  ffbuild/common.mak  |   2 +-
>>  ffbuild/library.mak |   2 +-
>>  tests/checkasm/Makefile |   2 +-
>>  5 files changed, 187 insertions(+), 119 deletions(-)
>
> This breaks build here (linux x86-64)
>
> ./configure --enable-libxavs --enable-gpl
> ERROR: libxavs not found
>
> Iam trying to test most patches for FFmpeg before they are pushed, but
> i can only test what is posted for review on ffmpeg-devel ...

 Testing locally i see it's complaining about missing pthreads and libm
 ldflag, since they of course are not part of the global extralibs anymore.
 Switching detection to pkg-config would be ideal, but for some reason
 even the supplied .pc file doesn't include the -lm ldflag, only the
 pthreads one, and libxavs looks like it hasn't been updated for six
 years now (at least the one in sourceforge), so it's unlikely to be
 fixed on their end.

 Can you test the attached patch?
>>>
>>> seems to fix it
>>
>> Pushed then. Thanks.
>>
>>> but i get a build failure with fontconfig now:
>>>
>>> ../configure  --enable-fontconfig  && make -j12
>>>
>>> LD  ffmpeg_g
>>> libavfilter/libavfilter.a(avf_showcqt.o): In function `render_fontconfig':
>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:606: undefined reference to 
>>> `FcInitLoadConfigAndFonts'
>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:611: undefined reference to 
>>> `FcNameParse'
>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:617: undefined reference to 
>>> `FcDefaultSubstitute'
>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:619: undefined reference to 
>>> `FcConfigSubstitute'
>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:626: undefined reference to 
>>> `FcFontMatch'
>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:627: undefined reference to 
>>> `FcPatternDestroy'
>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:643: undefined reference to 
>>> `FcPatternDestroy'
>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:644: undefined reference to 
>>> `FcConfigDestroy'
>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:621: undefined reference to 
>>> `FcPatternDestroy'
>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:622: undefined reference to 
>>> `FcConfigDestroy'
>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:635: undefined reference to 
>>> `FcPatternGetString'
>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:613: undefined reference to 
>>> `FcConfigDestroy'
>>> collect2: error: ld returned 1 exit status
>>> make: *** [ffmpeg_g] Error 1
>>
>> That'd be because showcqt is missing its fontconfig and freetype deps in
>> configure, a mistake that was hidden by extralibs being global before
>> this merge.
>>
>> Does the attached patch fix it?
> 
> it seems so

Will apply then. Thanks.

> but it just results in the next failure
> 
> make distclean ; ../configure --build-suffix=asterix && make -j12

This is not "the next failure" result of fixing showcqt. You're using a
completely different command line where showcqt would have shown no
issues even without the above fix.

> LD  ffmpeg_g
> fftools/ffmpeg_opt.o: In function `new_output_stream':
> ffmpeg/linux32/src/fftools/ffmpeg_opt.c:1334: undefined reference to 
> `avcodec_parameters_alloc'

Apparently buildsuf breaks dependencies somewhere by changing the
library names. At least here on mingw-64 i instead get

"ld.exe: cannot find -lav*" for every library, instead of undefined
references.

I'll take a look, but could nonetheless use some help.

> ffmpeg/linux32/src/fftools/ffmpeg_opt.c:1421: undefined reference to 
> `av_bsf_get_by_name'
> ffmpeg/linux32/src/fftools/ffmpeg_opt.c:1433: undefined reference to 
> `av_bsf_alloc'
> fftools/ffmpeg_opt.o: In function `opt_init_hw_device':
> ffmpeg/linux32/src/fftools/ffmpeg_opt.c:513: 

Re: [FFmpeg-devel] [FFmpeg-cvslog] Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

2017-10-12 Thread James Almer
On 10/12/2017 4:44 PM, Helmut K. C. Tessarek wrote:
> I'm building ffmpeg for the last 6 years and provide snapshots and
> releases for OSX.
> 
> On 2017-10-12 15:00, Clément Bœsch wrote:
>> what's your configure line?
> 
> ./configure --cc=/usr/bin/clang --prefix=/opt/ffmpeg
> --extra-version=tessus --enable-avisynth --enable-fontconfig
> --enable-gpl --enable-libass --enable-libbluray --enable-libfreetype
> --enable-libgsm --enable-libmodplug --enable-libmp3lame
> --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus
> --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora
> --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis
> --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libx265
> --enable-libxavs --enable-libxvid --enable-libzmq --enable-libzvbi
> --enable-version3 --disable-ffplay
> 
>> how is freetype built?
> ./configure --prefix=${TARGET} --without-png --disable-shared
> --enable-static --with-harfbuzz=no
> 
> 
> Please note that I build static ffmpeg binaries and I have an isolated
> dev env, so that no other libs than system libs and libs that I have
> compiled are used.
> 
> I also had to set the following to satisfy build dependency issues due
> to errors in the build process (wrong dependencies in configure and/or
> pkg_config files).
> 
> export LDFLAGS="$LDFLAGS -lstdc++ -lass -lfontconfig -lexpat -lenca
> -lfribidi -lfreetype -framework CoreText"

Sounds like pkg-config is not providing you with the required deps.
Since you're doing a static build with static external libraries, try
adding "--pkg-config-flags=--static" to your configure line.

> 
> I'm pretty sure I can fix my problem by just adding all libraries that
> can't be found to LDFLAGS, but this is just a workaround and does not
> solve the root problem.
> 
> e.g. why do I have to specify libfontconfig manually, although the
> fontconfig.pc is perfectly valid? That was a rhetorical question.

Adding --static to --pkg-config-flags might let you remove some of these
custom ldflags. But probably not all.

> 
> The build process has been broken forever and it is still broken.
> Otherwise I would not have to set any of the LDFLAGS manually.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [FFmpeg-cvslog] Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

2017-10-12 Thread Michael Niedermayer
On Thu, Oct 12, 2017 at 04:42:19PM -0300, James Almer wrote:
> On 10/12/2017 4:25 PM, Michael Niedermayer wrote:
> > On Thu, Oct 12, 2017 at 02:25:46PM -0300, James Almer wrote:
> >> On 10/12/2017 1:56 PM, Michael Niedermayer wrote:
> >>> On Wed, Oct 11, 2017 at 10:30:13PM -0300, James Almer wrote:
>  On 10/11/2017 9:22 PM, Michael Niedermayer wrote:
> > On Wed, Oct 11, 2017 at 09:26:18PM +, James Almer wrote:
> >> ffmpeg | branch: master | James Almer  | Wed Oct 11 
> >> 17:55:25 2017 -0300| [6dfcbd80ad446ff163b47f2bf432bbf706436ea8] | 
> >> committer: James Almer
> >>
> >> Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'
> >>
> >> * commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63':
> >>   build: Fine-grained link-time dependency settings
> >>
> >> Also included are bug fix commits 
> >> 5ff3b5cafcc685b6936d16602b0f80aa09a95870,
> >> d9da7151eef7fc469787e7298196cea291acfd82 and
> >> 5e27ef800bfa2be17a6353ddedac6b7400e4624f.
> >>
> >> Merged-by: James Almer 
> >>
> >>> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6dfcbd80ad446ff163b47f2bf432bbf706436ea8
> >> ---
> >>
> >>  Makefile|   3 +-
> >>  configure   | 297 
> >> +---
> >>  ffbuild/common.mak  |   2 +-
> >>  ffbuild/library.mak |   2 +-
> >>  tests/checkasm/Makefile |   2 +-
> >>  5 files changed, 187 insertions(+), 119 deletions(-)
> >
> > This breaks build here (linux x86-64)
> >
> > ./configure --enable-libxavs --enable-gpl
> > ERROR: libxavs not found
> >
> > Iam trying to test most patches for FFmpeg before they are pushed, but
> > i can only test what is posted for review on ffmpeg-devel ...
> 
>  Testing locally i see it's complaining about missing pthreads and libm
>  ldflag, since they of course are not part of the global extralibs 
>  anymore.
>  Switching detection to pkg-config would be ideal, but for some reason
>  even the supplied .pc file doesn't include the -lm ldflag, only the
>  pthreads one, and libxavs looks like it hasn't been updated for six
>  years now (at least the one in sourceforge), so it's unlikely to be
>  fixed on their end.
> 
>  Can you test the attached patch?
> >>>
> >>> seems to fix it
> >>
> >> Pushed then. Thanks.
> >>
> >>> but i get a build failure with fontconfig now:
> >>>
> >>> ../configure  --enable-fontconfig  && make -j12
> >>>
> >>> LD  ffmpeg_g
> >>> libavfilter/libavfilter.a(avf_showcqt.o): In function `render_fontconfig':
> >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:606: undefined reference to 
> >>> `FcInitLoadConfigAndFonts'
> >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:611: undefined reference to 
> >>> `FcNameParse'
> >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:617: undefined reference to 
> >>> `FcDefaultSubstitute'
> >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:619: undefined reference to 
> >>> `FcConfigSubstitute'
> >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:626: undefined reference to 
> >>> `FcFontMatch'
> >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:627: undefined reference to 
> >>> `FcPatternDestroy'
> >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:643: undefined reference to 
> >>> `FcPatternDestroy'
> >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:644: undefined reference to 
> >>> `FcConfigDestroy'
> >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:621: undefined reference to 
> >>> `FcPatternDestroy'
> >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:622: undefined reference to 
> >>> `FcConfigDestroy'
> >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:635: undefined reference to 
> >>> `FcPatternGetString'
> >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:613: undefined reference to 
> >>> `FcConfigDestroy'
> >>> collect2: error: ld returned 1 exit status
> >>> make: *** [ffmpeg_g] Error 1
> >>
> >> That'd be because showcqt is missing its fontconfig and freetype deps in
> >> configure, a mistake that was hidden by extralibs being global before
> >> this merge.
> >>
> >> Does the attached patch fix it?
> > 
> > it seems so
> 
> Will apply then. Thanks.
> 
> > but it just results in the next failure
> > 
> > make distclean ; ../configure --build-suffix=asterix && make -j12
> 
> This is not "the next failure" result of fixing showcqt. You're using a
> completely different command line where showcqt would have shown no
> issues even without the above fix.

it was meant as in "the next issue that the recent build system changes
caused)

also i simplified the command before submitting removing unneeded
options


> 
> > LD  ffmpeg_g
> > fftools/ffmpeg_opt.o: In function `new_output_stream':
> > ffmpeg/linux32/src/fftools/ffmpeg_opt.c:1334: undefined reference to 
> > `avcodec_parameters_alloc'
> 
> Apparently buildsuf breaks dependencies somewhere by changing the
> library names. At least here 

Re: [FFmpeg-devel] [PATCH V3 2/2] hwaccel_mpeg: check reference pictures are available

2017-10-12 Thread Michael Niedermayer
On Thu, Oct 12, 2017 at 04:20:45PM +0800, Zhong Li wrote:
> some reference pictures are not existed but valiad surface_ids are set,
> (for example, the second field of the first key frame can be
> P_Picture_Type but there is no preivous frame.)
> then may cause some driver problems (e.g, segment fault on  mesa/AMD driver).
> 
> Signed-off-by: Zhong Li 
> ---
[...]

> diff --git a/libavcodec/vdpau_mpeg12.c b/libavcodec/vdpau_mpeg12.c
> index b657007ee7..6d73d45f1a 100644
> --- a/libavcodec/vdpau_mpeg12.c
> +++ b/libavcodec/vdpau_mpeg12.c
> @@ -45,13 +45,18 @@ static int vdpau_mpeg_start_frame(AVCodecContext *avctx,
>  
>  switch (s->pict_type) {
>  case AV_PICTURE_TYPE_B:
> -ref = ff_vdpau_get_surface_id(s->next_picture.f);
> -assert(ref != VDP_INVALID_HANDLE);
> -info->backward_reference = ref;
> +if (s->next_picture_ptr) {
> +ref = ff_vdpau_get_surface_id(s->next_picture.f);
> +assert(ref != VDP_INVALID_HANDLE);
> +info->backward_reference = ref;
> +}
>  /* fall through to forward prediction */

>  case AV_PICTURE_TYPE_P:
> -ref = ff_vdpau_get_surface_id(s->last_picture.f);
> -info->forward_reference  = ref;
> +if (s->last_picture_ptr) {
> +ref = ff_vdpau_get_surface_id(s->last_picture.f);

> +assert(ref != VDP_INVALID_HANDLE);

please use av_assert*()

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

When you are offended at any man's fault, turn to yourself and study your
own failings. Then you will forget your anger. -- Epictetus


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


Re: [FFmpeg-devel] [FFmpeg-cvslog] Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

2017-10-12 Thread James Almer
On 10/12/2017 5:07 PM, Michael Niedermayer wrote:
> On Thu, Oct 12, 2017 at 04:42:19PM -0300, James Almer wrote:
>> On 10/12/2017 4:25 PM, Michael Niedermayer wrote:
>>> On Thu, Oct 12, 2017 at 02:25:46PM -0300, James Almer wrote:
 On 10/12/2017 1:56 PM, Michael Niedermayer wrote:
> On Wed, Oct 11, 2017 at 10:30:13PM -0300, James Almer wrote:
>> On 10/11/2017 9:22 PM, Michael Niedermayer wrote:
>>> On Wed, Oct 11, 2017 at 09:26:18PM +, James Almer wrote:
 ffmpeg | branch: master | James Almer  | Wed Oct 11 
 17:55:25 2017 -0300| [6dfcbd80ad446ff163b47f2bf432bbf706436ea8] | 
 committer: James Almer

 Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

 * commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63':
   build: Fine-grained link-time dependency settings

 Also included are bug fix commits 
 5ff3b5cafcc685b6936d16602b0f80aa09a95870,
 d9da7151eef7fc469787e7298196cea291acfd82 and
 5e27ef800bfa2be17a6353ddedac6b7400e4624f.

 Merged-by: James Almer 

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

  Makefile|   3 +-
  configure   | 297 
 +---
  ffbuild/common.mak  |   2 +-
  ffbuild/library.mak |   2 +-
  tests/checkasm/Makefile |   2 +-
  5 files changed, 187 insertions(+), 119 deletions(-)
>>>
>>> This breaks build here (linux x86-64)
>>>
>>> ./configure --enable-libxavs --enable-gpl
>>> ERROR: libxavs not found
>>>
>>> Iam trying to test most patches for FFmpeg before they are pushed, but
>>> i can only test what is posted for review on ffmpeg-devel ...
>>
>> Testing locally i see it's complaining about missing pthreads and libm
>> ldflag, since they of course are not part of the global extralibs 
>> anymore.
>> Switching detection to pkg-config would be ideal, but for some reason
>> even the supplied .pc file doesn't include the -lm ldflag, only the
>> pthreads one, and libxavs looks like it hasn't been updated for six
>> years now (at least the one in sourceforge), so it's unlikely to be
>> fixed on their end.
>>
>> Can you test the attached patch?
>
> seems to fix it

 Pushed then. Thanks.

> but i get a build failure with fontconfig now:
>
> ../configure  --enable-fontconfig  && make -j12
>
> LD  ffmpeg_g
> libavfilter/libavfilter.a(avf_showcqt.o): In function `render_fontconfig':
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:606: undefined reference to 
> `FcInitLoadConfigAndFonts'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:611: undefined reference to 
> `FcNameParse'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:617: undefined reference to 
> `FcDefaultSubstitute'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:619: undefined reference to 
> `FcConfigSubstitute'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:626: undefined reference to 
> `FcFontMatch'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:627: undefined reference to 
> `FcPatternDestroy'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:643: undefined reference to 
> `FcPatternDestroy'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:644: undefined reference to 
> `FcConfigDestroy'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:621: undefined reference to 
> `FcPatternDestroy'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:622: undefined reference to 
> `FcConfigDestroy'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:635: undefined reference to 
> `FcPatternGetString'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:613: undefined reference to 
> `FcConfigDestroy'
> collect2: error: ld returned 1 exit status
> make: *** [ffmpeg_g] Error 1

 That'd be because showcqt is missing its fontconfig and freetype deps in
 configure, a mistake that was hidden by extralibs being global before
 this merge.

 Does the attached patch fix it?
>>>
>>> it seems so
>>
>> Will apply then. Thanks.
>>
>>> but it just results in the next failure
>>>
>>> make distclean ; ../configure --build-suffix=asterix && make -j12
>>
>> This is not "the next failure" result of fixing showcqt. You're using a
>> completely different command line where showcqt would have shown no
>> issues even without the above fix.
> 
> it was meant as in "the next issue that the recent build system changes
> caused)
> 
> also i simplified the command before submitting removing unneeded
> options

Ah, i see. Nevermind then.

> 
> 
>>
>>> LD  ffmpeg_g
>>> fftools/ffmpeg_opt.o: In function `new_output_stream':
>>> ffmpeg/linux32/src/fftools/ffmpeg_opt.c:1334: undefined reference to 
>>> `avcodec_parameters_alloc'
>>

Re: [FFmpeg-devel] [FFmpeg-cvslog] Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

2017-10-12 Thread James Almer
On 10/12/2017 4:25 PM, Michael Niedermayer wrote:
> On Thu, Oct 12, 2017 at 02:25:46PM -0300, James Almer wrote:
>> On 10/12/2017 1:56 PM, Michael Niedermayer wrote:
>>> On Wed, Oct 11, 2017 at 10:30:13PM -0300, James Almer wrote:
 On 10/11/2017 9:22 PM, Michael Niedermayer wrote:
> On Wed, Oct 11, 2017 at 09:26:18PM +, James Almer wrote:
>> ffmpeg | branch: master | James Almer  | Wed Oct 11 
>> 17:55:25 2017 -0300| [6dfcbd80ad446ff163b47f2bf432bbf706436ea8] | 
>> committer: James Almer
>>
>> Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'
>>
>> * commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63':
>>   build: Fine-grained link-time dependency settings
>>
>> Also included are bug fix commits 
>> 5ff3b5cafcc685b6936d16602b0f80aa09a95870,
>> d9da7151eef7fc469787e7298196cea291acfd82 and
>> 5e27ef800bfa2be17a6353ddedac6b7400e4624f.
>>
>> Merged-by: James Almer 
>>
>>> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6dfcbd80ad446ff163b47f2bf432bbf706436ea8
>> ---
>>
>>  Makefile|   3 +-
>>  configure   | 297 
>> +---
>>  ffbuild/common.mak  |   2 +-
>>  ffbuild/library.mak |   2 +-
>>  tests/checkasm/Makefile |   2 +-
>>  5 files changed, 187 insertions(+), 119 deletions(-)
>
> This breaks build here (linux x86-64)
>
> ./configure --enable-libxavs --enable-gpl
> ERROR: libxavs not found
>
> Iam trying to test most patches for FFmpeg before they are pushed, but
> i can only test what is posted for review on ffmpeg-devel ...

 Testing locally i see it's complaining about missing pthreads and libm
 ldflag, since they of course are not part of the global extralibs anymore.
 Switching detection to pkg-config would be ideal, but for some reason
 even the supplied .pc file doesn't include the -lm ldflag, only the
 pthreads one, and libxavs looks like it hasn't been updated for six
 years now (at least the one in sourceforge), so it's unlikely to be
 fixed on their end.

 Can you test the attached patch?
>>>
>>> seems to fix it
>>
>> Pushed then. Thanks.
>>
>>> but i get a build failure with fontconfig now:
>>>
>>> ../configure  --enable-fontconfig  && make -j12
>>>
>>> LD  ffmpeg_g
>>> libavfilter/libavfilter.a(avf_showcqt.o): In function `render_fontconfig':
>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:606: undefined reference to 
>>> `FcInitLoadConfigAndFonts'
>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:611: undefined reference to 
>>> `FcNameParse'
>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:617: undefined reference to 
>>> `FcDefaultSubstitute'
>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:619: undefined reference to 
>>> `FcConfigSubstitute'
>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:626: undefined reference to 
>>> `FcFontMatch'
>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:627: undefined reference to 
>>> `FcPatternDestroy'
>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:643: undefined reference to 
>>> `FcPatternDestroy'
>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:644: undefined reference to 
>>> `FcConfigDestroy'
>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:621: undefined reference to 
>>> `FcPatternDestroy'
>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:622: undefined reference to 
>>> `FcConfigDestroy'
>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:635: undefined reference to 
>>> `FcPatternGetString'
>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:613: undefined reference to 
>>> `FcConfigDestroy'
>>> collect2: error: ld returned 1 exit status
>>> make: *** [ffmpeg_g] Error 1
>>
>> That'd be because showcqt is missing its fontconfig and freetype deps in
>> configure, a mistake that was hidden by extralibs being global before
>> this merge.
>>
>> Does the attached patch fix it?
> 
> it seems so but it just results in the next failure
> 
> make distclean ; ../configure --build-suffix=asterix && make -j12

Does the attached patch fix this for you?
From a684c1b789bfcef6c27f68aa9246e8e11e47c838 Mon Sep 17 00:00:00 2001
From: James Almer 
Date: Thu, 12 Oct 2017 17:32:10 -0300
Subject: [PATCH] build: fix builds configured with a suffix

Regression since 6dfcbd80ad446ff163b47f2bf432bbf706436ea8

Signed-off-by: James Almer 
---
 ffbuild/common.mak | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ffbuild/common.mak b/ffbuild/common.mak
index a6b23e029f..63a3c2f2d0 100644
--- a/ffbuild/common.mak
+++ b/ffbuild/common.mak
@@ -119,7 +119,7 @@ FFLIBS:= $($(NAME)_FFLIBS) $(FFLIBS-yes) $(FFLIBS)
 TESTPROGS += $(TESTPROGS-yes)
 
 LDLIBS   = $(FFLIBS:%=%$(BUILDSUF))
-FFEXTRALIBS := $(FFLIBS:%=$(LD_LIB)) $(foreach lib,EXTRALIBS-$(NAME) 
$(FFLIBS:%=EXTRALIBS-%),$($(lib))) $(EXTRALIBS)
+FFEXTRALIBS := $(LDLIBS:%=$(LD_LIB)) $(foreach lib,EXTRALIBS-$(NAME) 
$(FFLIBS:%=EXTRALIBS-%),$($(lib))) $(EXTRALIBS)
 
 OBJS 

Re: [FFmpeg-devel] [PATCH V3 2/2] hwaccel_mpeg: check reference pictures are available

2017-10-12 Thread Carl Eugen Hoyos
2017-10-12 10:20 GMT+02:00 Zhong Li :
> some reference pictures are not existed but valiad surface_ids are set,
> (for example, the second field of the first key frame can be
> P_Picture_Type but there is no preivous frame.)
> then may cause some driver problems

> (e.g, segment fault on  mesa/AMD driver).

Please also confirm that these driver bugs are fixed.

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


Re: [FFmpeg-devel] [PATCH 2/6] vaapi: Remove H.264 baseline profile

2017-10-12 Thread Carl Eugen Hoyos
2017-10-11 12:26 GMT+02:00 Mark Thompson :
> If an encoder declares a higher profile than it actually uses then
> that is unhelpful but there is little we can do about it.

We have been through all this years ago:
The only sane thing to do is to ignore these values (and if you
want, print a warning).

For the specific original issue here: Is there a real-world baseline
encoder, or actually: a real-world baseline-encoded file?
Because we know that many real-world constrained-baseline
files were encoded with profile "baseline":

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


Re: [FFmpeg-devel] [PATCH] avfilter:vf_libvmaf: fix errors while running with psnr=1 and improve docs

2017-10-12 Thread Carl Eugen Hoyos
2017-10-11 15:53 GMT+02:00 Ashish Pratap Singh :

> Hi, this patch fixes the seg fault which ocuured while running libvmaf filter
> with option psnr=1. This also improves libvmaf doc a bit.

Please split in two patches.

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


Re: [FFmpeg-devel] [PATCH] doc/filters: correct typo and incomplete desc

2017-10-12 Thread Michael Niedermayer
On Thu, Oct 12, 2017 at 06:50:04PM +0530, Gyan Doshi wrote:
> Correct typo in signalstats filter section and qualify description
> for variable in select filter.

>  filters.texi |4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 2947a17b0fabc5bea15064019f3c59b2b57430a1  
> 0001-doc-filters-correct-typo-and-incomplete-desc.patch
> From fe780adb77b98d0c76671fdeb98d3123d7834550 Mon Sep 17 00:00:00 2001
> From: Gyan Doshi 
> Date: Thu, 12 Oct 2017 18:46:06 +0530
> Subject: [PATCH] doc/filters: correct typo and incomplete desc.
> 
> Correct typo in signalstats filter section and qualify description for 
> variable
> in select filter.
> 
> Signed-off-by: Gyan Doshi 
> ---
>  doc/filters.texi | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

will apply

thx

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is what and why we do it that matters, not just one of them.


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


Re: [FFmpeg-devel] [PATCH] avcodec/mips: Improve avc chroma avg horiz mc msa functions

2017-10-12 Thread Michael Niedermayer
On Wed, Oct 11, 2017 at 11:04:07AM +, Manojkumar Bhosale wrote:
> LGTM

applied

thx

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

If a bugfix only changes things apparently unrelated to the bug with no
further explanation, that is a good sign that the bugfix is wrong.


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


Re: [FFmpeg-devel] [PATCH] avcodec/mips: Improve avc put mc 12, 32 and 22 msa functions

2017-10-12 Thread Michael Niedermayer
On Wed, Oct 11, 2017 at 11:04:12AM +, Manojkumar Bhosale wrote:
> LGTM

applied

thx

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

Opposition brings concord. Out of discord comes the fairest harmony.
-- Heraclitus


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


Re: [FFmpeg-devel] [PATCH] avcodec/mips: Improve hevc bi copy mc msa functions

2017-10-12 Thread Michael Niedermayer
On Wed, Oct 11, 2017 at 11:18:07AM +, Manojkumar Bhosale wrote:
> LGTM

applied

thx

[...]

--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No great genius has ever existed without some touch of madness. -- Aristotle


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


Re: [FFmpeg-devel] [PATCH] avcodec/mips: Improve hevc uni horiz mc msa functions

2017-10-12 Thread Michael Niedermayer
On Wed, Oct 11, 2017 at 11:24:12AM +, Manojkumar Bhosale wrote:
> LGTM

applied

thx

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

Good people do not need laws to tell them to act responsibly, while bad
people will find a way around the laws. -- Plato


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


Re: [FFmpeg-devel] [PATCH] avcodec/mips: Improve hevc uni weighted vert mc msa functions

2017-10-12 Thread Michael Niedermayer
On Wed, Oct 11, 2017 at 11:24:39AM +, Manojkumar Bhosale wrote:
> LGTM

applied

thx

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

Rewriting code that is poorly written but fully understood is good.
Rewriting code that one doesnt understand is a sign that one is less smart
then the original author, trying to rewrite it will not make it better.


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


Re: [FFmpeg-devel] [FFmpeg-cvslog] Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

2017-10-12 Thread Helmut K. C. Tessarek
On 2017-10-12 16:04, James Almer wrote:
> Sounds like pkg-config is not providing you with the required deps.
> Since you're doing a static build with static external libraries, try
> adding "--pkg-config-flags=--static" to your configure line.

Which makes no sense, since I checked the pkg_config files and they look
fine.
Anyway, I tried --pkg-config-flags=--static. It did not help.

But as I've suspected I had to add -lbz2 -lz to LDFLAGS. Now it works.

export LDFLAGS="$LDFLAGS -lstdc++ -lass -lfontconfig -lexpat -lenca
-lfribidi -lfreetype -lbz2 -lz -framework CoreText"

> Adding --static to --pkg-config-flags might let you remove some of these
> custom ldflags. But probably not all.

It doesn't look that way.

Btw, I still get these awful warnings for every file.

Ronald B. mentioned in another thread:

-
From IRC yesterday (gcc=clang here):

bash-4.4$ gcc /dev/null -Wno-bool-operation -c -o /tmp/x.o && echo success
clang: warning: /dev/null: 'linker' input unused
[-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-Wno-bool-operation'
[-Wunused-command-line-argument]
success
bash-4.4$ gcc -Wno-bool-operation /tmp/x.c -c -o /tmp/x.o
-Werror=unused-command-line-argument && echo success
warning: unknown warning option '-Wno-bool-operation'; did you mean
'-Wno-bool-conversion'? [-Wunknown-warning-option]
1 warning generated.
successbash-4.4$ gcc -Wno-bool-operation /tmp/x.c -c -o /tmp/x.o
-Werror=unused-command-line-argument -Werror=unknown-warning-option && echo
success
error: unknown warning option '-Wno-bool-operation'; did you mean
'-Wno-bool-conversion'? [-Werror,-Wunknown-warning-option]

That last one should allow this to work.

-

Can someone please fix this?

-- 
regards Helmut K. C. Tessarek  KeyID 0xF7832007C11F128D
Key fingerprint = 28A3 1666 4FE8 D72C CFD5 8B23 F783 2007 C11F 128D

/*
   Thou shalt not follow the NULL pointer for chaos and madness
   await thee at its end.
*/
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] configure: force erroring out in check_disable_warning() if an option doesn't exists

2017-10-12 Thread James Almer
Should prevent some options from being added to cflags when they
don't exist and the compiler only warns about it.

Signed-off-by: James Almer 
---
I figure this is safer than adding
-Werror=unused-command-line-argument -Werror=unknown-warning-option
as Ronald suggested.

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

diff --git a/configure b/configure
index ade67a31bb..c7962665f1 100755
--- a/configure
+++ b/configure
@@ -6370,7 +6370,7 @@ fi
 
 check_disable_warning(){
 warning_flag=-W${1#-Wno-}
-test_cflags $warning_flag && add_cflags $1
+test_cflags -Werror $warning_flag && add_cflags $1
 }
 
 check_disable_warning -Wno-parentheses
-- 
2.14.2

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


Re: [FFmpeg-devel] [FFmpeg-cvslog] Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

2017-10-12 Thread Michael Niedermayer
On Thu, Oct 12, 2017 at 05:36:17PM -0300, James Almer wrote:
> On 10/12/2017 4:25 PM, Michael Niedermayer wrote:
> > On Thu, Oct 12, 2017 at 02:25:46PM -0300, James Almer wrote:
> >> On 10/12/2017 1:56 PM, Michael Niedermayer wrote:
> >>> On Wed, Oct 11, 2017 at 10:30:13PM -0300, James Almer wrote:
>  On 10/11/2017 9:22 PM, Michael Niedermayer wrote:
> > On Wed, Oct 11, 2017 at 09:26:18PM +, James Almer wrote:
> >> ffmpeg | branch: master | James Almer  | Wed Oct 11 
> >> 17:55:25 2017 -0300| [6dfcbd80ad446ff163b47f2bf432bbf706436ea8] | 
> >> committer: James Almer
> >>
> >> Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'
> >>
> >> * commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63':
> >>   build: Fine-grained link-time dependency settings
> >>
> >> Also included are bug fix commits 
> >> 5ff3b5cafcc685b6936d16602b0f80aa09a95870,
> >> d9da7151eef7fc469787e7298196cea291acfd82 and
> >> 5e27ef800bfa2be17a6353ddedac6b7400e4624f.
> >>
> >> Merged-by: James Almer 
> >>
> >>> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6dfcbd80ad446ff163b47f2bf432bbf706436ea8
> >> ---
> >>
> >>  Makefile|   3 +-
> >>  configure   | 297 
> >> +---
> >>  ffbuild/common.mak  |   2 +-
> >>  ffbuild/library.mak |   2 +-
> >>  tests/checkasm/Makefile |   2 +-
> >>  5 files changed, 187 insertions(+), 119 deletions(-)
> >
> > This breaks build here (linux x86-64)
> >
> > ./configure --enable-libxavs --enable-gpl
> > ERROR: libxavs not found
> >
> > Iam trying to test most patches for FFmpeg before they are pushed, but
> > i can only test what is posted for review on ffmpeg-devel ...
> 
>  Testing locally i see it's complaining about missing pthreads and libm
>  ldflag, since they of course are not part of the global extralibs 
>  anymore.
>  Switching detection to pkg-config would be ideal, but for some reason
>  even the supplied .pc file doesn't include the -lm ldflag, only the
>  pthreads one, and libxavs looks like it hasn't been updated for six
>  years now (at least the one in sourceforge), so it's unlikely to be
>  fixed on their end.
> 
>  Can you test the attached patch?
> >>>
> >>> seems to fix it
> >>
> >> Pushed then. Thanks.
> >>
> >>> but i get a build failure with fontconfig now:
> >>>
> >>> ../configure  --enable-fontconfig  && make -j12
> >>>
> >>> LD  ffmpeg_g
> >>> libavfilter/libavfilter.a(avf_showcqt.o): In function `render_fontconfig':
> >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:606: undefined reference to 
> >>> `FcInitLoadConfigAndFonts'
> >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:611: undefined reference to 
> >>> `FcNameParse'
> >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:617: undefined reference to 
> >>> `FcDefaultSubstitute'
> >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:619: undefined reference to 
> >>> `FcConfigSubstitute'
> >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:626: undefined reference to 
> >>> `FcFontMatch'
> >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:627: undefined reference to 
> >>> `FcPatternDestroy'
> >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:643: undefined reference to 
> >>> `FcPatternDestroy'
> >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:644: undefined reference to 
> >>> `FcConfigDestroy'
> >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:621: undefined reference to 
> >>> `FcPatternDestroy'
> >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:622: undefined reference to 
> >>> `FcConfigDestroy'
> >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:635: undefined reference to 
> >>> `FcPatternGetString'
> >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:613: undefined reference to 
> >>> `FcConfigDestroy'
> >>> collect2: error: ld returned 1 exit status
> >>> make: *** [ffmpeg_g] Error 1
> >>
> >> That'd be because showcqt is missing its fontconfig and freetype deps in
> >> configure, a mistake that was hidden by extralibs being global before
> >> this merge.
> >>
> >> Does the attached patch fix it?
> > 
> > it seems so but it just results in the next failure
> > 
> > make distclean ; ../configure --build-suffix=asterix && make -j12
> 
> Does the attached patch fix this for you?

yes

next is:
make fate-timefilter

doesnt work anymore

make libavdevice/tests/timefilter
make: *** No rule to make target `libavdevice/tests/timefilter'.  Stop.

i assume this is unintended, its a bit tricky to bisect with the
build system not fully working. Id first have to reduce the testcase
to the subbset that works on all checkouts ...

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Old school: Use the lowest level language in which you can solve the problem
conveniently.
New school: Use the highest level language in which the latest supercomputer
   

Re: [FFmpeg-devel] [FFmpeg-cvslog] Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

2017-10-12 Thread James Almer
On 10/12/2017 6:12 PM, Helmut K. C. Tessarek wrote:
> On 2017-10-12 16:04, James Almer wrote:
>> Sounds like pkg-config is not providing you with the required deps.
>> Since you're doing a static build with static external libraries, try
>> adding "--pkg-config-flags=--static" to your configure line.
> 
> Which makes no sense, since I checked the pkg_config files and they look
> fine.
> Anyway, I tried --pkg-config-flags=--static. It did not help.

bzip2 and zlib show up as dependencies of freetype2 in the
"Requires.private" section of its .pc file in your system, right? If
you're using an static build of freetype2, pkg-config needs to be run
with --static to actually get the required ldflags for said dependencies.

Now, the issue here is libbluray adding freetype2 ldflags directly
instead of setting freetype2 as a dependency, much like freetype2 sets
bzip2 and zlib.

>
> But as I've suspected I had to add -lbz2 -lz to LDFLAGS. Now it works.

I suppose that if that change is done to libbluray's .pc file (namely,
adding a "Requires.private: freetype2 fontconfig" line or similar, if i
understand this correctly), you'll be able to use the --static
pkg-config-flag and remove most if not all of these LDFLAGS you list below.

> 
> export LDFLAGS="$LDFLAGS -lstdc++ -lass -lfontconfig -lexpat -lenca
> -lfribidi -lfreetype -lbz2 -lz -framework CoreText"
> 
>> Adding --static to --pkg-config-flags might let you remove some of these
>> custom ldflags. But probably not all.
> 
> It doesn't look that way.
> 
> Btw, I still get these awful warnings for every file.
> 
> Ronald B. mentioned in another thread:
> 
> -
> From IRC yesterday (gcc=clang here):
> 
> bash-4.4$ gcc /dev/null -Wno-bool-operation -c -o /tmp/x.o && echo success
> clang: warning: /dev/null: 'linker' input unused
> [-Wunused-command-line-argument]
> clang: warning: argument unused during compilation: '-Wno-bool-operation'
> [-Wunused-command-line-argument]
> success
> bash-4.4$ gcc -Wno-bool-operation /tmp/x.c -c -o /tmp/x.o
> -Werror=unused-command-line-argument && echo success
> warning: unknown warning option '-Wno-bool-operation'; did you mean
> '-Wno-bool-conversion'? [-Wunknown-warning-option]
> 1 warning generated.
> successbash-4.4$ gcc -Wno-bool-operation /tmp/x.c -c -o /tmp/x.o
> -Werror=unused-command-line-argument -Werror=unknown-warning-option && echo
> success
> error: unknown warning option '-Wno-bool-operation'; did you mean
> '-Wno-bool-conversion'? [-Werror,-Wunknown-warning-option]
> 
> That last one should allow this to work.
> 
> -
> 
> Can someone please fix this?

Just sent a patch for this.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [FFmpeg-cvslog] Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

2017-10-12 Thread Michael Niedermayer
On Thu, Oct 12, 2017 at 11:33:45PM +0200, Michael Niedermayer wrote:
> On Thu, Oct 12, 2017 at 05:36:17PM -0300, James Almer wrote:
> > On 10/12/2017 4:25 PM, Michael Niedermayer wrote:
> > > On Thu, Oct 12, 2017 at 02:25:46PM -0300, James Almer wrote:
> > >> On 10/12/2017 1:56 PM, Michael Niedermayer wrote:
> > >>> On Wed, Oct 11, 2017 at 10:30:13PM -0300, James Almer wrote:
> >  On 10/11/2017 9:22 PM, Michael Niedermayer wrote:
> > > On Wed, Oct 11, 2017 at 09:26:18PM +, James Almer wrote:
> > >> ffmpeg | branch: master | James Almer  | Wed Oct 
> > >> 11 17:55:25 2017 -0300| [6dfcbd80ad446ff163b47f2bf432bbf706436ea8] | 
> > >> committer: James Almer
> > >>
> > >> Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'
> > >>
> > >> * commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63':
> > >>   build: Fine-grained link-time dependency settings
> > >>
> > >> Also included are bug fix commits 
> > >> 5ff3b5cafcc685b6936d16602b0f80aa09a95870,
> > >> d9da7151eef7fc469787e7298196cea291acfd82 and
> > >> 5e27ef800bfa2be17a6353ddedac6b7400e4624f.
> > >>
> > >> Merged-by: James Almer 
> > >>
> > >>> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6dfcbd80ad446ff163b47f2bf432bbf706436ea8
> > >> ---
> > >>
> > >>  Makefile|   3 +-
> > >>  configure   | 297 
> > >> +---
> > >>  ffbuild/common.mak  |   2 +-
> > >>  ffbuild/library.mak |   2 +-
> > >>  tests/checkasm/Makefile |   2 +-
> > >>  5 files changed, 187 insertions(+), 119 deletions(-)
> > >
> > > This breaks build here (linux x86-64)
> > >
> > > ./configure --enable-libxavs --enable-gpl
> > > ERROR: libxavs not found
> > >
> > > Iam trying to test most patches for FFmpeg before they are pushed, but
> > > i can only test what is posted for review on ffmpeg-devel ...
> > 
> >  Testing locally i see it's complaining about missing pthreads and libm
> >  ldflag, since they of course are not part of the global extralibs 
> >  anymore.
> >  Switching detection to pkg-config would be ideal, but for some reason
> >  even the supplied .pc file doesn't include the -lm ldflag, only the
> >  pthreads one, and libxavs looks like it hasn't been updated for six
> >  years now (at least the one in sourceforge), so it's unlikely to be
> >  fixed on their end.
> > 
> >  Can you test the attached patch?
> > >>>
> > >>> seems to fix it
> > >>
> > >> Pushed then. Thanks.
> > >>
> > >>> but i get a build failure with fontconfig now:
> > >>>
> > >>> ../configure  --enable-fontconfig  && make -j12
> > >>>
> > >>> LD  ffmpeg_g
> > >>> libavfilter/libavfilter.a(avf_showcqt.o): In function 
> > >>> `render_fontconfig':
> > >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:606: undefined reference to 
> > >>> `FcInitLoadConfigAndFonts'
> > >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:611: undefined reference to 
> > >>> `FcNameParse'
> > >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:617: undefined reference to 
> > >>> `FcDefaultSubstitute'
> > >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:619: undefined reference to 
> > >>> `FcConfigSubstitute'
> > >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:626: undefined reference to 
> > >>> `FcFontMatch'
> > >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:627: undefined reference to 
> > >>> `FcPatternDestroy'
> > >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:643: undefined reference to 
> > >>> `FcPatternDestroy'
> > >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:644: undefined reference to 
> > >>> `FcConfigDestroy'
> > >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:621: undefined reference to 
> > >>> `FcPatternDestroy'
> > >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:622: undefined reference to 
> > >>> `FcConfigDestroy'
> > >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:635: undefined reference to 
> > >>> `FcPatternGetString'
> > >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:613: undefined reference to 
> > >>> `FcConfigDestroy'
> > >>> collect2: error: ld returned 1 exit status
> > >>> make: *** [ffmpeg_g] Error 1
> > >>
> > >> That'd be because showcqt is missing its fontconfig and freetype deps in
> > >> configure, a mistake that was hidden by extralibs being global before
> > >> this merge.
> > >>
> > >> Does the attached patch fix it?
> > > 
> > > it seems so but it just results in the next failure
> > > 
> > > make distclean ; ../configure --build-suffix=asterix && make -j12
> > 
> > Does the attached patch fix this for you?
> 
> yes
> 
> next is:
> make fate-timefilter
> 
> doesnt work anymore
> 
> make libavdevice/tests/timefilter
> make: *** No rule to make target `libavdevice/tests/timefilter'.  Stop.
> 
> i assume this is unintended, its a bit tricky to bisect with the
> build system not fully working. Id first have to reduce the testcase
> to the subbset 

Re: [FFmpeg-devel] [FFmpeg-cvslog] Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

2017-10-12 Thread Reino Wijnsma
On 12-10-2017 20:11, Helmut K. C. Tessarek  wrote:
> I'm not sure why you guys have to make all these changes to the build
> process lately.
>
> All of a sudden ffmpeg does not compile anymore. During configure I get:
>
> ERROR: libbluray not found using pkg-config
>
> which worked perfectly 2 days ago. So, whatever changes you made, they
> screwed up other things.
Same here. I was about to compile another FFmpeg executable, but got
configure complaining about libbluray as well (note: I always use
--pkg-config-flags=--static).
I've worked around that by changing the pc-file

prefix=/cygdrive/[...]
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: libbluray
Description: library supporting Blu-ray playback
Version: 1.0.1
Libs: -L${libdir} -lbluray
Libs.private:  -L/cygdrive/[...]/lib -lxml2 -L/cygdrive/[...]/lib
-lfreetype -lgdi32
Cflags: -I${includedir}

...into:

prefix=/cygdrive/[...]
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: libbluray
Description: library supporting Blu-ray playback
Version: 1.0.1
Requires: libxml-2.0, freetype2
Libs: -L${libdir} -lbluray
Libs.private:  -lgdi32
Cflags: -I${includedir}

Next however was iLBC. I got "undefined reference to `pthread_once'" and
"ERROR: libilbc not found". I had to add --extra-libs=-lpthread to 'fix'
that.

Now it's complaining about libmysofa:

/cygdrive/[...]/lib/libmysofa.a(gunzip.c.obj):gunzip.c:(.text+0x5f):
undefined reference to `inflateInit_'
/cygdrive/[...]/lib/libmysofa.a(gunzip.c.obj):gunzip.c:(.text+0x76):
undefined reference to `inflate'
/cygdrive/[...]/lib/libmysofa.a(gunzip.c.obj):gunzip.c:(.text+0x8a):
undefined reference to `inflateEnd'
collect2: error: ld returned 1 exit status
ERROR: libmysofa not found

Something is seriously broken here.

On 12-10-2017 22:36, James Almer  wrote:
> Does the attached patch ('0001-build-fix-building-with-build-suffix.patch') 
> fix this for you?
Does nothing for me.

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


Re: [FFmpeg-devel] [FFmpeg-cvslog] Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

2017-10-12 Thread James Almer
On 10/12/2017 6:41 PM, Michael Niedermayer wrote:
> On Thu, Oct 12, 2017 at 11:33:45PM +0200, Michael Niedermayer wrote:
>> On Thu, Oct 12, 2017 at 05:36:17PM -0300, James Almer wrote:
>>> On 10/12/2017 4:25 PM, Michael Niedermayer wrote:
 On Thu, Oct 12, 2017 at 02:25:46PM -0300, James Almer wrote:
> On 10/12/2017 1:56 PM, Michael Niedermayer wrote:
>> On Wed, Oct 11, 2017 at 10:30:13PM -0300, James Almer wrote:
>>> On 10/11/2017 9:22 PM, Michael Niedermayer wrote:
 On Wed, Oct 11, 2017 at 09:26:18PM +, James Almer wrote:
> ffmpeg | branch: master | James Almer  | Wed Oct 
> 11 17:55:25 2017 -0300| [6dfcbd80ad446ff163b47f2bf432bbf706436ea8] | 
> committer: James Almer
>
> Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'
>
> * commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63':
>   build: Fine-grained link-time dependency settings
>
> Also included are bug fix commits 
> 5ff3b5cafcc685b6936d16602b0f80aa09a95870,
> d9da7151eef7fc469787e7298196cea291acfd82 and
> 5e27ef800bfa2be17a6353ddedac6b7400e4624f.
>
> Merged-by: James Almer 
>
>> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6dfcbd80ad446ff163b47f2bf432bbf706436ea8
> ---
>
>  Makefile|   3 +-
>  configure   | 297 
> +---
>  ffbuild/common.mak  |   2 +-
>  ffbuild/library.mak |   2 +-
>  tests/checkasm/Makefile |   2 +-
>  5 files changed, 187 insertions(+), 119 deletions(-)

 This breaks build here (linux x86-64)

 ./configure --enable-libxavs --enable-gpl
 ERROR: libxavs not found

 Iam trying to test most patches for FFmpeg before they are pushed, but
 i can only test what is posted for review on ffmpeg-devel ...
>>>
>>> Testing locally i see it's complaining about missing pthreads and libm
>>> ldflag, since they of course are not part of the global extralibs 
>>> anymore.
>>> Switching detection to pkg-config would be ideal, but for some reason
>>> even the supplied .pc file doesn't include the -lm ldflag, only the
>>> pthreads one, and libxavs looks like it hasn't been updated for six
>>> years now (at least the one in sourceforge), so it's unlikely to be
>>> fixed on their end.
>>>
>>> Can you test the attached patch?
>>
>> seems to fix it
>
> Pushed then. Thanks.
>
>> but i get a build failure with fontconfig now:
>>
>> ../configure  --enable-fontconfig  && make -j12
>>
>> LD  ffmpeg_g
>> libavfilter/libavfilter.a(avf_showcqt.o): In function 
>> `render_fontconfig':
>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:606: undefined reference to 
>> `FcInitLoadConfigAndFonts'
>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:611: undefined reference to 
>> `FcNameParse'
>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:617: undefined reference to 
>> `FcDefaultSubstitute'
>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:619: undefined reference to 
>> `FcConfigSubstitute'
>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:626: undefined reference to 
>> `FcFontMatch'
>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:627: undefined reference to 
>> `FcPatternDestroy'
>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:643: undefined reference to 
>> `FcPatternDestroy'
>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:644: undefined reference to 
>> `FcConfigDestroy'
>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:621: undefined reference to 
>> `FcPatternDestroy'
>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:622: undefined reference to 
>> `FcConfigDestroy'
>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:635: undefined reference to 
>> `FcPatternGetString'
>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:613: undefined reference to 
>> `FcConfigDestroy'
>> collect2: error: ld returned 1 exit status
>> make: *** [ffmpeg_g] Error 1
>
> That'd be because showcqt is missing its fontconfig and freetype deps in
> configure, a mistake that was hidden by extralibs being global before
> this merge.
>
> Does the attached patch fix it?

 it seems so but it just results in the next failure

 make distclean ; ../configure --build-suffix=asterix && make -j12
>>>
>>> Does the attached patch fix this for you?
>>
>> yes
>>
>> next is:
>> make fate-timefilter
>>
>> doesnt work anymore
>>
>> make libavdevice/tests/timefilter
>> make: *** No rule to make target `libavdevice/tests/timefilter'.  Stop.
>>
>> i assume this is unintended, its a bit tricky to bisect with the
>> build system not fully working. Id first have to reduce the testcase
>> to the subbset that works on all checkouts ...
> 
> al

Re: [FFmpeg-devel] [PATCH] configure: force erroring out in check_disable_warning() if an option doesn't exists

2017-10-12 Thread Helmut K. C. Tessarek


On 2017-10-12 17:30, James Almer wrote:
> Should prevent some options from being added to cflags when they
> don't exist and the compiler only warns about it.

Just tested your patch.

Yippiieee, warnings gone!

-- 
regards Helmut K. C. Tessarek  KeyID 0xF7832007C11F128D
Key fingerprint = 28A3 1666 4FE8 D72C CFD5 8B23 F783 2007 C11F 128D

/*
   Thou shalt not follow the NULL pointer for chaos and madness
   await thee at its end.
*/
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [FFmpeg-cvslog] Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

2017-10-12 Thread James Almer
On 10/12/2017 6:33 PM, Michael Niedermayer wrote:
> On Thu, Oct 12, 2017 at 05:36:17PM -0300, James Almer wrote:
>> On 10/12/2017 4:25 PM, Michael Niedermayer wrote:
>>> On Thu, Oct 12, 2017 at 02:25:46PM -0300, James Almer wrote:
 On 10/12/2017 1:56 PM, Michael Niedermayer wrote:
> On Wed, Oct 11, 2017 at 10:30:13PM -0300, James Almer wrote:
>> On 10/11/2017 9:22 PM, Michael Niedermayer wrote:
>>> On Wed, Oct 11, 2017 at 09:26:18PM +, James Almer wrote:
 ffmpeg | branch: master | James Almer  | Wed Oct 11 
 17:55:25 2017 -0300| [6dfcbd80ad446ff163b47f2bf432bbf706436ea8] | 
 committer: James Almer

 Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

 * commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63':
   build: Fine-grained link-time dependency settings

 Also included are bug fix commits 
 5ff3b5cafcc685b6936d16602b0f80aa09a95870,
 d9da7151eef7fc469787e7298196cea291acfd82 and
 5e27ef800bfa2be17a6353ddedac6b7400e4624f.

 Merged-by: James Almer 

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

  Makefile|   3 +-
  configure   | 297 
 +---
  ffbuild/common.mak  |   2 +-
  ffbuild/library.mak |   2 +-
  tests/checkasm/Makefile |   2 +-
  5 files changed, 187 insertions(+), 119 deletions(-)
>>>
>>> This breaks build here (linux x86-64)
>>>
>>> ./configure --enable-libxavs --enable-gpl
>>> ERROR: libxavs not found
>>>
>>> Iam trying to test most patches for FFmpeg before they are pushed, but
>>> i can only test what is posted for review on ffmpeg-devel ...
>>
>> Testing locally i see it's complaining about missing pthreads and libm
>> ldflag, since they of course are not part of the global extralibs 
>> anymore.
>> Switching detection to pkg-config would be ideal, but for some reason
>> even the supplied .pc file doesn't include the -lm ldflag, only the
>> pthreads one, and libxavs looks like it hasn't been updated for six
>> years now (at least the one in sourceforge), so it's unlikely to be
>> fixed on their end.
>>
>> Can you test the attached patch?
>
> seems to fix it

 Pushed then. Thanks.

> but i get a build failure with fontconfig now:
>
> ../configure  --enable-fontconfig  && make -j12
>
> LD  ffmpeg_g
> libavfilter/libavfilter.a(avf_showcqt.o): In function `render_fontconfig':
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:606: undefined reference to 
> `FcInitLoadConfigAndFonts'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:611: undefined reference to 
> `FcNameParse'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:617: undefined reference to 
> `FcDefaultSubstitute'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:619: undefined reference to 
> `FcConfigSubstitute'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:626: undefined reference to 
> `FcFontMatch'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:627: undefined reference to 
> `FcPatternDestroy'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:643: undefined reference to 
> `FcPatternDestroy'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:644: undefined reference to 
> `FcConfigDestroy'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:621: undefined reference to 
> `FcPatternDestroy'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:622: undefined reference to 
> `FcConfigDestroy'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:635: undefined reference to 
> `FcPatternGetString'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:613: undefined reference to 
> `FcConfigDestroy'
> collect2: error: ld returned 1 exit status
> make: *** [ffmpeg_g] Error 1

 That'd be because showcqt is missing its fontconfig and freetype deps in
 configure, a mistake that was hidden by extralibs being global before
 this merge.

 Does the attached patch fix it?
>>>
>>> it seems so but it just results in the next failure
>>>
>>> make distclean ; ../configure --build-suffix=asterix && make -j12
>>
>> Does the attached patch fix this for you?
> 
> yes
> 
> next is:
> make fate-timefilter
> 
> doesnt work anymore
> 
> make libavdevice/tests/timefilter
> make: *** No rule to make target `libavdevice/tests/timefilter'.  Stop.
> 
> i assume this is unintended, its a bit tricky to bisect with the
> build system not fully working. Id first have to reduce the testcase
> to the subbset that works on all checkouts ...

This is jack. It's supposedly autodetected and it shouldn't have changed
in behavior.

What's the value for CONFIG_JACK_INDEV?
___
ffmpeg-devel mailing

Re: [FFmpeg-devel] [FFmpeg-cvslog] Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

2017-10-12 Thread Carl Eugen Hoyos
2017-10-12 23:45 GMT+02:00 James Almer :
> On 10/12/2017 6:41 PM, Michael Niedermayer wrote:

>> also video4linux is gone
>>
>> ./configure
>> config.h:#define CONFIG_V4L2_INDEV 0
>>
>> and with a branch with all that reverted:
>> ./configure
>> config.h:#define CONFIG_V4L2_INDEV 1
>
> v4l2 is not autodetected.

I tested several old versions, for the last 10 years,
v4l2 indev was auto-detected.

From tests with really old versions I know that
video4linux (1) was always auto-detected (or
auto-enabled).

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


Re: [FFmpeg-devel] [FFmpeg-cvslog] Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

2017-10-12 Thread Michael Niedermayer
On Thu, Oct 12, 2017 at 06:46:08PM -0300, James Almer wrote:
> On 10/12/2017 6:33 PM, Michael Niedermayer wrote:
> > On Thu, Oct 12, 2017 at 05:36:17PM -0300, James Almer wrote:
> >> On 10/12/2017 4:25 PM, Michael Niedermayer wrote:
> >>> On Thu, Oct 12, 2017 at 02:25:46PM -0300, James Almer wrote:
>  On 10/12/2017 1:56 PM, Michael Niedermayer wrote:
> > On Wed, Oct 11, 2017 at 10:30:13PM -0300, James Almer wrote:
> >> On 10/11/2017 9:22 PM, Michael Niedermayer wrote:
> >>> On Wed, Oct 11, 2017 at 09:26:18PM +, James Almer wrote:
>  ffmpeg | branch: master | James Almer  | Wed Oct 
>  11 17:55:25 2017 -0300| [6dfcbd80ad446ff163b47f2bf432bbf706436ea8] | 
>  committer: James Almer
> 
>  Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'
> 
>  * commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63':
>    build: Fine-grained link-time dependency settings
> 
>  Also included are bug fix commits 
>  5ff3b5cafcc685b6936d16602b0f80aa09a95870,
>  d9da7151eef7fc469787e7298196cea291acfd82 and
>  5e27ef800bfa2be17a6353ddedac6b7400e4624f.
> 
>  Merged-by: James Almer 
> 
> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6dfcbd80ad446ff163b47f2bf432bbf706436ea8
>  ---
> 
>   Makefile|   3 +-
>   configure   | 297 
>  +---
>   ffbuild/common.mak  |   2 +-
>   ffbuild/library.mak |   2 +-
>   tests/checkasm/Makefile |   2 +-
>   5 files changed, 187 insertions(+), 119 deletions(-)
> >>>
> >>> This breaks build here (linux x86-64)
> >>>
> >>> ./configure --enable-libxavs --enable-gpl
> >>> ERROR: libxavs not found
> >>>
> >>> Iam trying to test most patches for FFmpeg before they are pushed, but
> >>> i can only test what is posted for review on ffmpeg-devel ...
> >>
> >> Testing locally i see it's complaining about missing pthreads and libm
> >> ldflag, since they of course are not part of the global extralibs 
> >> anymore.
> >> Switching detection to pkg-config would be ideal, but for some reason
> >> even the supplied .pc file doesn't include the -lm ldflag, only the
> >> pthreads one, and libxavs looks like it hasn't been updated for six
> >> years now (at least the one in sourceforge), so it's unlikely to be
> >> fixed on their end.
> >>
> >> Can you test the attached patch?
> >
> > seems to fix it
> 
>  Pushed then. Thanks.
> 
> > but i get a build failure with fontconfig now:
> >
> > ../configure  --enable-fontconfig  && make -j12
> >
> > LD  ffmpeg_g
> > libavfilter/libavfilter.a(avf_showcqt.o): In function 
> > `render_fontconfig':
> > ffmpeg/nasm/src/libavfilter/avf_showcqt.c:606: undefined reference to 
> > `FcInitLoadConfigAndFonts'
> > ffmpeg/nasm/src/libavfilter/avf_showcqt.c:611: undefined reference to 
> > `FcNameParse'
> > ffmpeg/nasm/src/libavfilter/avf_showcqt.c:617: undefined reference to 
> > `FcDefaultSubstitute'
> > ffmpeg/nasm/src/libavfilter/avf_showcqt.c:619: undefined reference to 
> > `FcConfigSubstitute'
> > ffmpeg/nasm/src/libavfilter/avf_showcqt.c:626: undefined reference to 
> > `FcFontMatch'
> > ffmpeg/nasm/src/libavfilter/avf_showcqt.c:627: undefined reference to 
> > `FcPatternDestroy'
> > ffmpeg/nasm/src/libavfilter/avf_showcqt.c:643: undefined reference to 
> > `FcPatternDestroy'
> > ffmpeg/nasm/src/libavfilter/avf_showcqt.c:644: undefined reference to 
> > `FcConfigDestroy'
> > ffmpeg/nasm/src/libavfilter/avf_showcqt.c:621: undefined reference to 
> > `FcPatternDestroy'
> > ffmpeg/nasm/src/libavfilter/avf_showcqt.c:622: undefined reference to 
> > `FcConfigDestroy'
> > ffmpeg/nasm/src/libavfilter/avf_showcqt.c:635: undefined reference to 
> > `FcPatternGetString'
> > ffmpeg/nasm/src/libavfilter/avf_showcqt.c:613: undefined reference to 
> > `FcConfigDestroy'
> > collect2: error: ld returned 1 exit status
> > make: *** [ffmpeg_g] Error 1
> 
>  That'd be because showcqt is missing its fontconfig and freetype deps in
>  configure, a mistake that was hidden by extralibs being global before
>  this merge.
> 
>  Does the attached patch fix it?
> >>>
> >>> it seems so but it just results in the next failure
> >>>
> >>> make distclean ; ../configure --build-suffix=asterix && make -j12
> >>
> >> Does the attached patch fix this for you?
> > 
> > yes
> > 
> > next is:
> > make fate-timefilter
> > 
> > doesnt work anymore
> > 
> > make libavdevice/tests/timefilter
> > make: *** No rule to make target `libavdevice/tests/timefilter'.  Stop.
> > 
> > i assume this is unintended, its a bit tricky to bisect with the
> > build system n

Re: [FFmpeg-devel] [FFmpeg-cvslog] Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

2017-10-12 Thread James Almer
On 10/12/2017 6:50 PM, Carl Eugen Hoyos wrote:
> 2017-10-12 23:45 GMT+02:00 James Almer :
>> On 10/12/2017 6:41 PM, Michael Niedermayer wrote:
> 
>>> also video4linux is gone
>>>
>>> ./configure
>>> config.h:#define CONFIG_V4L2_INDEV 0
>>>
>>> and with a branch with all that reverted:
>>> ./configure
>>> config.h:#define CONFIG_V4L2_INDEV 1
>>
>> v4l2 is not autodetected.
> 
> I tested several old versions, for the last 10 years,
> v4l2 indev was auto-detected.
> 
> From tests with really old versions I know that
> video4linux (1) was always auto-detected (or
> auto-enabled).
> 
> Carl Eugen

configure has the line

--enable-libv4l2 enable libv4l2/v4l-utils [no]

And before the commit i mentioned, it had the line

libv4l2_indev_deps="libv4l2"

If you check alldevices.c, there's no indev called "libv4l2_indev", only
one called "v4l2_indev".
Since the latter had no dependency on libv4l2, it was of course always
enabled by default. I changed that in 734ed38931 (see ticket #6729,
where doing that fixed a failure).

So that indev being auto-enabled might have been a mistake all this time.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Fix crash if av_vdpau_bind_context() is not used.

2017-10-12 Thread Ivan Kalvachev
On 10/11/17, Ivan Kalvachev  wrote:
> On 10/10/17, wm4  wrote:
>> On Tue, 10 Oct 2017 03:24:56 +0300
>> Ivan Kalvachev  wrote:
>>
>>> On 10/9/17, wm4  wrote:
>>> > On Mon, 9 Oct 2017 03:04:53 +0300
>>> > Ivan Kalvachev  wrote:
>>> >
>>> >> The public functions av_alloc_vdpaucontext() and
>>> >> av_vdpau_alloc_context() are allocating AVVDPAUContext
>>> >> structure that is supposed to be placed in avctx->hwaccel_context.
>>> >>
>>> >> However the rest of libavcodec/vdpau.c uses avctx->hwaccel_context
>>> >> as struct VDPAUHWContext, that is bigger and does contain
>>> >> AVVDPAUContext as first member.
>>> >>
>>> >> The usage includes write to the new variables in the bigger stuct,
>>> >> without checking for block size.
>>> >>
>>> >> Fix by always allocating the bigger structure.
>>> >>
>>> >> BTW,
>>> >> I have no idea why the new fields haven't simply been added to the
>>> >> existing struct...
>>> >> It seems that the programmer who wrote this has been aware of the
>>> >> problem,
>>> >> because av_vdpau_bind_context reallocates the structure.
>>> >>
>>> >> It might be good idea to check the other usages of this reallocation
>>> >> function.
>>> >>
>>> >> Best Regards
>>> >>Ivan Kalvachev
>>> >
>>> > IMO not really worth fixing at this point, because this is the old-old
>>> > vdpau API. Even av_vdpau_bind_context() (which does not require using
>>> > av_alloc_vdpaucontext()) is deprecated. Or rather should be - I just
>>> > haven't bothered deprecating it because the deprecation dance is too
>>> > messy. In any case, you shouldn't use any of those APIs - use the
>>> > generic hwaccel API instead (setting hw_frames_ctx or hw_device_ctx).
>>>
>>> Every bug must be fixed, even if the code is going to be removed next.
>>>
>>> Since you "didn't bother" to deprecate it, this code will remain even
>>> after
>>> the API bump. And it is still (mis)used by at least one program that
>>> crashed on me.
>>>
>>> So it MUST be fixed.
>>
>> Well, if you insist, feel free to attempt to maintain it, but I won't
>> care, even if I make changes to the code under the newer API (about
>> which I care). I tried to remove some vdpau code earlier which had
>> been deprecated for years, but this was rejected, so why care about
>> deprecation or whether an ancient API is actually broken? Not me.
>
> You are not making any sense.
>
> Anyway. Do you have any objection for this patch to be committed?

I'd like this fix to be committed before the 3.4 release.
Anybody?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Fix crash if av_vdpau_bind_context() is not used.

2017-10-12 Thread Carl Eugen Hoyos
2017-10-09 2:04 GMT+02:00 Ivan Kalvachev :
> The public functions av_alloc_vdpaucontext() and
> av_vdpau_alloc_context() are allocating AVVDPAUContext
> structure that is supposed to be placed in avctx->hwaccel_context.
>
> However the rest of libavcodec/vdpau.c uses avctx->hwaccel_context
> as struct VDPAUHWContext, that is bigger and does contain
> AVVDPAUContext as first member.
>
> The usage includes write to the new variables in the bigger stuct,
> without checking for block size.
>
> Fix by always allocating the bigger structure.

Patch applied and backported.

Thank you, Carl Eugen
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [FFmpeg-cvslog] Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

2017-10-12 Thread Carl Eugen Hoyos
2017-10-13 0:12 GMT+02:00 James Almer :
> On 10/12/2017 6:50 PM, Carl Eugen Hoyos wrote:
>> 2017-10-12 23:45 GMT+02:00 James Almer :
>>> On 10/12/2017 6:41 PM, Michael Niedermayer wrote:
>>
 also video4linux is gone

 ./configure
 config.h:#define CONFIG_V4L2_INDEV 0

 and with a branch with all that reverted:
 ./configure
 config.h:#define CONFIG_V4L2_INDEV 1
>>>
>>> v4l2 is not autodetected.
>>
>> I tested several old versions, for the last 10 years,
>> v4l2 indev was auto-detected.
>>
>> From tests with really old versions I know that
>> video4linux (1) was always auto-detected (or
>> auto-enabled).
>>
>> Carl Eugen
>
> configure has the line
>
> --enable-libv4l2 enable libv4l2/v4l-utils [no]
>
> And before the commit i mentioned, it had the line
>
> libv4l2_indev_deps="libv4l2"
>
> If you check alldevices.c, there's no indev called "libv4l2_indev", only
> one called "v4l2_indev".
> Since the latter had no dependency on libv4l2, it was of course always
> enabled by default. I changed that in 734ed38931 (see ticket #6729,
> where doing that fixed a failure).
>
> So that indev being auto-enabled might have been a mistake all this time.

Sorry, what are you talking about?
v4l2 was added in 2006 and auto-detected ever since.
Before 2006, there was already v4l (1) which was
auto-enabled since forever afair.

There is a helper library called libv4l2 that - luckily -
is not auto-detected and shouldn't be.

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


Re: [FFmpeg-devel] [PATCH] Fix crash if av_vdpau_bind_context() is not used.

2017-10-12 Thread Ivan Kalvachev
On 10/13/17, Carl Eugen Hoyos  wrote:
> 2017-10-09 2:04 GMT+02:00 Ivan Kalvachev :
>> The public functions av_alloc_vdpaucontext() and
>> av_vdpau_alloc_context() are allocating AVVDPAUContext
>> structure that is supposed to be placed in avctx->hwaccel_context.
>>
>> However the rest of libavcodec/vdpau.c uses avctx->hwaccel_context
>> as struct VDPAUHWContext, that is bigger and does contain
>> AVVDPAUContext as first member.
>>
>> The usage includes write to the new variables in the bigger stuct,
>> without checking for block size.
>>
>> Fix by always allocating the bigger structure.
>
> Patch applied and backported.
>
> Thank you, Carl Eugen

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


Re: [FFmpeg-devel] [FFmpeg-cvslog] Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

2017-10-12 Thread James Almer
On 10/12/2017 7:04 PM, Michael Niedermayer wrote:
> On Thu, Oct 12, 2017 at 06:46:08PM -0300, James Almer wrote:
>> On 10/12/2017 6:33 PM, Michael Niedermayer wrote:
>>> On Thu, Oct 12, 2017 at 05:36:17PM -0300, James Almer wrote:
 On 10/12/2017 4:25 PM, Michael Niedermayer wrote:
> On Thu, Oct 12, 2017 at 02:25:46PM -0300, James Almer wrote:
>> On 10/12/2017 1:56 PM, Michael Niedermayer wrote:
>>> On Wed, Oct 11, 2017 at 10:30:13PM -0300, James Almer wrote:
 On 10/11/2017 9:22 PM, Michael Niedermayer wrote:
> On Wed, Oct 11, 2017 at 09:26:18PM +, James Almer wrote:
>> ffmpeg | branch: master | James Almer  | Wed Oct 
>> 11 17:55:25 2017 -0300| [6dfcbd80ad446ff163b47f2bf432bbf706436ea8] | 
>> committer: James Almer
>>
>> Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'
>>
>> * commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63':
>>   build: Fine-grained link-time dependency settings
>>
>> Also included are bug fix commits 
>> 5ff3b5cafcc685b6936d16602b0f80aa09a95870,
>> d9da7151eef7fc469787e7298196cea291acfd82 and
>> 5e27ef800bfa2be17a6353ddedac6b7400e4624f.
>>
>> Merged-by: James Almer 
>>
>>> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6dfcbd80ad446ff163b47f2bf432bbf706436ea8
>> ---
>>
>>  Makefile|   3 +-
>>  configure   | 297 
>> +---
>>  ffbuild/common.mak  |   2 +-
>>  ffbuild/library.mak |   2 +-
>>  tests/checkasm/Makefile |   2 +-
>>  5 files changed, 187 insertions(+), 119 deletions(-)
>
> This breaks build here (linux x86-64)
>
> ./configure --enable-libxavs --enable-gpl
> ERROR: libxavs not found
>
> Iam trying to test most patches for FFmpeg before they are pushed, but
> i can only test what is posted for review on ffmpeg-devel ...

 Testing locally i see it's complaining about missing pthreads and libm
 ldflag, since they of course are not part of the global extralibs 
 anymore.
 Switching detection to pkg-config would be ideal, but for some reason
 even the supplied .pc file doesn't include the -lm ldflag, only the
 pthreads one, and libxavs looks like it hasn't been updated for six
 years now (at least the one in sourceforge), so it's unlikely to be
 fixed on their end.

 Can you test the attached patch?
>>>
>>> seems to fix it
>>
>> Pushed then. Thanks.
>>
>>> but i get a build failure with fontconfig now:
>>>
>>> ../configure  --enable-fontconfig  && make -j12
>>>
>>> LD  ffmpeg_g
>>> libavfilter/libavfilter.a(avf_showcqt.o): In function 
>>> `render_fontconfig':
>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:606: undefined reference to 
>>> `FcInitLoadConfigAndFonts'
>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:611: undefined reference to 
>>> `FcNameParse'
>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:617: undefined reference to 
>>> `FcDefaultSubstitute'
>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:619: undefined reference to 
>>> `FcConfigSubstitute'
>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:626: undefined reference to 
>>> `FcFontMatch'
>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:627: undefined reference to 
>>> `FcPatternDestroy'
>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:643: undefined reference to 
>>> `FcPatternDestroy'
>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:644: undefined reference to 
>>> `FcConfigDestroy'
>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:621: undefined reference to 
>>> `FcPatternDestroy'
>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:622: undefined reference to 
>>> `FcConfigDestroy'
>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:635: undefined reference to 
>>> `FcPatternGetString'
>>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:613: undefined reference to 
>>> `FcConfigDestroy'
>>> collect2: error: ld returned 1 exit status
>>> make: *** [ffmpeg_g] Error 1
>>
>> That'd be because showcqt is missing its fontconfig and freetype deps in
>> configure, a mistake that was hidden by extralibs being global before
>> this merge.
>>
>> Does the attached patch fix it?
>
> it seems so but it just results in the next failure
>
> make distclean ; ../configure --build-suffix=asterix && make -j12

 Does the attached patch fix this for you?
>>>
>>> yes
>>>
>>> next is:
>>> make fate-timefilter
>>>
>>> doesnt work anymore
>>>
>>> make libavdevice/tests/timefilter
>>> make: *** No rule to make target `libavdevice/tests/timefilter'.  Stop.
>>>
>>> i assume this is unintended, its a 

Re: [FFmpeg-devel] [FFmpeg-cvslog] Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

2017-10-12 Thread James Almer
On 10/12/2017 7:19 PM, Carl Eugen Hoyos wrote:
> 2017-10-13 0:12 GMT+02:00 James Almer :
>> On 10/12/2017 6:50 PM, Carl Eugen Hoyos wrote:
>>> 2017-10-12 23:45 GMT+02:00 James Almer :
 On 10/12/2017 6:41 PM, Michael Niedermayer wrote:
>>>
> also video4linux is gone
>
> ./configure
> config.h:#define CONFIG_V4L2_INDEV 0
>
> and with a branch with all that reverted:
> ./configure
> config.h:#define CONFIG_V4L2_INDEV 1

 v4l2 is not autodetected.
>>>
>>> I tested several old versions, for the last 10 years,
>>> v4l2 indev was auto-detected.
>>>
>>> From tests with really old versions I know that
>>> video4linux (1) was always auto-detected (or
>>> auto-enabled).
>>>
>>> Carl Eugen
>>
>> configure has the line
>>
>> --enable-libv4l2 enable libv4l2/v4l-utils [no]
>>
>> And before the commit i mentioned, it had the line
>>
>> libv4l2_indev_deps="libv4l2"
>>
>> If you check alldevices.c, there's no indev called "libv4l2_indev", only
>> one called "v4l2_indev".
>> Since the latter had no dependency on libv4l2, it was of course always
>> enabled by default. I changed that in 734ed38931 (see ticket #6729,
>> where doing that fixed a failure).
>>
>> So that indev being auto-enabled might have been a mistake all this time.
> 
> Sorry, what are you talking about?
> v4l2 was added in 2006 and auto-detected ever since.
> Before 2006, there was already v4l (1) which was
> auto-enabled since forever afair.
> 
> There is a helper library called libv4l2 that - luckily -
> is not auto-detected and shouldn't be.

So v4l2_indev should not depend on libv4l2? Any idea why doing that
fixed ticket #6729?

Also, i don't get then why was there a libv4l2_indev listed in configure.

> 
> Carl Eugen
> ___
> 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


Re: [FFmpeg-devel] [FFmpeg-cvslog] Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

2017-10-12 Thread James Almer
On 10/12/2017 6:42 PM, Reino Wijnsma wrote:
> On 12-10-2017 20:11, Helmut K. C. Tessarek  wrote:
>> I'm not sure why you guys have to make all these changes to the build
>> process lately.
>>
>> All of a sudden ffmpeg does not compile anymore. During configure I get:
>>
>> ERROR: libbluray not found using pkg-config
>>
>> which worked perfectly 2 days ago. So, whatever changes you made, they
>> screwed up other things.
> Same here. I was about to compile another FFmpeg executable, but got
> configure complaining about libbluray as well (note: I always use
> --pkg-config-flags=--static).
> I've worked around that by changing the pc-file
> 
> prefix=/cygdrive/[...]
> exec_prefix=${prefix}
> libdir=${exec_prefix}/lib
> includedir=${prefix}/include
> 
> Name: libbluray
> Description: library supporting Blu-ray playback
> Version: 1.0.1
> Libs: -L${libdir} -lbluray
> Libs.private:  -L/cygdrive/[...]/lib -lxml2 -L/cygdrive/[...]/lib
> -lfreetype -lgdi32
> Cflags: -I${includedir}
> 
> ...into:
> 
> prefix=/cygdrive/[...]
> exec_prefix=${prefix}
> libdir=${exec_prefix}/lib
> includedir=${prefix}/include
> 
> Name: libbluray
> Description: library supporting Blu-ray playback
> Version: 1.0.1
> Requires: libxml-2.0, freetype2
> Libs: -L${libdir} -lbluray
> Libs.private:  -lgdi32
> Cflags: -I${includedir}

Thanks a lot! You confirmed what i suspected.

Guess we'll have to get libbluray to change their .pc file.

> 
> Next however was iLBC. I got "undefined reference to `pthread_once'" and
> "ERROR: libilbc not found". I had to add --extra-libs=-lpthread to 'fix'
> that.
> 
> Now it's complaining about libmysofa:
> 
> /cygdrive/[...]/lib/libmysofa.a(gunzip.c.obj):gunzip.c:(.text+0x5f):
> undefined reference to `inflateInit_'
> /cygdrive/[...]/lib/libmysofa.a(gunzip.c.obj):gunzip.c:(.text+0x76):
> undefined reference to `inflate'
> /cygdrive/[...]/lib/libmysofa.a(gunzip.c.obj):gunzip.c:(.text+0x8a):
> undefined reference to `inflateEnd'
> collect2: error: ld returned 1 exit status
> ERROR: libmysofa not found

Does libmysofa have a pkg-config file? Otherwise, guess i'll have to add
-lz to its extralibs.

> 
> Something is seriously broken here.

Dependencies are being figured out after ldflags were changed into a
per-component basis instead of globally.

> 
> On 12-10-2017 22:36, James Almer  wrote:
>> Does the attached patch ('0001-build-fix-building-with-build-suffix.patch') 
>> fix this for you?
> Does nothing for me.

It's not meant to. That fixed another bug.

> 
> -- Reino
> ___
> 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


Re: [FFmpeg-devel] [FFmpeg-cvslog] Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

2017-10-12 Thread Carl Eugen Hoyos
2017-10-13 0:24 GMT+02:00 James Almer :
> On 10/12/2017 7:19 PM, Carl Eugen Hoyos wrote:
>> 2017-10-13 0:12 GMT+02:00 James Almer :
>>> On 10/12/2017 6:50 PM, Carl Eugen Hoyos wrote:
 2017-10-12 23:45 GMT+02:00 James Almer :
> On 10/12/2017 6:41 PM, Michael Niedermayer wrote:

>> also video4linux is gone
>>
>> ./configure
>> config.h:#define CONFIG_V4L2_INDEV 0
>>
>> and with a branch with all that reverted:
>> ./configure
>> config.h:#define CONFIG_V4L2_INDEV 1
>
> v4l2 is not autodetected.

 I tested several old versions, for the last 10 years,
 v4l2 indev was auto-detected.

 From tests with really old versions I know that
 video4linux (1) was always auto-detected (or
 auto-enabled).

 Carl Eugen
>>>
>>> configure has the line
>>>
>>> --enable-libv4l2 enable libv4l2/v4l-utils [no]
>>>
>>> And before the commit i mentioned, it had the line
>>>
>>> libv4l2_indev_deps="libv4l2"
>>>
>>> If you check alldevices.c, there's no indev called "libv4l2_indev", only
>>> one called "v4l2_indev".
>>> Since the latter had no dependency on libv4l2, it was of course always
>>> enabled by default. I changed that in 734ed38931 (see ticket #6729,
>>> where doing that fixed a failure).
>>>
>>> So that indev being auto-enabled might have been a mistake all this time.
>>
>> Sorry, what are you talking about?
>> v4l2 was added in 2006 and auto-detected ever since.
>> Before 2006, there was already v4l (1) which was
>> auto-enabled since forever afair.
>>
>> There is a helper library called libv4l2 that - luckily -
>> is not auto-detected and shouldn't be.
>
> So v4l2_indev should not depend on libv4l2?

No, definitely not.

> Any idea why doing that fixed ticket #6729?

Iiuc, it disabled v4l2 so all related build errors
were fixed.

Since I am so slow, could you explain what issues
were fixed by 6dfcbd80?

Thank you, Carl Eugen
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [FFmpeg-cvslog] Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

2017-10-12 Thread James Almer
On 10/12/2017 7:34 PM, Carl Eugen Hoyos wrote:
> 2017-10-13 0:24 GMT+02:00 James Almer :
>> On 10/12/2017 7:19 PM, Carl Eugen Hoyos wrote:
>>> 2017-10-13 0:12 GMT+02:00 James Almer :
 On 10/12/2017 6:50 PM, Carl Eugen Hoyos wrote:
> 2017-10-12 23:45 GMT+02:00 James Almer :
>> On 10/12/2017 6:41 PM, Michael Niedermayer wrote:
>
>>> also video4linux is gone
>>>
>>> ./configure
>>> config.h:#define CONFIG_V4L2_INDEV 0
>>>
>>> and with a branch with all that reverted:
>>> ./configure
>>> config.h:#define CONFIG_V4L2_INDEV 1
>>
>> v4l2 is not autodetected.
>
> I tested several old versions, for the last 10 years,
> v4l2 indev was auto-detected.
>
> From tests with really old versions I know that
> video4linux (1) was always auto-detected (or
> auto-enabled).
>
> Carl Eugen

 configure has the line

 --enable-libv4l2 enable libv4l2/v4l-utils [no]

 And before the commit i mentioned, it had the line

 libv4l2_indev_deps="libv4l2"

 If you check alldevices.c, there's no indev called "libv4l2_indev", only
 one called "v4l2_indev".
 Since the latter had no dependency on libv4l2, it was of course always
 enabled by default. I changed that in 734ed38931 (see ticket #6729,
 where doing that fixed a failure).

 So that indev being auto-enabled might have been a mistake all this time.
>>>
>>> Sorry, what are you talking about?
>>> v4l2 was added in 2006 and auto-detected ever since.
>>> Before 2006, there was already v4l (1) which was
>>> auto-enabled since forever afair.
>>>
>>> There is a helper library called libv4l2 that - luckily -
>>> is not auto-detected and shouldn't be.
>>
>> So v4l2_indev should not depend on libv4l2?
> 
> No, definitely not.
> 
>> Any idea why doing that fixed ticket #6729?
> 
> Iiuc, it disabled v4l2 so all related build errors
> were fixed.
> 
> Since I am so slow, could you explain what issues
> were fixed by 6dfcbd80?

The extralibs from the libv4l2 pkg-config package were not added to the
ld command line for the user. By making v4l2_indev depend on that
package, that was solved.

Does the attached patch look like a better solution for this?
From 2f4b0bc8b551f0a8ef5f02f6be4177a420e90a65 Mon Sep 17 00:00:00 2001
From: James Almer 
Date: Thu, 12 Oct 2017 19:36:19 -0300
Subject: [PATCH] configure: make v4l2 devices not depend on libv4l2

But use it if available.

Signed-off-by: James Almer 
---
 configure | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index ade67a31bb..5b3d1887fa 100755
--- a/configure
+++ b/configure
@@ -3116,7 +3116,6 @@ kmsgrab_indev_deps="libdrm"
 lavfi_indev_deps="avfilter"
 libcdio_indev_deps="libcdio"
 libdc1394_indev_deps="libdc1394"
-v4l2_indev_deps="libv4l2"
 openal_indev_deps="openal"
 opengl_outdev_deps="opengl"
 oss_indev_deps_any="soundcard_h sys_soundcard_h"
@@ -3127,7 +3126,9 @@ sdl2_outdev_deps="sdl2"
 sndio_indev_deps="sndio"
 sndio_outdev_deps="sndio"
 v4l2_indev_deps_any="linux_videodev2_h sys_videoio_h"
+v4l2_indev_suggest="libv4l2"
 v4l2_outdev_deps_any="linux_videodev2_h sys_videoio_h"
+v4l2_outdev_suggest="libv4l2"
 vfwcap_indev_deps="vfw32 vfwcap_defines"
 xcbgrab_indev_deps="libxcb"
 xcbgrab_indev_suggest="libxcb_shm libxcb_shape libxcb_xfixes"
-- 
2.14.2

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


Re: [FFmpeg-devel] [FFmpeg-cvslog] Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

2017-10-12 Thread Helmut K. C. Tessarek


On 2017-10-12 17:35, James Almer wrote:
> bzip2 and zlib show up as dependencies of freetype2 in the
> "Requires.private" section of its .pc file in your system, right? If

almost, my freetype2.pc looks like this:

prefix=/Users/Shared/ffmpeg/sw
exec_prefix=/Users/Shared/ffmpeg/sw
libdir=/Users/Shared/ffmpeg/sw/lib
includedir=/Users/Shared/ffmpeg/sw/include

Name: FreeType 2
URL: http://freetype.org
Description: A free, high-quality, and portable font engine.
Version: 18.6.12
Requires:
Requires.private: zlib
Libs: -L${libdir} -lfreetype
Libs.private: -lbz2
Cflags: -I${includedir}/freetype2

> you're using an static build of freetype2, pkg-config needs to be run
> with --static to actually get the required ldflags for said dependencies.
> 
> Now, the issue here is libbluray adding freetype2 ldflags directly
> instead of setting freetype2 as a dependency, much like freetype2 sets
> bzip2 and zlib.

my libbluray.pc look like this:

prefix=/Users/Shared/ffmpeg/sw
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: libbluray
Description: library supporting Blu-ray playback
Version: 1.0.0
Libs: -L${libdir} -lbluray
Libs.private:   -L${libdir} -lfreetype -L${libdir} -lfontconfig -lfreetype
Cflags: -I${includedir}

> I suppose that if that change is done to libbluray's .pc file (namely,
> adding a "Requires.private: freetype2 fontconfig" line or similar, if i
> understand this correctly), you'll be able to use the --static
> pkg-config-flag and remove most if not all of these LDFLAGS you list below.
> 

It doesn't seem to work, because I already have those in the
libs.private section.

-- 
regards Helmut K. C. Tessarek  KeyID 0xF7832007C11F128D
Key fingerprint = 28A3 1666 4FE8 D72C CFD5 8B23 F783 2007 C11F 128D

/*
   Thou shalt not follow the NULL pointer for chaos and madness
   await thee at its end.
*/
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [FFmpeg-cvslog] Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

2017-10-12 Thread James Almer
On 10/12/2017 7:48 PM, Helmut K. C. Tessarek wrote:
> 
> 
> On 2017-10-12 17:35, James Almer wrote:
>> bzip2 and zlib show up as dependencies of freetype2 in the
>> "Requires.private" section of its .pc file in your system, right? If
> 
> almost, my freetype2.pc looks like this:
> 
> prefix=/Users/Shared/ffmpeg/sw
> exec_prefix=/Users/Shared/ffmpeg/sw
> libdir=/Users/Shared/ffmpeg/sw/lib
> includedir=/Users/Shared/ffmpeg/sw/include
> 
> Name: FreeType 2
> URL: http://freetype.org
> Description: A free, high-quality, and portable font engine.
> Version: 18.6.12
> Requires:
> Requires.private: zlib
> Libs: -L${libdir} -lfreetype
> Libs.private: -lbz2
> Cflags: -I${includedir}/freetype2

Ideally/IMO, bzip2 would be the same as zlib, but in this case it
probably makes no difference.

> 
>> you're using an static build of freetype2, pkg-config needs to be run
>> with --static to actually get the required ldflags for said dependencies.
>>
>> Now, the issue here is libbluray adding freetype2 ldflags directly
>> instead of setting freetype2 as a dependency, much like freetype2 sets
>> bzip2 and zlib.
> 
> my libbluray.pc look like this:
> 
> prefix=/Users/Shared/ffmpeg/sw
> exec_prefix=${prefix}
> libdir=${exec_prefix}/lib
> includedir=${prefix}/include
> 
> Name: libbluray
> Description: library supporting Blu-ray playback
> Version: 1.0.0
> Libs: -L${libdir} -lbluray
> Libs.private:   -L${libdir} -lfreetype -L${libdir} -lfontconfig -lfreetype
> Cflags: -I${includedir}
> 
>> I suppose that if that change is done to libbluray's .pc file (namely,
>> adding a "Requires.private: freetype2 fontconfig" line or similar, if i
>> understand this correctly), you'll be able to use the --static
>> pkg-config-flag and remove most if not all of these LDFLAGS you list below.
>>
> 
> It doesn't seem to work, because I already have those in the
> libs.private section.

Having those in Libs.Private just adds the listed -l* flags. If it had
instead a real dependency on freetype2 (Requires or Requires.private
entry), it'd then also get the bzip2 and zlib ldflags alongside the
freetype2 ldflags when you run pkg-config with the --static flag.

I'll see about sending a patch to libbluray to change this. Unless
someone else can do it instead while i'm busy fixing assorted failures.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [FFmpeg-cvslog] Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

2017-10-12 Thread Michael Niedermayer
On Thu, Oct 12, 2017 at 07:22:25PM -0300, James Almer wrote:
> On 10/12/2017 7:04 PM, Michael Niedermayer wrote:
> > On Thu, Oct 12, 2017 at 06:46:08PM -0300, James Almer wrote:
> >> On 10/12/2017 6:33 PM, Michael Niedermayer wrote:
> >>> On Thu, Oct 12, 2017 at 05:36:17PM -0300, James Almer wrote:
>  On 10/12/2017 4:25 PM, Michael Niedermayer wrote:
> > On Thu, Oct 12, 2017 at 02:25:46PM -0300, James Almer wrote:
> >> On 10/12/2017 1:56 PM, Michael Niedermayer wrote:
> >>> On Wed, Oct 11, 2017 at 10:30:13PM -0300, James Almer wrote:
>  On 10/11/2017 9:22 PM, Michael Niedermayer wrote:
> > On Wed, Oct 11, 2017 at 09:26:18PM +, James Almer wrote:
> >> ffmpeg | branch: master | James Almer  | Wed 
> >> Oct 11 17:55:25 2017 -0300| 
> >> [6dfcbd80ad446ff163b47f2bf432bbf706436ea8] | committer: James Almer
> >>
> >> Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'
> >>
> >> * commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63':
> >>   build: Fine-grained link-time dependency settings
> >>
> >> Also included are bug fix commits 
> >> 5ff3b5cafcc685b6936d16602b0f80aa09a95870,
> >> d9da7151eef7fc469787e7298196cea291acfd82 and
> >> 5e27ef800bfa2be17a6353ddedac6b7400e4624f.
> >>
> >> Merged-by: James Almer 
> >>
> >>> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6dfcbd80ad446ff163b47f2bf432bbf706436ea8
> >> ---
> >>
> >>  Makefile|   3 +-
> >>  configure   | 297 
> >> +---
> >>  ffbuild/common.mak  |   2 +-
> >>  ffbuild/library.mak |   2 +-
> >>  tests/checkasm/Makefile |   2 +-
> >>  5 files changed, 187 insertions(+), 119 deletions(-)
> >
> > This breaks build here (linux x86-64)
> >
> > ./configure --enable-libxavs --enable-gpl
> > ERROR: libxavs not found
> >
> > Iam trying to test most patches for FFmpeg before they are pushed, 
> > but
> > i can only test what is posted for review on ffmpeg-devel ...
> 
>  Testing locally i see it's complaining about missing pthreads and 
>  libm
>  ldflag, since they of course are not part of the global extralibs 
>  anymore.
>  Switching detection to pkg-config would be ideal, but for some reason
>  even the supplied .pc file doesn't include the -lm ldflag, only the
>  pthreads one, and libxavs looks like it hasn't been updated for six
>  years now (at least the one in sourceforge), so it's unlikely to be
>  fixed on their end.
> 
>  Can you test the attached patch?
> >>>
> >>> seems to fix it
> >>
> >> Pushed then. Thanks.
> >>
> >>> but i get a build failure with fontconfig now:
> >>>
> >>> ../configure  --enable-fontconfig  && make -j12
> >>>
> >>> LD  ffmpeg_g
> >>> libavfilter/libavfilter.a(avf_showcqt.o): In function 
> >>> `render_fontconfig':
> >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:606: undefined reference to 
> >>> `FcInitLoadConfigAndFonts'
> >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:611: undefined reference to 
> >>> `FcNameParse'
> >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:617: undefined reference to 
> >>> `FcDefaultSubstitute'
> >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:619: undefined reference to 
> >>> `FcConfigSubstitute'
> >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:626: undefined reference to 
> >>> `FcFontMatch'
> >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:627: undefined reference to 
> >>> `FcPatternDestroy'
> >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:643: undefined reference to 
> >>> `FcPatternDestroy'
> >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:644: undefined reference to 
> >>> `FcConfigDestroy'
> >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:621: undefined reference to 
> >>> `FcPatternDestroy'
> >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:622: undefined reference to 
> >>> `FcConfigDestroy'
> >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:635: undefined reference to 
> >>> `FcPatternGetString'
> >>> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:613: undefined reference to 
> >>> `FcConfigDestroy'
> >>> collect2: error: ld returned 1 exit status
> >>> make: *** [ffmpeg_g] Error 1
> >>
> >> That'd be because showcqt is missing its fontconfig and freetype deps 
> >> in
> >> configure, a mistake that was hidden by extralibs being global before
> >> this merge.
> >>
> >> Does the attached patch fix it?
> >
> > it seems so but it just results in the next failure
> >
> > make distclean ; ../configure --build-suffix=asterix && mak

Re: [FFmpeg-devel] [FFmpeg-cvslog] Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

2017-10-12 Thread James Almer
On 10/12/2017 8:16 PM, Michael Niedermayer wrote:
> On Thu, Oct 12, 2017 at 07:22:25PM -0300, James Almer wrote:
>> On 10/12/2017 7:04 PM, Michael Niedermayer wrote:
>>> On Thu, Oct 12, 2017 at 06:46:08PM -0300, James Almer wrote:
 On 10/12/2017 6:33 PM, Michael Niedermayer wrote:
> On Thu, Oct 12, 2017 at 05:36:17PM -0300, James Almer wrote:
>> On 10/12/2017 4:25 PM, Michael Niedermayer wrote:
>>> On Thu, Oct 12, 2017 at 02:25:46PM -0300, James Almer wrote:
 On 10/12/2017 1:56 PM, Michael Niedermayer wrote:
> On Wed, Oct 11, 2017 at 10:30:13PM -0300, James Almer wrote:
>> On 10/11/2017 9:22 PM, Michael Niedermayer wrote:
>>> On Wed, Oct 11, 2017 at 09:26:18PM +, James Almer wrote:
 ffmpeg | branch: master | James Almer  | Wed 
 Oct 11 17:55:25 2017 -0300| 
 [6dfcbd80ad446ff163b47f2bf432bbf706436ea8] | committer: James Almer

 Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

 * commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63':
   build: Fine-grained link-time dependency settings

 Also included are bug fix commits 
 5ff3b5cafcc685b6936d16602b0f80aa09a95870,
 d9da7151eef7fc469787e7298196cea291acfd82 and
 5e27ef800bfa2be17a6353ddedac6b7400e4624f.

 Merged-by: James Almer 

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

  Makefile|   3 +-
  configure   | 297 
 +---
  ffbuild/common.mak  |   2 +-
  ffbuild/library.mak |   2 +-
  tests/checkasm/Makefile |   2 +-
  5 files changed, 187 insertions(+), 119 deletions(-)
>>>
>>> This breaks build here (linux x86-64)
>>>
>>> ./configure --enable-libxavs --enable-gpl
>>> ERROR: libxavs not found
>>>
>>> Iam trying to test most patches for FFmpeg before they are pushed, 
>>> but
>>> i can only test what is posted for review on ffmpeg-devel ...
>>
>> Testing locally i see it's complaining about missing pthreads and 
>> libm
>> ldflag, since they of course are not part of the global extralibs 
>> anymore.
>> Switching detection to pkg-config would be ideal, but for some reason
>> even the supplied .pc file doesn't include the -lm ldflag, only the
>> pthreads one, and libxavs looks like it hasn't been updated for six
>> years now (at least the one in sourceforge), so it's unlikely to be
>> fixed on their end.
>>
>> Can you test the attached patch?
>
> seems to fix it

 Pushed then. Thanks.

> but i get a build failure with fontconfig now:
>
> ../configure  --enable-fontconfig  && make -j12
>
> LD  ffmpeg_g
> libavfilter/libavfilter.a(avf_showcqt.o): In function 
> `render_fontconfig':
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:606: undefined reference to 
> `FcInitLoadConfigAndFonts'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:611: undefined reference to 
> `FcNameParse'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:617: undefined reference to 
> `FcDefaultSubstitute'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:619: undefined reference to 
> `FcConfigSubstitute'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:626: undefined reference to 
> `FcFontMatch'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:627: undefined reference to 
> `FcPatternDestroy'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:643: undefined reference to 
> `FcPatternDestroy'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:644: undefined reference to 
> `FcConfigDestroy'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:621: undefined reference to 
> `FcPatternDestroy'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:622: undefined reference to 
> `FcConfigDestroy'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:635: undefined reference to 
> `FcPatternGetString'
> ffmpeg/nasm/src/libavfilter/avf_showcqt.c:613: undefined reference to 
> `FcConfigDestroy'
> collect2: error: ld returned 1 exit status
> make: *** [ffmpeg_g] Error 1

 That'd be because showcqt is missing its fontconfig and freetype deps 
 in
 configure, a mistake that was hidden by extralibs being global before
 this merge.

 Does the attached patch fix it?
>>>
>>> it seems so but it just results in the next failure
>>>
>>> make d

[FFmpeg-devel] [PATCH 1/2] avcodec/pafvideo: Check for bitstream end in decode_0()

2017-10-12 Thread Michael Niedermayer
Fixes: Timeout
Fixes: 3529/clusterfuzz-testcase-5057068371279872

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer 
---
 libavcodec/pafvideo.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavcodec/pafvideo.c b/libavcodec/pafvideo.c
index 91bfe16376..6980ae1b35 100644
--- a/libavcodec/pafvideo.c
+++ b/libavcodec/pafvideo.c
@@ -181,6 +181,8 @@ static int decode_0(PAFVideoDecContext *c, uint8_t *pkt, 
uint8_t code)
 dend   = c->frame[page] + c->frame_size;
 offset = (x & 0x7F) * 2;
 j  = bytestream2_get_le16(&c->gb) + offset;
+if (bytestream2_get_bytes_left(&c->gb) < (j - offset) * 16)
+return AVERROR_INVALIDDATA;
 do {
 offset++;
 if (dst + 3 * c->width + 4 > dend)
@@ -198,7 +200,8 @@ static int decode_0(PAFVideoDecContext *c, uint8_t *pkt, 
uint8_t code)
 do {
 set_src_position(c, &src, &send);
 if ((src + 3 * c->width + 4 > send) ||
-(dst + 3 * c->width + 4 > dend))
+(dst + 3 * c->width + 4 > dend) ||
+bytestream2_get_bytes_left(&c->gb) < 4)
 return AVERROR_INVALIDDATA;
 copy_block4(dst, src, c->width, c->width, 4);
 i++;
-- 
2.14.2

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


[FFmpeg-devel] [PATCH 2/2] avcodec/snowdec: Check mv_scale

2017-10-12 Thread Michael Niedermayer
Fixes: runtime error: signed integer overflow: 2 * -1094995530 cannot be 
represented in type 'int'
Fixes: 3512/clusterfuzz-testcase-minimized-4812747210489856

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer 
---
 libavcodec/snowdec.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/snowdec.c b/libavcodec/snowdec.c
index b74c468ce3..13668c2105 100644
--- a/libavcodec/snowdec.c
+++ b/libavcodec/snowdec.c
@@ -394,9 +394,10 @@ static int decode_header(SnowContext *s){
 s->mv_scale   += get_symbol(&s->c, s->header_state, 1);
 s->qbias  += get_symbol(&s->c, s->header_state, 1);
 s->block_max_depth+= get_symbol(&s->c, s->header_state, 1);
-if(s->block_max_depth > 1 || s->block_max_depth < 0){
+if(s->block_max_depth > 1 || s->block_max_depth < 0 || s->mv_scale > 256U){
 av_log(s->avctx, AV_LOG_ERROR, "block_max_depth= %d is too large\n", 
s->block_max_depth);
 s->block_max_depth= 0;
+s->mv_scale = 0;
 return AVERROR_INVALIDDATA;
 }
 if (FFABS(s->qbias) > 127) {
-- 
2.14.2

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


Re: [FFmpeg-devel] [PATCH V3 2/2] hwaccel_mpeg: check reference pictures are available

2017-10-12 Thread Li, Zhong
> -Original Message-
> From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf
> Of Michael Niedermayer
> Sent: Friday, October 13, 2017 4:21 AM
> To: FFmpeg development discussions and patches
> 
> Subject: Re: [FFmpeg-devel] [PATCH V3 2/2] hwaccel_mpeg: check reference
> pictures are available
> 
> On Thu, Oct 12, 2017 at 04:20:45PM +0800, Zhong Li wrote:
> > some reference pictures are not existed but valiad surface_ids are
> > set, (for example, the second field of the first key frame can be
> > P_Picture_Type but there is no preivous frame.) then may cause some
> > driver problems (e.g, segment fault on  mesa/AMD driver).
> >
> > Signed-off-by: Zhong Li 
> > ---
> [...]
> 
> > diff --git a/libavcodec/vdpau_mpeg12.c b/libavcodec/vdpau_mpeg12.c
> > index b657007ee7..6d73d45f1a 100644
> > --- a/libavcodec/vdpau_mpeg12.c
> > +++ b/libavcodec/vdpau_mpeg12.c
> > @@ -45,13 +45,18 @@ static int
> vdpau_mpeg_start_frame(AVCodecContext
> > *avctx,
> >
> >  switch (s->pict_type) {
> >  case AV_PICTURE_TYPE_B:
> > -ref = ff_vdpau_get_surface_id(s->next_picture.f);
> > -assert(ref != VDP_INVALID_HANDLE);
> > -info->backward_reference = ref;
> > +if (s->next_picture_ptr) {
> > +ref = ff_vdpau_get_surface_id(s->next_picture.f);
> > +assert(ref != VDP_INVALID_HANDLE);
> > +info->backward_reference = ref;
> > +}
> >  /* fall through to forward prediction */
> 
> >  case AV_PICTURE_TYPE_P:
> > -ref = ff_vdpau_get_surface_id(s->last_picture.f);
> > -info->forward_reference  = ref;
> > +if (s->last_picture_ptr) {
> > +ref = ff_vdpau_get_surface_id(s->last_picture.f);
> 
> > +assert(ref != VDP_INVALID_HANDLE);
> 
> please use av_assert*()

Ok, will update.
> 
> [...]
> --
> Michael GnuPG fingerprint:
> 9FF2128B147EF6730BADF133611EC787040B0FAB
> 
> When you are offended at any man's fault, turn to yourself and study your
> own failings. Then you will forget your anger. -- Epictetus
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] avdevice/decklink_dec: Added SCTE104 message decode from VANC

2017-10-12 Thread Dixit, Vishwanath
Hi,

Please find the attached patch which adds support to decode SCTE-104 message 
from VANC for decklink capture use case.

Regards,
Vishwanath


0001-avdevice-decklink_dec-Added-SCTE104-message-decode-f.patch
Description: 0001-avdevice-decklink_dec-Added-SCTE104-message-decode-f.patch
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel