[FFmpeg-cvslog] tools/target_dec_fuzzer: Fix memleak on open failure

2017-05-04 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Thu 
May  4 13:31:02 2017 +0200| [390c6ee42c4971d9809aa1fdee1f4c1d5e98b6ed] | 
committer: Michael Niedermayer

tools/target_dec_fuzzer: Fix memleak on open failure

Signed-off-by: Michael Niedermayer 

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

 tools/target_dec_fuzzer.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c
index 19423e27f2..5a0b53e546 100644
--- a/tools/target_dec_fuzzer.c
+++ b/tools/target_dec_fuzzer.c
@@ -180,8 +180,10 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t 
size) {
 }
 
 int res = avcodec_open2(ctx, c, NULL);
-if (res < 0)
+if (res < 0) {
+av_free(ctx);
 return 0; // Failure of avcodec_open2() does not imply that a issue 
was found
+}
 
 FDBCreate(&buffer);
 int got_frame;

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


[FFmpeg-cvslog] configure: Do not add omit-frame-pointer for ossfuzz

2017-05-04 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Thu 
May  4 13:56:40 2017 +0200| [92f4a4bf29d730d853bbcb2d229b1695df5a1892] | 
committer: Michael Niedermayer

configure: Do not add omit-frame-pointer for ossfuzz

ossfuzz works better without it

Signed-off-by: Michael Niedermayer 

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

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

diff --git a/configure b/configure
index 695356a349..804b0ce347 100755
--- a/configure
+++ b/configure
@@ -5175,7 +5175,7 @@ EOF
 exit 1
 fi
 
-disabled optimizations || check_cflags -fomit-frame-pointer
+disabled optimizations || enabled ossfuzz || check_cflags -fomit-frame-pointer
 
 enable_weak_pic() {
 disabled pic && return

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


[FFmpeg-cvslog] avcodec/msvideo1: Check buffer size before re-getting the frame

2017-05-04 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Thu 
May  4 15:24:46 2017 +0200| [cabfed6895fcc679cd6a6244a12d800e0f3f2d20] | 
committer: Michael Niedermayer

avcodec/msvideo1: Check buffer size before re-getting the frame

Fixes timeout
Fixes: 1306/clusterfuzz-testcase-minimized-6152296217968640

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer 

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

 libavcodec/msvideo1.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/libavcodec/msvideo1.c b/libavcodec/msvideo1.c
index a49b9be364..29700f54b6 100644
--- a/libavcodec/msvideo1.c
+++ b/libavcodec/msvideo1.c
@@ -301,6 +301,12 @@ static int msvideo1_decode_frame(AVCodecContext *avctx,
 s->buf = buf;
 s->size = buf_size;
 
+// Discard frame if its smaller than the minimum frame size
+if (buf_size < (avctx->width/4) * (avctx->height/4) / 512) {
+av_log(avctx, AV_LOG_ERROR, "Packet is too small\n");
+return AVERROR_INVALIDDATA;
+}
+
 if ((ret = ff_reget_buffer(avctx, s->frame)) < 0)
 return ret;
 

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


[FFmpeg-cvslog] avcodec/pngdec: Use ff_set_dimensions()

2017-05-04 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Thu 
May  4 18:40:46 2017 +0200| [a0296fc056f0d86943c697c505a181744b07dd45] | 
committer: Michael Niedermayer

avcodec/pngdec: Use ff_set_dimensions()

Fixes OOM
Fixes: 1314/clusterfuzz-testcase-minimized-4621997222920192

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer 

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

 libavcodec/pngdec.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index aece1fcd5f..083f61f4f8 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -622,8 +622,9 @@ static int decode_idat_chunk(AVCodecContext *avctx, 
PNGDecContext *s,
 }
 if (!(s->pic_state & PNG_IDAT)) {
 /* init image info */
-avctx->width  = s->width;
-avctx->height = s->height;
+ret = ff_set_dimensions(avctx, s->width, s->height);
+if (ret < 0)
+return ret;
 
 s->channels   = ff_png_get_nb_channels(s->color_type);
 s->bits_per_pixel = s->bit_depth * s->channels;

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


[FFmpeg-cvslog] avcodec/flicvideo: Check for chunk overread

2017-05-04 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Mon 
May  1 22:54:15 2017 +0200| [d2657d225c14fcb560199ef0cefe34f76270ad92] | 
committer: Michael Niedermayer

avcodec/flicvideo: Check for chunk overread

Fixes integer overflow
Fixes: 1292/clusterfuzz-testcase-minimized-5795512143839232

Signed-off-by: Michael Niedermayer 

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

 libavcodec/flicvideo.c | 20 +++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/libavcodec/flicvideo.c b/libavcodec/flicvideo.c
index b1b7b5a42f..7f9b871dc7 100644
--- a/libavcodec/flicvideo.c
+++ b/libavcodec/flicvideo.c
@@ -444,8 +444,12 @@ static int flic_decode_frame_8BPP(AVCodecContext *avctx,
 break;
 }
 
-if (stream_ptr_after_chunk - bytestream2_tell(&g2) > 0)
+if (stream_ptr_after_chunk - bytestream2_tell(&g2) >= 0) {
 bytestream2_skip(&g2, stream_ptr_after_chunk - 
bytestream2_tell(&g2));
+} else {
+av_log(avctx, AV_LOG_ERROR, "Chunk overread\n");
+break;
+}
 
 frame_size -= chunk_size;
 num_chunks--;
@@ -742,6 +746,13 @@ static int flic_decode_frame_15_16BPP(AVCodecContext 
*avctx,
 break;
 }
 
+if (stream_ptr_after_chunk - bytestream2_tell(&g2) >= 0) {
+bytestream2_skip(&g2, stream_ptr_after_chunk - 
bytestream2_tell(&g2));
+} else {
+av_log(avctx, AV_LOG_ERROR, "Chunk overread\n");
+break;
+}
+
 frame_size -= chunk_size;
 num_chunks--;
 }
@@ -1016,6 +1027,13 @@ static int flic_decode_frame_24BPP(AVCodecContext *avctx,
 break;
 }
 
+if (stream_ptr_after_chunk - bytestream2_tell(&g2) >= 0) {
+bytestream2_skip(&g2, stream_ptr_after_chunk - 
bytestream2_tell(&g2));
+} else {
+av_log(avctx, AV_LOG_ERROR, "Chunk overread\n");
+break;
+}
+
 frame_size -= chunk_size;
 num_chunks--;
 }

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


[FFmpeg-cvslog] libavcodec/mpeg4videodec: Convert sprite_offset to 64bit

2017-05-04 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Wed 
May  3 05:21:51 2017 +0200| [c1c3a14073b33f790075f2884ea5c64451a6c876] | 
committer: Michael Niedermayer

libavcodec/mpeg4videodec: Convert sprite_offset to 64bit

This avoids intermediates from overflowing (the final values are checked)
Fixes: runtime error: signed integer overflow: -167712 + -2147352576 cannot be 
represented in type 'int'

Fixes: 1298/clusterfuzz-testcase-minimized-5955580877340672

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer 

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

 libavcodec/mpeg4videodec.c | 102 ++---
 1 file changed, 50 insertions(+), 52 deletions(-)

diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index 791a07..39f177f8d0 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -178,6 +178,7 @@ static int mpeg4_decode_sprite_trajectory(Mpeg4DecContext 
*ctx, GetBitContext *g
 int min_ab, i, w2, h2, w3, h3;
 int sprite_ref[4][2];
 int virtual_ref[2][2];
+int64_t sprite_offset[2][2];
 
 // only true for rectangle shapes
 const int vop_ref[4][2] = { { 0, 0 }, { s->width, 0 },
@@ -257,10 +258,10 @@ static int mpeg4_decode_sprite_trajectory(Mpeg4DecContext 
*ctx, GetBitContext *g
 
 switch (ctx->num_sprite_warping_points) {
 case 0:
-s->sprite_offset[0][0] =
-s->sprite_offset[0][1] =
-s->sprite_offset[1][0] =
-s->sprite_offset[1][1] = 0;
+sprite_offset[0][0]=
+sprite_offset[0][1]=
+sprite_offset[1][0]=
+sprite_offset[1][1]= 0;
 s->sprite_delta[0][0]  = a;
 s->sprite_delta[0][1]  =
 s->sprite_delta[1][0]  = 0;
@@ -269,11 +270,11 @@ static int mpeg4_decode_sprite_trajectory(Mpeg4DecContext 
*ctx, GetBitContext *g
 ctx->sprite_shift[1]   = 0;
 break;
 case 1: // GMC only
-s->sprite_offset[0][0] = sprite_ref[0][0] - a * vop_ref[0][0];
-s->sprite_offset[0][1] = sprite_ref[0][1] - a * vop_ref[0][1];
-s->sprite_offset[1][0] = ((sprite_ref[0][0] >> 1) | (sprite_ref[0][0] 
& 1)) -
+sprite_offset[0][0]= sprite_ref[0][0] - a * vop_ref[0][0];
+sprite_offset[0][1]= sprite_ref[0][1] - a * vop_ref[0][1];
+sprite_offset[1][0]= ((sprite_ref[0][0] >> 1) | (sprite_ref[0][0] 
& 1)) -
  a * (vop_ref[0][0] / 2);
-s->sprite_offset[1][1] = ((sprite_ref[0][1] >> 1) | (sprite_ref[0][1] 
& 1)) -
+sprite_offset[1][1]= ((sprite_ref[0][1] >> 1) | (sprite_ref[0][1] 
& 1)) -
  a * (vop_ref[0][1] / 2);
 s->sprite_delta[0][0]  = a;
 s->sprite_delta[0][1]  =
@@ -283,22 +284,22 @@ static int mpeg4_decode_sprite_trajectory(Mpeg4DecContext 
*ctx, GetBitContext *g
 ctx->sprite_shift[1]   = 0;
 break;
 case 2:
-s->sprite_offset[0][0] = (sprite_ref[0][0] * (1 << alpha + rho)) +
+sprite_offset[0][0]= (sprite_ref[0][0] * (1 << alpha + rho)) +
  (-r * sprite_ref[0][0] + virtual_ref[0][0]) *
  (-vop_ref[0][0]) +
  (r * sprite_ref[0][1] - virtual_ref[0][1]) *
  (-vop_ref[0][1]) + (1 << (alpha + rho - 1));
-s->sprite_offset[0][1] = (sprite_ref[0][1] * (1 << alpha + rho)) +
+sprite_offset[0][1]= (sprite_ref[0][1] * (1 << alpha + rho)) +
  (-r * sprite_ref[0][1] + virtual_ref[0][1]) *
  (-vop_ref[0][0]) +
  (-r * sprite_ref[0][0] + virtual_ref[0][0]) *
  (-vop_ref[0][1]) + (1 << (alpha + rho - 1));
-s->sprite_offset[1][0] = ((-r * sprite_ref[0][0] + virtual_ref[0][0]) *
+sprite_offset[1][0]= ((-r * sprite_ref[0][0] + virtual_ref[0][0]) *
   (-2 * vop_ref[0][0] + 1) +
   (r * sprite_ref[0][1] - virtual_ref[0][1]) *
   (-2 * vop_ref[0][1] + 1) + 2 * w2 * r *
   sprite_ref[0][0] - 16 * w2 + (1 << (alpha + 
rho + 1)));
-s->sprite_offset[1][1] = ((-r * sprite_ref[0][1] + virtual_ref[0][1]) *
+sprite_offset[1][1]= ((-r * sprite_ref[0][1] + virtual_ref[0][1]) *
   (-2 * vop_ref[0][0] + 1) +
   (-r * sprite_ref[0][0] + virtual_ref[0][0]) *
   (-2 * vop_ref[0][1] + 1) + 2 * w2 * r *
@@ -315,30 +316,22 @@ static int mpeg4_decode_sprite_trajectory(Mpeg4DecContext 
*ctx, GetBitContext *g
 min_ab = FFMIN(alpha, beta);
 w3 = w2 >> min_ab;

[FFmpeg-cvslog] avcodec/wavpack: Fix invalid shift and integer overflow

2017-05-04 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri 
Apr  7 03:38:12 2017 +0200| [fc4f88375b8aa99495a3a774611132a77ca2e11b] | 
committer: Michael Niedermayer

avcodec/wavpack: Fix invalid shift and integer overflow

Fixes: 940/clusterfuzz-testcase-5200378381467648

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer 

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

 libavcodec/wavpack.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c
index 2bda3599a8..bc4402f638 100644
--- a/libavcodec/wavpack.c
+++ b/libavcodec/wavpack.c
@@ -157,7 +157,7 @@ static int wv_get_value(WavpackFrameContext *ctx, 
GetBitContext *gb,
 } else {
 t = get_unary_0_33(gb);
 if (t >= 2) {
-if (get_bits_left(gb) < t - 1)
+if (t >= 32 || get_bits_left(gb) < t - 1)
 goto error;
 t = get_bits_long(gb, t - 1) | (1 << (t - 1));
 } else {

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


[FFmpeg-cvslog] avcodec/mjpegdec: Fix runtime error: signed integer overflow: -24543 * 2031616 cannot be represented in type 'int'

2017-05-04 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Thu 
Apr 27 15:10:25 2017 +0200| [a78ae465fda902565ed041d93403e04490b4be0d] | 
committer: Michael Niedermayer

avcodec/mjpegdec: Fix runtime error: signed integer overflow: -24543 * 2031616 
cannot be represented in type 'int'

Fixes: 943/clusterfuzz-testcase-5114865297391616

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer 

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

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

diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index a86f6b2642..ed381de66a 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -776,7 +776,8 @@ static int decode_block_progressive(MJpegDecodeContext *s, 
int16_t *block,
 uint16_t *quant_matrix,
 int ss, int se, int Al, int *EOBRUN)
 {
-int code, i, j, level, val, run;
+int code, i, j, val, run;
+unsigned level;
 
 if (*EOBRUN) {
 (*EOBRUN)--;

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


[FFmpeg-cvslog] compat/strtod: Add missing const qualifiers.

2017-05-04 Thread Carl Eugen Hoyos
ffmpeg | branch: master | Carl Eugen Hoyos  | Mon May  1 
10:49:31 2017 +0200| [3624d45ddbe93d93bd9f808b525b0f91c3d7a8cf] | committer: 
Carl Eugen Hoyos

compat/strtod: Add missing const qualifiers.

Fixes many warnings:
initialization discards 'const' qualifier from pointer target type

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

 compat/strtod.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/compat/strtod.c b/compat/strtod.c
index 3a9452eac2..8b4243b313 100644
--- a/compat/strtod.c
+++ b/compat/strtod.c
@@ -25,9 +25,9 @@
 #include "libavutil/avstring.h"
 #include "libavutil/mathematics.h"
 
-static char *check_nan_suffix(char *s)
+static const char *check_nan_suffix(const char *s)
 {
-char *start = s;
+const char *start = s;
 
 if (*s++ != '(')
 return start;
@@ -44,7 +44,7 @@ double strtod(const char *, char **);
 
 double avpriv_strtod(const char *nptr, char **endptr)
 {
-char *end;
+const char *end;
 double res;
 
 /* Skip leading spaces */
@@ -81,13 +81,13 @@ double avpriv_strtod(const char *nptr, char **endptr)
!av_strncasecmp(nptr, "+0x", 3)) {
 /* FIXME this doesn't handle exponents, non-integers (float/double)
  * and numbers too large for long long */
-res = strtoll(nptr, &end, 16);
+res = strtoll(nptr, (char **)&end, 16);
 } else {
-res = strtod(nptr, &end);
+res = strtod(nptr, (char **)&end);
 }
 
 if (endptr)
-*endptr = end;
+*endptr = (char *)end;
 
 return res;
 }

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


Re: [FFmpeg-cvslog] Merge commit '11a9320de54759340531177c9f2b1e31e6112cc2'

2017-05-04 Thread Carl Eugen Hoyos
2017-05-03 16:54 GMT+02:00 Clément Bœsch :
> ffmpeg | branch: master | Clément Bœsch  | Wed May  3 12:51:48 
> 2017 +0200| [3f17751eeb7e3348576e2597884d5e5155aadcfb] | committer: Clément 
> Bœsch
>
> Merge commit '11a9320de54759340531177c9f2b1e31e6112cc2'
>
> * commit '11a9320de54759340531177c9f2b1e31e6112cc2':
>   build: Move build-system-related helper files to a separate subdirectory

Why?

This is most horrible patch I can imagine, am I really the only one
who gets hit by this on the first day?

Please consider to revert, Carl Eugen
___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] ffmpeg: check for unconnected outputs

2017-05-04 Thread wm4
ffmpeg | branch: master | wm4  | Fri May  5 00:15:15 
2017 +0200| [974ee16d6a71c31d0b5db4f139a40831c2f45776] | committer: wm4

ffmpeg: check for unconnected outputs

Fixes e.g.:

ffmpeg -f lavfi -i testsrc -f lavfi -i testsrc -filter_complex 
"[0:v][1:v]psnr[out]" -f null none

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

 ffmpeg.h|  1 +
 ffmpeg_filter.c | 15 +++
 ffmpeg_opt.c|  2 ++
 3 files changed, 18 insertions(+)

diff --git a/ffmpeg.h b/ffmpeg.h
index 4d0456c1fb..d34561275a 100644
--- a/ffmpeg.h
+++ b/ffmpeg.h
@@ -638,6 +638,7 @@ void choose_sample_fmt(AVStream *st, AVCodec *codec);
 
 int configure_filtergraph(FilterGraph *fg);
 int configure_output_filter(FilterGraph *fg, OutputFilter *ofilter, 
AVFilterInOut *out);
+void check_filter_outputs(void);
 int ist_in_filtergraph(FilterGraph *fg, InputStream *ist);
 int filtergraph_is_simple(FilterGraph *fg);
 int init_simple_filtergraph(InputStream *ist, OutputStream *ost);
diff --git a/ffmpeg_filter.c b/ffmpeg_filter.c
index 896161a869..817f48f473 100644
--- a/ffmpeg_filter.c
+++ b/ffmpeg_filter.c
@@ -678,6 +678,21 @@ int configure_output_filter(FilterGraph *fg, OutputFilter 
*ofilter, AVFilterInOu
 }
 }
 
+void check_filter_outputs(void)
+{
+int i;
+for (i = 0; i < nb_filtergraphs; i++) {
+int n;
+for (n = 0; n < filtergraphs[i]->nb_outputs; n++) {
+OutputFilter *output = filtergraphs[i]->outputs[n];
+if (!output->ost) {
+av_log(NULL, AV_LOG_FATAL, "Filter %s has an unconnected 
output\n", output->name);
+exit_program(1);
+}
+}
+}
+}
+
 static int sub2video_prepare(InputStream *ist, InputFilter *ifilter)
 {
 AVFormatContext *avf = input_files[ist->file_index]->ctx;
diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
index d1fe8742ff..e73a61059f 100644
--- a/ffmpeg_opt.c
+++ b/ffmpeg_opt.c
@@ -3260,6 +3260,8 @@ int ffmpeg_parse_options(int argc, char **argv)
 goto fail;
 }
 
+check_filter_outputs();
+
 fail:
 uninit_parse_context(&octx);
 if (ret < 0) {

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


[FFmpeg-cvslog] cuvid: support AVCodecContext.hw_device_ctx API

2017-05-04 Thread wm4
ffmpeg | branch: master | wm4  | Fri May  5 00:15:21 
2017 +0200| [c0f17a905f3588bf61ba6d86a83c6835d431ed3d] | committer: wm4

cuvid: support AVCodecContext.hw_device_ctx API

This is a newer API that is intended for decoders like the cuvid
wrapper. Until now, the wrapper required to set an awkward
"incomplete" hw_frames_ctx to set the device. Now the device
can be set directly, and the user can get AV_PIX_FMT_CUDA output
for a specific device simply by setting hw_device_ctx.

This still does a dummy ff_get_format() call at init time, and should
be fully backward compatible.

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

 doc/APIchanges   |  5 +
 libavcodec/cuvid.c   | 14 +++---
 libavcodec/version.h |  2 +-
 3 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/doc/APIchanges b/doc/APIchanges
index fcd3423d58..b9d7b8b569 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -15,6 +15,11 @@ libavutil: 2015-08-28
 
 API changes, most recent first:
 
+2017-05-05 - xx - lavc 57.94.100 - avcodec.h
+  The cuvid decoders now support AVCodecContext.hw_device_ctx, which removes
+  the requirement to set an incomplete AVCodecContext.hw_frames_ctx only to
+  set the Cuda device handle.
+
 2017-04-11 - 8378466507 - lavu 55.61.100 - avstring.h
   Add av_strireplace().
 
diff --git a/libavcodec/cuvid.c b/libavcodec/cuvid.c
index 288083423e..3453003965 100644
--- a/libavcodec/cuvid.c
+++ b/libavcodec/cuvid.c
@@ -802,9 +802,17 @@ static av_cold int cuvid_decode_init(AVCodecContext *avctx)
 goto error;
 }
 } else {
-ret = av_hwdevice_ctx_create(&ctx->hwdevice, AV_HWDEVICE_TYPE_CUDA, 
ctx->cu_gpu, NULL, 0);
-if (ret < 0)
-goto error;
+if (avctx->hw_device_ctx) {
+ctx->hwdevice = av_buffer_ref(avctx->hw_device_ctx);
+if (!ctx->hwdevice) {
+ret = AVERROR(ENOMEM);
+goto error;
+}
+} else {
+ret = av_hwdevice_ctx_create(&ctx->hwdevice, 
AV_HWDEVICE_TYPE_CUDA, ctx->cu_gpu, NULL, 0);
+if (ret < 0)
+goto error;
+}
 
 ctx->hwframe = av_hwframe_ctx_alloc(ctx->hwdevice);
 if (!ctx->hwframe) {
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 46872b0562..a2def3f26b 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -28,7 +28,7 @@
 #include "libavutil/version.h"
 
 #define LIBAVCODEC_VERSION_MAJOR  57
-#define LIBAVCODEC_VERSION_MINOR  93
+#define LIBAVCODEC_VERSION_MINOR  94
 #define LIBAVCODEC_VERSION_MICRO 100
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \

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


[FFmpeg-cvslog] build: Store library version numbers in .version files

2017-05-04 Thread Diego Biurrun
ffmpeg | branch: master | Diego Biurrun  | Sat Dec 17 
20:01:07 2016 +0100| [edb434873238876790f6a17bb65490cc29a1d176] | committer: 
Diego Biurrun

build: Store library version numbers in .version files

This moves work from the configure to the Make stage where it can
be parallelized and ensures that shared libraries are built with
the right version number in the filename.

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

 Makefile  |  2 +-
 avbuild/common.mak|  2 +-
 avbuild/library.mak   |  5 +
 avbuild/libversion.sh | 15 +++
 configure | 13 -
 5 files changed, 22 insertions(+), 15 deletions(-)

diff --git a/Makefile b/Makefile
index c9fa162d8d..6036e447db 100644
--- a/Makefile
+++ b/Makefile
@@ -67,7 +67,7 @@ COMPILE_HOSTC = $(call COMPILE,HOSTCC)
 %.h.c:
$(Q)echo '#include "$*.h"' >$@
 
-%.c %.h %.ver: TAG = GEN
+%.c %.h %.ver %.version: TAG = GEN
 
 AVPROGS-$(CONFIG_AVCONV)   += avconv
 AVPROGS-$(CONFIG_AVPLAY)   += avplay
diff --git a/avbuild/common.mak b/avbuild/common.mak
index 96762949cc..236380effc 100644
--- a/avbuild/common.mak
+++ b/avbuild/common.mak
@@ -49,7 +49,7 @@ $(TOOLOBJS): | tools
 
 OBJDIRS := $(OBJDIRS) $(dir $(OBJS) $(HOBJS) $(HOSTOBJS) $(TESTOBJS))
 
-CLEANSUFFIXES = *.d *.o *~ *.h.c *.gcda *.gcno *.map *.ver
+CLEANSUFFIXES = *.d *.o *~ *.h.c *.gcda *.gcno *.map *.ver *.version
 DISTCLEANSUFFIXES = *.pc
 LIBSUFFIXES   = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a
 
diff --git a/avbuild/library.mak b/avbuild/library.mak
index 9215a93a2c..45152bebe8 100644
--- a/avbuild/library.mak
+++ b/avbuild/library.mak
@@ -1,5 +1,7 @@
 include $(SRC_PATH)/avbuild/common.mak
 
+-include $(SUBDIR)lib$(NAME).version
+
 LIBVERSION := $(lib$(NAME)_VERSION)
 LIBMAJOR   := $(lib$(NAME)_VERSION_MAJOR)
 LIBMINOR   := $(lib$(NAME)_VERSION_MINOR)
@@ -30,6 +32,9 @@ $(TESTPROGS): THISLIB = $(SUBDIR)$(LIBNAME)
 $(TESTPROGS) $(TOOLS): %$(EXESUF): %.o
$$(LD) $(LDFLAGS) $(LDEXEFLAGS) $$(LD_O) $$(filter %.o,$$^) $$(THISLIB) 
$(FFEXTRALIBS) $$(ELIBS)
 
+$(SUBDIR)lib$(NAME).version: $(SUBDIR)version.h | $(SUBDIR)
+   $$(M) $$(SRC_PATH)/avbuild/libversion.sh $(NAME) $$< > $$@
+
 $(SUBDIR)lib$(NAME).ver: $(SUBDIR)lib$(NAME).v $(OBJS)
$$(M)sed 's/MAJOR/$(lib$(NAME)_VERSION_MAJOR)/' $$< | 
$(VERSION_SCRIPT_POSTPROCESS_CMD) > $$@
 
diff --git a/avbuild/libversion.sh b/avbuild/libversion.sh
new file mode 100755
index 00..30046b1d25
--- /dev/null
+++ b/avbuild/libversion.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+toupper(){
+echo "$@" | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ
+}
+
+name=lib$1
+ucname=$(toupper ${name})
+file=$2
+
+eval $(awk "/#define ${ucname}_VERSION_M/ { print \$2 \"=\" \$3 }" "$file")
+eval 
${ucname}_VERSION=\$${ucname}_VERSION_MAJOR.\$${ucname}_VERSION_MINOR.\$${ucname}_VERSION_MICRO
+eval echo "${name}_VERSION=\$${ucname}_VERSION"
+eval echo "${name}_VERSION_MAJOR=\$${ucname}_VERSION_MAJOR"
+eval echo "${name}_VERSION_MINOR=\$${ucname}_VERSION_MINOR"
diff --git a/configure b/configure
index bcc5f6ec72..2671b5a02b 100755
--- a/configure
+++ b/configure
@@ -5318,19 +5318,6 @@ 
VERSION_SCRIPT_POSTPROCESS_CMD=${VERSION_SCRIPT_POSTPROCESS_CMD}
 SAMPLES:=${samples:-\$(LIBAV_SAMPLES)}
 EOF
 
-get_version(){
-lcname=lib${1}
-name=$(toupper $lcname)
-file=$source_path/$lcname/version.h
-eval $(awk "/#define ${name}_VERSION_M/ { print \$2 \"=\" \$3 }" "$file")
-eval 
${name}_VERSION=\$${name}_VERSION_MAJOR.\$${name}_VERSION_MINOR.\$${name}_VERSION_MICRO
-eval echo "${lcname}_VERSION=\$${name}_VERSION" >> 
avbuild/config.mak
-eval echo "${lcname}_VERSION_MAJOR=\$${name}_VERSION_MAJOR" >> 
avbuild/config.mak
-eval echo "${lcname}_VERSION_MINOR=\$${name}_VERSION_MINOR" >> 
avbuild/config.mak
-}
-
-map 'get_version $v' $LIBRARY_LIST
-
 map 'eval echo "${v}_FFLIBS=\$${v}_deps" >> avbuild/config.mak' $LIBRARY_LIST
 
 print_program_extralibs(){

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


[FFmpeg-cvslog] build: Generate pkg-config files from Make and not from configure

2017-05-04 Thread Diego Biurrun
ffmpeg | branch: master | Diego Biurrun  | Tue Dec 20 
14:27:19 2016 +0100| [92db5083077a8b0f8e1050507671b456fd155125] | committer: 
Diego Biurrun

build: Generate pkg-config files from Make and not from configure

This moves work from the configure to the Make stage where it can
be parallelized and ensures that pkgconfig files are updated when
library versions change.

Bug-Id: 449

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

 Makefile  |  3 +-
 avbuild/.gitignore|  1 +
 avbuild/library.mak   |  7 +++--
 avbuild/pkgconfig_generate.sh | 50 
 configure | 67 ++-
 libavcodec/Makefile   |  1 +
 libavdevice/Makefile  |  1 +
 libavfilter/Makefile  |  1 +
 libavformat/Makefile  |  1 +
 libavresample/Makefile|  1 +
 libavutil/Makefile|  1 +
 libswscale/Makefile   |  1 +
 12 files changed, 86 insertions(+), 49 deletions(-)

diff --git a/Makefile b/Makefile
index 6036e447db..a9f5f9a8e9 100644
--- a/Makefile
+++ b/Makefile
@@ -67,7 +67,7 @@ COMPILE_HOSTC = $(call COMPILE,HOSTCC)
 %.h.c:
$(Q)echo '#include "$*.h"' >$@
 
-%.c %.h %.ver %.version: TAG = GEN
+%.c %.h %.pc %.ver %.version: TAG = GEN
 
 AVPROGS-$(CONFIG_AVCONV)   += avconv
 AVPROGS-$(CONFIG_AVPLAY)   += avplay
@@ -125,7 +125,6 @@ tools/cws2fws$(EXESUF): ELIBS = $(ZLIB)
 
 CONFIGURABLE_COMPONENTS =   \
 $(wildcard $(FFLIBS:%=$(SRC_PATH)/lib%/all*.c)) \
-$(wildcard $(FFLIBS:%=$(SRC_PATH)/lib%/version.h))  \
 $(SRC_PATH)/libavcodec/bitstream_filters.c  \
 $(SRC_PATH)/libavformat/protocols.c \
 
diff --git a/avbuild/.gitignore b/avbuild/.gitignore
index 693b7aa0d3..38ed170752 100644
--- a/avbuild/.gitignore
+++ b/avbuild/.gitignore
@@ -2,3 +2,4 @@
 /config.fate
 /config.log
 /config.mak
+/config.sh
diff --git a/avbuild/library.mak b/avbuild/library.mak
index 45152bebe8..e5f6d7d288 100644
--- a/avbuild/library.mak
+++ b/avbuild/library.mak
@@ -9,8 +9,8 @@ INCINSTDIR := $(INCDIR)/lib$(NAME)
 
 INSTHEADERS := $(INSTHEADERS) $(HEADERS:%=$(SUBDIR)%)
 
-all-$(CONFIG_STATIC): $(SUBDIR)$(LIBNAME)
-all-$(CONFIG_SHARED): $(SUBDIR)$(SLIBNAME)
+all-$(CONFIG_STATIC): $(SUBDIR)$(LIBNAME)  $(SUBDIR)lib$(NAME).pc
+all-$(CONFIG_SHARED): $(SUBDIR)$(SLIBNAME) $(SUBDIR)lib$(NAME).pc
 
 LIBOBJS := $(OBJS) $(SUBDIR)%.h.o $(TESTOBJS)
 $(LIBOBJS) $(LIBOBJS:.o=.i):   CPPFLAGS += -DHAVE_AV_CONFIG_H
@@ -35,6 +35,9 @@ $(TESTPROGS) $(TOOLS): %$(EXESUF): %.o
 $(SUBDIR)lib$(NAME).version: $(SUBDIR)version.h | $(SUBDIR)
$$(M) $$(SRC_PATH)/avbuild/libversion.sh $(NAME) $$< > $$@
 
+$(SUBDIR)lib$(NAME).pc: $(SUBDIR)version.h | $(SUBDIR)
+   $$(M) $$(SRC_PATH)/avbuild/pkgconfig_generate.sh $(NAME) "$(DESC)"
+
 $(SUBDIR)lib$(NAME).ver: $(SUBDIR)lib$(NAME).v $(OBJS)
$$(M)sed 's/MAJOR/$(lib$(NAME)_VERSION_MAJOR)/' $$< | 
$(VERSION_SCRIPT_POSTPROCESS_CMD) > $$@
 
diff --git a/avbuild/pkgconfig_generate.sh b/avbuild/pkgconfig_generate.sh
new file mode 100755
index 00..33e188f5ea
--- /dev/null
+++ b/avbuild/pkgconfig_generate.sh
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+. avbuild/config.sh
+
+if test "$shared" = "yes"; then
+shared=true
+else
+shared=false
+fi
+
+shortname=$1
+name=lib${shortname}
+comment=$2
+libs=$(eval echo \$extralibs_${shortname})
+requires=$(eval echo \$requires_${shortname})
+requires=${requires%, }
+
+version=$(grep ${name}_VERSION= $name/${name}.version | cut -d= -f2)
+
+cat < $name/$name.pc
+prefix=$prefix
+exec_prefix=\${prefix}
+libdir=$libdir
+includedir=$incdir
+
+Name: $name
+Description: $comment
+Version: $version
+Requires: $($shared || echo $requires)
+Requires.private: $($shared && echo $requires)
+Conflicts:
+Libs: -L\${libdir} -l${shortname} $($shared || echo $libs)
+Libs.private: $($shared && echo $libs)
+Cflags: -I\${includedir}
+EOF
+
+cat < $name/$name-uninstalled.pc
+prefix=
+exec_prefix=
+libdir=\${pcfiledir}
+includedir=${source_path}
+
+Name: $name
+Description: $comment
+Version: $version
+Requires: $requires
+Conflicts:
+Libs: \${libdir}/${LIBPREF}${shortname}${LIBSUF} $libs
+Cflags: -I\${includedir}
+EOF
diff --git a/configure b/configure
index 2671b5a02b..8e402383d8 100755
--- a/configure
+++ b/configure
@@ -5402,52 +5402,29 @@ lib_version(){
 eval printf "\"lib${1} >= \$LIB$(toupper ${1})_VERSION, \""
 }
 
-pkgconfig_generate(){
-name=$1
-shortname=${name#lib}
-comment=$2
-version=$3
-libs=$4
-requires=$(map 'lib_version $v' $(eval echo \$${name#lib}_deps))
-requires=${requires%, }
-enabled ${name#lib} || return 0
-mkdir -p $name
-cat < $name/$name.pc
+cat > avbuild/config.sh < $name/$name-uninstalled.pc
-prefix=
-exec_prefix=
-libdir=\${pcfiledir}
-includedir=${source_path}
-
-Name: $name
-Descr

[FFmpeg-cvslog] Merge commit '92db5083077a8b0f8e1050507671b456fd155125'

2017-05-04 Thread James Almer
ffmpeg | branch: master | James Almer  | Thu May  4 19:59:30 
2017 -0300| [6fdd35a3126f6ecbe4ebab12bdf8867e4f544958] | committer: James Almer

Merge commit '92db5083077a8b0f8e1050507671b456fd155125'

* commit '92db5083077a8b0f8e1050507671b456fd155125':
  build: Generate pkg-config files from Make and not from configure
  build: Store library version numbers in .version files

Includes cherry-picked commits 8a34f3659371680ca523aecfd9098c28f0f809eb and
ee164727dd64c199b87118917e674b17c25e0da3 to fix issues.

Changes were also made to retain support for raise_major and build_suffix.

Reviewed-by: ubitux
Merged-by: James Almer 

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

 Makefile  |  7 +++-
 configure | 94 +++
 ffbuild/.gitignore|  1 +
 ffbuild/common.mak|  4 +-
 ffbuild/library.mak   | 12 +-
 ffbuild/libversion.sh | 15 +++
 ffbuild/pkgconfig_generate.sh | 62 
 libavcodec/Makefile   |  3 +-
 libavdevice/Makefile  |  3 +-
 libavfilter/Makefile  |  3 +-
 libavformat/Makefile  |  3 +-
 libavresample/Makefile|  1 +
 libavutil/Makefile|  3 +-
 libpostproc/Makefile  |  3 +-
 libswresample/Makefile|  3 +-
 libswscale/Makefile   |  3 +-
 16 files changed, 129 insertions(+), 91 deletions(-)

diff --git a/Makefile b/Makefile
index 8731d3b6ba..0122e1628f 100644
--- a/Makefile
+++ b/Makefile
@@ -87,7 +87,6 @@ tools/target_dec_%_fuzzer$(EXESUF): $(FF_DEP_LIBS)
 
 CONFIGURABLE_COMPONENTS =   \
 $(wildcard $(FFLIBS:%=$(SRC_PATH)/lib%/all*.c)) \
-$(wildcard $(FFLIBS:%=$(SRC_PATH)/lib%/version.h))  \
 $(SRC_PATH)/libavcodec/bitstream_filters.c  \
 $(SRC_PATH)/libavformat/protocols.c \
 
@@ -109,6 +108,12 @@ $(1) :=
 $(1)-yes :=
 endef
 
+ifdef CONFIG_RAISE_MAJOR
+RAISE_MAJOR = 100
+else
+RAISE_MAJOR = 0
+endif
+
 define DOSUBDIR
 $(foreach V,$(SUBDIR_VARS),$(eval $(call RESET,$(V
 SUBDIR := $(1)/
diff --git a/configure b/configure
index 804b0ce347..96a5e98330 100755
--- a/configure
+++ b/configure
@@ -6756,20 +6756,6 @@ NOREDZONE_FLAGS=$noredzone_flags
 LIBFUZZER_PATH=$libfuzzer_path
 EOF
 
-get_version(){
-lcname=lib${1}
-name=$(toupper $lcname)
-file=$source_path/$lcname/version.h
-eval $(awk "/#define ${name}_VERSION_M/ { print \$2 \"=\" \$3 }" "$file")
-enabled raise_major && eval 
${name}_VERSION_MAJOR=$((${name}_VERSION_MAJOR+100))
-eval 
${name}_VERSION=\$${name}_VERSION_MAJOR.\$${name}_VERSION_MINOR.\$${name}_VERSION_MICRO
-eval echo "${lcname}_VERSION=\$${name}_VERSION" >> 
ffbuild/config.mak
-eval echo "${lcname}_VERSION_MAJOR=\$${name}_VERSION_MAJOR" >> 
ffbuild/config.mak
-eval echo "${lcname}_VERSION_MINOR=\$${name}_VERSION_MINOR" >> 
ffbuild/config.mak
-}
-
-map 'get_version $v' $LIBRARY_LIST
-
 map 'eval echo "${v}_FFLIBS=\$${v}_deps" >> ffbuild/config.mak' $LIBRARY_LIST
 
 print_program_extralibs(){
@@ -6866,64 +6852,32 @@ if test -n "$WARNINGS"; then
 enabled fatal_warnings && exit 1
 fi
 
-# build pkg-config files
+# Settings for pkg-config files
 
-lib_version(){
-eval printf "\"lib${1}${build_suffix} >= \$LIB$(toupper ${1})_VERSION, \""
-}
-
-pkgconfig_generate(){
-name=$1
-shortname=${name#lib}${build_suffix}
-comment=$2
-version=$3
-libs=$4
-requires=$(map 'lib_version $v' $(eval echo \$${name#lib}_deps))
-requires=${requires%, }
-enabled ${name#lib} || return 0
-mkdir -p $name
-cat < $name/$name${build_suffix}.pc
+cat > ffbuild/config.sh < doc/examples/pc-uninstalled/${name}-uninstalled.pc
-prefix=
-exec_prefix=
-libdir=\${pcfiledir}/../../../$name
-includedir=${includedir}
-
-Name: $name
-Description: $comment
-Version: $version
-Requires: $requires
-Conflicts:
-Libs: -L\${libdir} -Wl,-rpath,\${libdir} -l${shortname} $(enabled shared || 
echo $libs)
-Cflags: -I\${includedir}
-EOF
-}
-
-pkgconfig_generate libavutil "FFmpeg utility library"   
"$LIBAVUTIL_VERSION" "$LIBRT $LIBM"
-pkgconfig_generate libavcodec"FFmpeg codec library" 
"$LIBAVCODEC_VERSION""$extralibs"
-pkgconfig_generate libavformat   "FFmpeg container format library"  
"$LIBAVFORMAT_VERSION"   "$extralibs"
-pkgconfig_generate libavdevice   "FFmpeg device handling library"   
"$LIBAVDEVICE_VERSION"   "$extralibs"
-pkgconfig_generate libavfilter   "FFmpeg audio/video filtering library" 
"$LIBAVFILTER_VERSION"   "$extralibs"
-pkgconfig_generate libpostproc   "FFmpeg postprocessing library"
"$LIBPOSTPROC_VERSION"   ""
-pkgconfig_generate libavresample "Libav audio resampling library"   
"$LIBAVRESAMPLE_VERSION" "$LIBM"
-pkgconfig_generate libswscale"FFmpeg ima

Re: [FFmpeg-cvslog] Merge commit '11a9320de54759340531177c9f2b1e31e6112cc2'

2017-05-04 Thread Aaron Levinson

On 5/4/2017 2:31 PM, Carl Eugen Hoyos wrote:

2017-05-03 16:54 GMT+02:00 Clément Bœsch :

ffmpeg | branch: master | Clément Bœsch  | Wed May  3 12:51:48 
2017 +0200| [3f17751eeb7e3348576e2597884d5e5155aadcfb] | committer: Clément Bœsch

Merge commit '11a9320de54759340531177c9f2b1e31e6112cc2'

* commit '11a9320de54759340531177c9f2b1e31e6112cc2':
  build: Move build-system-related helper files to a separate subdirectory


Why?

This is most horrible patch I can imagine, am I really the only one
who gets hit by this on the first day?

Please consider to revert, Carl Eugen


I found it annoying initially, but once you take the initial hit, its 
not a problem, and it does organize some related files together in a 
separate directory.  Even with this change, there are a still a decent 
number of files in the root directory, not all of which are related.  I 
think better organization of the entire source tree into directories and 
sub-directories would improve things further.


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


[FFmpeg-cvslog] Use correct printf conversion specifiers for POSIX integer types

2017-05-04 Thread Diego Biurrun
ffmpeg | branch: master | Diego Biurrun  | Wed Dec 21 
11:25:34 2016 +0100| [0b77a5933635293508e7289e7cf191ed166cf070] | committer: 
Diego Biurrun

Use correct printf conversion specifiers for POSIX integer types

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

 libavcodec/dxv.c   | 2 +-
 libavcodec/hqx.c   | 2 +-
 libavcodec/mpegaudiodec_template.c | 2 +-
 libavcodec/parser.c| 4 ++--
 libavcodec/pngdec.c| 2 +-
 libavcodec/vorbisdec.c | 6 +++---
 libavcodec/wmaprodec.c | 4 ++--
 libavformat/mov.c  | 2 +-
 libavformat/movenc.c   | 2 +-
 libavformat/mux.c  | 2 +-
 libavformat/omaenc.c   | 2 +-
 libavformat/rmdec.c| 2 +-
 libavformat/rpl.c  | 4 ++--
 libavformat/xwma.c | 2 +-
 14 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/libavcodec/dxv.c b/libavcodec/dxv.c
index 9b14ef46ae..41cac73e5e 100644
--- a/libavcodec/dxv.c
+++ b/libavcodec/dxv.c
@@ -366,7 +366,7 @@ static int dxv_decode(AVCodecContext *avctx, void *data,
 break;
 case MKBETAG('Y', 'C', 'G', '6'):
 case MKBETAG('Y', 'G', '1', '0'):
-avpriv_report_missing_feature(avctx, "Tag 0x%08X", tag);
+avpriv_report_missing_feature(avctx, "Tag 0x%08"PRIX32"", tag);
 return AVERROR_PATCHWELCOME;
 default:
 /* Old version does not have a real header, just size and type. */
diff --git a/libavcodec/hqx.c b/libavcodec/hqx.c
index 3c359e3863..2d1abf0cca 100644
--- a/libavcodec/hqx.c
+++ b/libavcodec/hqx.c
@@ -417,7 +417,7 @@ static int hqx_decode_frame(AVCodecContext *avctx, void 
*data,
 
 info_tag= AV_RL32(src);
 if (info_tag == MKTAG('I', 'N', 'F', 'O')) {
-unsigned info_offset = AV_RL32(src + 4);
+uint32_t info_offset = AV_RL32(src + 4);
 if (info_offset > INT_MAX || info_offset + 8 > avpkt->size) {
 av_log(avctx, AV_LOG_ERROR,
"Invalid INFO header offset: 0x%08"PRIX32" is too large.\n",
diff --git a/libavcodec/mpegaudiodec_template.c 
b/libavcodec/mpegaudiodec_template.c
index 4b90c6fb81..e9ea65eed1 100644
--- a/libavcodec/mpegaudiodec_template.c
+++ b/libavcodec/mpegaudiodec_template.c
@@ -274,7 +274,7 @@ static av_cold void decode_init_static(void)
 scale_factor_mult[i][0] = MULLx(norm, FIXR(1.0  * 2.0), 
FRAC_BITS);
 scale_factor_mult[i][1] = MULLx(norm, FIXR(0.7937005259 * 2.0), 
FRAC_BITS);
 scale_factor_mult[i][2] = MULLx(norm, FIXR(0.6299605249 * 2.0), 
FRAC_BITS);
-ff_dlog(NULL, "%d: norm=%x s=%x %x %x\n", i, norm,
+ff_dlog(NULL, "%d: norm=%x s=%"PRIx32" %"PRIx32" %"PRIx32"\n", i, norm,
 scale_factor_mult[i][0],
 scale_factor_mult[i][1],
 scale_factor_mult[i][2]);
diff --git a/libavcodec/parser.c b/libavcodec/parser.c
index 355187ae45..3ef1249341 100644
--- a/libavcodec/parser.c
+++ b/libavcodec/parser.c
@@ -228,7 +228,7 @@ int ff_combine_frame(ParseContext *pc, int next,
  const uint8_t **buf, int *buf_size)
 {
 if (pc->overread) {
-ff_dlog(NULL, "overread %d, state:%X next:%d index:%d o_index:%d\n",
+ff_dlog(NULL, "overread %d, state:%"PRIX32" next:%d index:%d 
o_index:%d\n",
 pc->overread, pc->state, next, pc->index, pc->overread_index);
 ff_dlog(NULL, "%X %X %X %X\n",
 (*buf)[0], (*buf)[1], (*buf)[2], (*buf)[3]);
@@ -285,7 +285,7 @@ int ff_combine_frame(ParseContext *pc, int next,
 }
 
 if (pc->overread) {
-ff_dlog(NULL, "overread %d, state:%X next:%d index:%d o_index:%d\n",
+ff_dlog(NULL, "overread %d, state:%"PRIX32" next:%d index:%d 
o_index:%d\n",
 pc->overread, pc->state, next, pc->index, pc->overread_index);
 ff_dlog(NULL, "%X %X %X %X\n",
 (*buf)[0], (*buf)[1], (*buf)[2], (*buf)[3]);
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index a6ab665624..d59409764d 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -453,7 +453,7 @@ static int decode_frame(AVCodecContext *avctx,
 if (length > 0x7fff)
 goto fail;
 tag = bytestream2_get_le32(&s->gb);
-ff_dlog(avctx, "png: tag=%c%c%c%c length=%u\n",
+ff_dlog(avctx, "png: tag=%c%c%c%c length=%"PRIu32"\n",
 (tag & 0xff),
 ((tag >> 8) & 0xff),
 ((tag >> 16) & 0xff),
diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c
index 8b800fd439..9289c82cf4 100644
--- a/libavcodec/vorbisdec.c
+++ b/libavcodec/vorbisdec.c
@@ -715,7 +715,7 @@ static int vorbis_parse_setup_hdr_residues(vorbis_context 
*vc)
 if (!res_setup->classifs)
 return AVERROR(ENOMEM);
 
-ff_dlog(NULL, "begin %d end %d part.size %d classif.s %d classbook 
%d \n",
+ff_dlog(NU

[FFmpeg-cvslog] Merge commit '0b77a5933635293508e7289e7cf191ed166cf070'

2017-05-04 Thread James Almer
ffmpeg | branch: master | James Almer  | Thu May  4 21:19:41 
2017 -0300| [191b2d4fc96fa87975a8eb5d87db04516b8a04c3] | committer: James Almer

Merge commit '0b77a5933635293508e7289e7cf191ed166cf070'

* commit '0b77a5933635293508e7289e7cf191ed166cf070':
  Use correct printf conversion specifiers for POSIX integer types

See 549045254c4614d5d61b5c36e340171a6914d57c

Merged-by: James Almer 

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

 libavcodec/vorbisdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c
index bc6c5875c2..9cff6c3e13 100644
--- a/libavcodec/vorbisdec.c
+++ b/libavcodec/vorbisdec.c
@@ -731,7 +731,7 @@ static int vorbis_parse_setup_hdr_residues(vorbis_context 
*vc)
 if (!res_setup->classifs)
 return AVERROR(ENOMEM);
 
-ff_dlog(NULL, "begin %"PRIu32" end %"PRIu32" part.size %d 
classif.s %d classbook %d \n",
+ff_dlog(NULL, "begin %"PRIu32" end %"PRIu32" part.size %u 
classif.s %"PRIu8" classbook %"PRIu8"\n"
 res_setup->begin, res_setup->end, res_setup->partition_size,
 res_setup->classifications, res_setup->classbook);
 


==

diff --cc libavcodec/vorbisdec.c
index bc6c5875c2,9289c82cf4..9cff6c3e13
--- a/libavcodec/vorbisdec.c
+++ b/libavcodec/vorbisdec.c
@@@ -731,7 -715,7 +731,7 @@@ static int vorbis_parse_setup_hdr_resid
  if (!res_setup->classifs)
  return AVERROR(ENOMEM);
  
- ff_dlog(NULL, "begin %"PRIu32" end %"PRIu32" part.size %d 
classif.s %d classbook %d \n",
 -ff_dlog(NULL, "begin %"PRIu32" end %"PRIu32" part.size %u 
classif.s %"PRIu8" classbook %"PRIu8"\n",
++ff_dlog(NULL, "begin %"PRIu32" end %"PRIu32" part.size %u 
classif.s %"PRIu8" classbook %"PRIu8"\n"
  res_setup->begin, res_setup->end, res_setup->partition_size,
  res_setup->classifications, res_setup->classbook);
  

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


[FFmpeg-cvslog] http: Check for negative chunk sizes

2017-05-04 Thread Martin Storsjö
ffmpeg | branch: master | Martin Storsjö  | Thu Dec 15 
10:24:20 2016 +0200| [131644677970a3c4a0096270ea2a5b5d437c2e63] | committer: 
Martin Storsjö

http: Check for negative chunk sizes

A negative chunk size is illegal and would end up used as
length for memcpy, where it would lead to memory accesses
out of bounds.

Found-by: Paul Cher 

CC: libav-sta...@libav.org
Signed-off-by: Martin Storsjö 

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

 libavformat/http.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavformat/http.c b/libavformat/http.c
index 8fe8d11e1e..00cf295001 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -784,8 +784,9 @@ static int http_read_stream(URLContext *h, uint8_t *buf, 
int size)
 
 av_log(NULL, AV_LOG_TRACE, "Chunked encoding data size: 
%"PRId64"'\n",
 s->chunksize);
-
-if (!s->chunksize)
+if (s->chunksize < 0)
+return AVERROR_INVALIDDATA;
+else if (!s->chunksize)
 return 0;
 break;
 }

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


[FFmpeg-cvslog] Merge commit '131644677970a3c4a0096270ea2a5b5d437c2e63'

2017-05-04 Thread James Almer
ffmpeg | branch: master | James Almer  | Thu May  4 21:31:34 
2017 -0300| [f31f610f337d6e7cdd5dc465b5795127e618c145] | committer: James Almer

Merge commit '131644677970a3c4a0096270ea2a5b5d437c2e63'

* commit '131644677970a3c4a0096270ea2a5b5d437c2e63':
  http: Check for negative chunk sizes

This commit is a noop, see 2a05c8f813de6f2278827734bf8102291e7484aa

Merged-by: James Almer 

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



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


[FFmpeg-cvslog] matroskadec: fix SRT subtitle duration

2017-05-04 Thread John Stebbins
ffmpeg | branch: master | John Stebbins  | Thu Dec 22 
09:23:30 2016 -0800| [0982152c3fb05365597978c5d7cfeeb7ced01723] | committer: 
John Stebbins

matroskadec: fix SRT subtitle duration

The codec id for SRT was changed and conditionals were not updated.

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

 libavformat/matroskadec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 8016730965..a3954b0c4e 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -2439,11 +2439,11 @@ static int matroska_parse_frame(MatroskaDemuxContext 
*matroska,
 else
 pkt->pts = timecode;
 pkt->pos = pos;
-if (track->type != MATROSKA_TRACK_TYPE_SUBTITLE || st->codecpar->codec_id 
== AV_CODEC_ID_TEXT)
+if (track->type != MATROSKA_TRACK_TYPE_SUBTITLE || st->codecpar->codec_id 
== AV_CODEC_ID_SRT)
 pkt->duration = duration;
 #if FF_API_CONVERGENCE_DURATION
 FF_DISABLE_DEPRECATION_WARNINGS
-if (st->codecpar->codec_id == AV_CODEC_ID_TEXT)
+if (st->codecpar->codec_id == AV_CODEC_ID_SRT)
 pkt->convergence_duration = duration;
 FF_ENABLE_DEPRECATION_WARNINGS
 #endif

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


[FFmpeg-cvslog] Merge commit '0982152c3fb05365597978c5d7cfeeb7ced01723'

2017-05-04 Thread James Almer
ffmpeg | branch: master | James Almer  | Thu May  4 21:38:00 
2017 -0300| [43b136ce80eabcc51e948cd62dec1b5d0e5e7914] | committer: James Almer

Merge commit '0982152c3fb05365597978c5d7cfeeb7ced01723'

* commit '0982152c3fb05365597978c5d7cfeeb7ced01723':
  matroskadec: fix SRT subtitle duration

This commit is a noop.

Merged-by: James Almer 

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



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


Re: [FFmpeg-cvslog] Merge commit '11a9320de54759340531177c9f2b1e31e6112cc2'

2017-05-04 Thread Carl Eugen Hoyos
2017-05-05 2:06 GMT+02:00 Aaron Levinson :
> On 5/4/2017 2:31 PM, Carl Eugen Hoyos wrote:
>>
>> 2017-05-03 16:54 GMT+02:00 Clément Bœsch :
>>>
>>> ffmpeg | branch: master | Clément Bœsch  | Wed May  3 12:51:48
>>> 2017 +0200| [3f17751eeb7e3348576e2597884d5e5155aadcfb] | committer: Clément
>>> Bœsch
>>>
>>> Merge commit '11a9320de54759340531177c9f2b1e31e6112cc2'
>>>
>>> * commit '11a9320de54759340531177c9f2b1e31e6112cc2':
>>>   build: Move build-system-related helper files to a separate
>>> subdirectory
>>
>>
>> Why?
>>
>> This is most horrible patch I can imagine, am I really the only one
>> who gets hit by this on the first day?
>>
>> Please consider to revert, Carl Eugen
>
>
> I found it annoying initially, but once you take the initial hit, its not a
> problem, and it does organize some related files together in a separate
> directory.  Even with this change, there are a still a decent number of
> files in the root directory, not all of which are related.  I think better
> organization of the entire source tree into directories and sub-directories
> would improve things further.

Are you also doing a dozen bisects per week?

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


[FFmpeg-cvslog] parser: Add missing #include for printing ISO C99 conversion specifiers

2017-05-04 Thread Diego Biurrun
ffmpeg | branch: master | Diego Biurrun  | Sat Dec 24 
11:36:53 2016 +0100| [53618054b64ce4dab459d23a7efebe9d5afc4855] | committer: 
Diego Biurrun

parser: Add missing #include for printing ISO C99 conversion specifiers

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

 libavcodec/parser.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/parser.c b/libavcodec/parser.c
index 3ef1249341..b74c22bdc7 100644
--- a/libavcodec/parser.c
+++ b/libavcodec/parser.c
@@ -20,6 +20,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include 
 #include 
 #include 
 

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


[FFmpeg-cvslog] Merge commit '53618054b64ce4dab459d23a7efebe9d5afc4855'

2017-05-04 Thread James Almer
ffmpeg | branch: master | James Almer  | Thu May  4 21:41:43 
2017 -0300| [fb496921e86b35a87270e0308cd8b03be808f469] | committer: James Almer

Merge commit '53618054b64ce4dab459d23a7efebe9d5afc4855'

* commit '53618054b64ce4dab459d23a7efebe9d5afc4855':
  parser: Add missing #include for printing ISO C99 conversion specifiers

Merged-by: James Almer 

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

 libavcodec/parser.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/parser.c b/libavcodec/parser.c
index f87e8631b1..30373c7622 100644
--- a/libavcodec/parser.c
+++ b/libavcodec/parser.c
@@ -20,6 +20,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include 
 #include 
 #include 
 


==


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


[FFmpeg-cvslog] avcodec/vorbisdec: add missing comma

2017-05-04 Thread James Almer
ffmpeg | branch: master | James Almer  | Thu May  4 21:44:58 
2017 -0300| [8acd73e3482c833d8350c87dba7087d057a33859] | committer: James Almer

avcodec/vorbisdec: add missing comma

Should fix compilation failures after 191b2d4fc96fa87975a8eb5d87db04516b8a04c3.

Found-by: philipl

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

 libavcodec/vorbisdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c
index 9cff6c3e13..2a4f482031 100644
--- a/libavcodec/vorbisdec.c
+++ b/libavcodec/vorbisdec.c
@@ -731,7 +731,7 @@ static int vorbis_parse_setup_hdr_residues(vorbis_context 
*vc)
 if (!res_setup->classifs)
 return AVERROR(ENOMEM);
 
-ff_dlog(NULL, "begin %"PRIu32" end %"PRIu32" part.size %u 
classif.s %"PRIu8" classbook %"PRIu8"\n"
+ff_dlog(NULL, "begin %"PRIu32" end %"PRIu32" part.size %u 
classif.s %"PRIu8" classbook %"PRIu8"\n",
 res_setup->begin, res_setup->end, res_setup->partition_size,
 res_setup->classifications, res_setup->classbook);
 

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


[FFmpeg-cvslog] Merge commit '8a34f3659371680ca523aecfd9098c28f0f809eb'

2017-05-04 Thread James Almer
ffmpeg | branch: master | James Almer  | Thu May  4 21:49:46 
2017 -0300| [ea49308402d9df27a9c4b7555912100096b140d3] | committer: James Almer

Merge commit '8a34f3659371680ca523aecfd9098c28f0f809eb'

* commit '8a34f3659371680ca523aecfd9098c28f0f809eb':
  build: Add version numbers to "Requires" entries in pkg-config files

This commit is a noop, see 6fdd35a3126f6ecbe4ebab12bdf8867e4f544958

Merged-by: James Almer 

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



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


[FFmpeg-cvslog] build: Add version numbers to "Requires" entries in pkg-config files

2017-05-04 Thread Diego Biurrun
ffmpeg | branch: master | Diego Biurrun  | Sun Dec 25 
18:25:41 2016 +0100| [8a34f3659371680ca523aecfd9098c28f0f809eb] | committer: 
Diego Biurrun

build: Add version numbers to "Requires" entries in pkg-config files

The (required) version numbers disappeared after edb4348732.

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

 avbuild/pkgconfig_generate.sh | 10 +-
 configure | 20 ++--
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/avbuild/pkgconfig_generate.sh b/avbuild/pkgconfig_generate.sh
index 33e188f5ea..c7bc65254d 100755
--- a/avbuild/pkgconfig_generate.sh
+++ b/avbuild/pkgconfig_generate.sh
@@ -12,7 +12,15 @@ shortname=$1
 name=lib${shortname}
 comment=$2
 libs=$(eval echo \$extralibs_${shortname})
-requires=$(eval echo \$requires_${shortname})
+deps=$(eval echo \$${shortname}_deps)
+
+for dep in $deps; do
+depname=lib${dep}
+. ${depname}/${depname}.version
+depversion=$(eval echo \$${depname}_VERSION)
+requires="$requires ${depname} >= ${depversion}, "
+done
+
 requires=${requires%, }
 
 version=$(grep ${name}_VERSION= $name/${name}.version | cut -d= -f2)
diff --git a/configure b/configure
index 8e402383d8..09674aad4d 100755
--- a/configure
+++ b/configure
@@ -5396,11 +5396,7 @@ print_enabled_components libavformat/protocol_list.c 
URLProtocol url_protocols $
 
 test -n "$WARNINGS" && printf "\n$WARNINGS"
 
-# build pkg-config files
-
-lib_version(){
-eval printf "\"lib${1} >= \$LIB$(toupper ${1})_VERSION, \""
-}
+# Settings for pkg-config files
 
 cat > avbuild/config.sh <> avbuild/config.sh
+done

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


[FFmpeg-cvslog] avcodec/cavsdec: Fix undefined behavior from integer overflow

2017-05-04 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri 
May  5 03:24:40 2017 +0200| [a0e5f7f363555d2befafb1c9e1579dbe0a2fbca7] | 
committer: Michael Niedermayer

avcodec/cavsdec: Fix undefined behavior from integer overflow

Fixes: 1335/clusterfuzz-testcase-minimized-5566961566089216

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer 

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

 libavcodec/cavsdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c
index 6f4d6aca69..4d3d2d7c65 100644
--- a/libavcodec/cavsdec.c
+++ b/libavcodec/cavsdec.c
@@ -465,7 +465,7 @@ static inline void mv_pred_direct(AVSContext *h, 
cavs_vector *pmv_fw,
   cavs_vector *col_mv)
 {
 cavs_vector *pmv_bw = pmv_fw + MV_BWD_OFFS;
-int den = h->direct_den[col_mv->ref];
+unsigned den = h->direct_den[col_mv->ref];
 int m = FF_SIGNBIT(col_mv->x);
 
 pmv_fw->dist = h->dist[1];

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


[FFmpeg-cvslog] avcodec/dvdsubdec: Fix runtime error: left shift of 242 by 24 places cannot be represented in type 'int'

2017-05-04 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri 
May  5 02:51:13 2017 +0200| [ce7098b8f2b59c62b5abdb3d74819db75cf67698] | 
committer: Michael Niedermayer

avcodec/dvdsubdec: Fix runtime error: left shift of 242 by 24 places cannot be 
represented in type 'int'

Fixes: 1080/clusterfuzz-testcase-5353236754071552

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer 

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

 libavcodec/dvdsubdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c
index 4e9c0580f4..e18113c20c 100644
--- a/libavcodec/dvdsubdec.c
+++ b/libavcodec/dvdsubdec.c
@@ -60,7 +60,7 @@ static void yuv_a_to_rgba(const uint8_t *ycbcr, const uint8_t 
*alpha, uint32_t *
 cb = *ycbcr++;
 YUV_TO_RGB1_CCIR(cb, cr);
 YUV_TO_RGB2_CCIR(r, g, b, y);
-*rgba++ = (*alpha++ << 24) | (r << 16) | (g << 8) | b;
+*rgba++ = ((unsigned)*alpha++ << 24) | (r << 16) | (g << 8) | b;
 }
 }
 

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


[FFmpeg-cvslog] library.mak: fix build rules that depend on pgk-config files

2017-05-04 Thread James Almer
ffmpeg | branch: master | James Almer  | Fri May  5 00:16:06 
2017 -0300| [a5fdda79eee0b195ef4958193d17e68b820c8856] | committer: James Almer

library.mak: fix build rules that depend on pgk-config files

Regression since 6fdd35a312

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

 ffbuild/library.mak | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ffbuild/library.mak b/ffbuild/library.mak
index addc945168..cfc2d36067 100644
--- a/ffbuild/library.mak
+++ b/ffbuild/library.mak
@@ -9,8 +9,8 @@ INCINSTDIR := $(INCDIR)/lib$(NAME)
 
 INSTHEADERS := $(INSTHEADERS) $(HEADERS:%=$(SUBDIR)%)
 
-all-$(CONFIG_STATIC): $(SUBDIR)$(LIBNAME)  $(SUBDIR)lib$(NAME).pc
-all-$(CONFIG_SHARED): $(SUBDIR)$(SLIBNAME) $(SUBDIR)lib$(NAME).pc
+all-$(CONFIG_STATIC): $(SUBDIR)$(LIBNAME)  $(SUBDIR)lib$(FULLNAME).pc
+all-$(CONFIG_SHARED): $(SUBDIR)$(SLIBNAME) $(SUBDIR)lib$(FULLNAME).pc
 
 LIBOBJS := $(OBJS) $(SUBDIR)%.h.o $(TESTOBJS)
 $(LIBOBJS) $(LIBOBJS:.o=.s) $(LIBOBJS:.o=.i):   CPPFLAGS += -DHAVE_AV_CONFIG_H
@@ -57,7 +57,7 @@ endif
 clean::
$(RM) $(addprefix $(SUBDIR),$(CLEANFILES) $(CLEANSUFFIXES) 
$(LIBSUFFIXES)) \
$(CLEANSUFFIXES:%=$(SUBDIR)$(ARCH)/%) 
$(CLEANSUFFIXES:%=$(SUBDIR)tests/%)
- 
+
 distclean:: clean
$(RM) $(DISTCLEANSUFFIXES:%=$(SUBDIR)%) 
$(DISTCLEANSUFFIXES:%=$(SUBDIR)$(ARCH)/%) \
 $(DISTCLEANSUFFIXES:%=$(SUBDIR)tests/%)

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


Re: [FFmpeg-cvslog] Merge commit '11a9320de54759340531177c9f2b1e31e6112cc2'

2017-05-04 Thread Clément Bœsch
On Thu, May 04, 2017 at 11:31:30PM +0200, Carl Eugen Hoyos wrote:
> 2017-05-03 16:54 GMT+02:00 Clément Bœsch :
> > ffmpeg | branch: master | Clément Bœsch  | Wed May  3 12:51:48 
> > 2017 +0200| [3f17751eeb7e3348576e2597884d5e5155aadcfb] | committer: Clément 
> > Bœsch
> >
> > Merge commit '11a9320de54759340531177c9f2b1e31e6112cc2'
> >
> > * commit '11a9320de54759340531177c9f2b1e31e6112cc2':
> >   build: Move build-system-related helper files to a separate subdirectory
> 
> Why?
> 

A relatively large amount of commits related to a refactor of the build
system are being merged and more to come. This is a key one.

That directory is being filled with all kind of other build related files
that would create a mess if present in the root directory.

> Please consider to revert, Carl Eugen

All things considered, we will continue the merges and keep this commit.

Regards,

-- 
Clément B.


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