Commit Graph

71905 Commits

Author SHA1 Message Date
Michael Niedermayer 7ac5c38ec5 avformat/mux: Add avoid_negative_ts_use_pts
This allows using pts instead of dts for negative TS avoidance

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-05 12:44:20 +02:00
Michael Niedermayer 36993527dd cmdutils: Add libm.h for round()
Found-by: jamrial
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-05 11:51:00 +02:00
James Almer 858f81fde2 cmdutils: move get_rotation() up in the file
Fixes compilation of fftools without libavdevice

Signed-off-by: James Almer <jamrial@gmail.com>
2015-05-05 02:47:21 -03:00
James Almer 3f7986f983 avfilter/Makefile: add missing lavfutils.c dependency to cover_rect and find_rect filters
Signed-off-by: James Almer <jamrial@gmail.com>
2015-05-05 02:16:37 -03:00
Michael Niedermayer 7f45f7fc7f avcodec/mpeg12dec: use the correct dimensions for checking SAR
Fixes Ticket4533

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-05 04:33:44 +02:00
Michael Niedermayer 6ef3426d90 avcodec/x86/deinterlace: use INIT_MMX like other asm code does too 2015-05-05 02:41:15 +02:00
Michael Niedermayer c7369f3a4b avformat/avidec: print a warning for negative sample_size
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-05 00:04:38 +02:00
Andreas Cadhalpun ca234639ac avidec: avoid infinite loop due to negative ast->sample_size
If max in clean_index is set to a negative ast->sample_size, the
following loop never ends:
        while (max < 1024)
            max += max;

Thus set ast->sample_size to 0 if it would otherwise be negative.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-05 00:04:38 +02:00
James Almer 079b7f6eac vp9: add profile names
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-05-04 18:39:51 -03:00
Michael Niedermayer b4cc7d67f5 avfilter/vf_cover_rect: clip rectangle if it is partly outside the input
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-04 22:33:17 +02:00
Andreas Cadhalpun 0eec40b713 avidec: check for valid bit_rate range
If bit_rate is negative, it can trigger an av_assert2 in av_rescale_rnd.

Since av_rescale returns int64_t, but st->codec_bit_rate is int, it can
also overflow into a negative value.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-04 21:11:19 +02:00
Michael Niedermayer 783e94cb11 Merge remote-tracking branch 'cehoyos/master'
* cehoyos/master:
  lavfi/cropdetect: Fix cropdetect for > 8 bit input.
  lavf/apngenc: Fix png remuxing by using default extension apng.
  lavf/mxfenc: Write correct interlaced flag when muxing dnxhd.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-04 17:59:56 +02:00
Carl Eugen Hoyos 0bca6182b2 lavfi/cropdetect: Fix cropdetect for > 8 bit input. 2015-05-04 17:50:16 +02:00
Carl Eugen Hoyos 8ad04d24c8 lavf/apngenc: Fix png remuxing by using default extension apng. 2015-05-04 17:49:36 +02:00
Carl Eugen Hoyos d90f91c1c8 lavf/mxfenc: Write correct interlaced flag when muxing dnxhd.
Reported and early patch version tested by forum user gridtank.
Reviewed-by: Tomas Härdin
2015-05-04 17:44:14 +02:00
Michael Niedermayer f320f2f4c6 cmdutils: Ask for a sample in case a odd rotation angle is encountered
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-04 17:39:23 +02:00
Michael Niedermayer 5d309d3091 avformat/matroskadec: Use tracks[k]->stream instead of s->streams[k]
The later is not correct

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-04 15:49:58 +02:00
Andreas Cadhalpun e54540655f matroskadec: check s->streams[k] before using it
This fixes a segmentation fault.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-04 15:48:55 +02:00
Michael Niedermayer d43cd6b08e avcodec/ffv1dec: Check chroma shift parameters
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-04 14:31:45 +02:00
Michael Niedermayer 03baa861ea avcodec/ffv1dec: More completely check micro_version
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-04 14:31:45 +02:00
Michael Niedermayer 3dfbdb328e avcodec/ffv1dec: Check quant table symbols more completely
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-04 14:31:45 +02:00
Andreas Cadhalpun eb9fb508b0 matroskadec: use uint64_t instead of int for index_scale
index_scale is set to matroska->time_scale of type uint64_t.

When index_scale is int, the assignment can overflow and e.g. result
in index_scale = 0. This causes a floating point exception due to the
division by index_scale.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-04 00:16:00 +02:00
Michael Niedermayer 800df6a849 ffmpeg_filter: use get_rotation()
This unifies the rotation extraction code between ffplay and ffmpeg

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-04 00:14:36 +02:00
Michael Niedermayer 4351c288b9 ffplay&cmdutils:Factor get_rotation() code out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-03 23:49:16 +02:00
Anshul Maheshwari a6b630e9b6 avcodec/ccaption_dec: correcting line breaks in cc
Signed-off-by: Anshul Maheshwari <er.anshul.maheshwari@gmail.com>
Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-03 23:38:57 +02:00
Michael Niedermayer f9e802018e ffplay: unify displaymatrix based rotation code
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-03 22:39:39 +02:00
Andreas Cadhalpun 372aa0777a pngdec: don't use AV_PIX_FMT_MONOBLACK for apng
AV_PIX_FMT_MONOBLACK has the AV_PIX_FMT_FLAG_BITSTREAM flag, i.e.
linesize can be smaller than width.

Since x_offset is only check against the width, this can lead to
x_offset * bpp >= image_linesize.

In this case ptr could be set to a position outside the image_buf in
png_handle_row, leading to memory corruption and thus crashes.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-03 21:50:09 +02:00
Andreas Cadhalpun 8f760be4d3 pngdec: return correct error code from decode_frame_common
During the loop ret can get changed. Since it is not set on all failure
paths, decode_frame_common can return 0 even though an error occurred.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-03 20:28:35 +02:00
Andreas Cadhalpun 287dbb0771 pngdec: check s->last_picture.f->data[0] before using it
This check was removed in commit 08aec6f6, but
s->last_picture.f->data[0] is still used in handle_p_frame_apng
unconditionally.

This fixes a segmentation fault.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-03 17:24:28 +02:00
Michael Niedermayer 042260cde4 avcodec/wavpack: Check L/R values before use to avoid harmless integer overflow and undefined behavior in fate
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-03 16:37:10 +02:00
Michael Niedermayer 52835cb8e1 avutil/opt: Avoid division by 0
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-03 16:37:04 +02:00
Muhammad Faiz a141948a8b avfilter/avf_showcqt: optimize gamma calculation
benchmark (on intel core2 duo, gcc 4.9.1)
input samples duration 00:03:39.59
command: time -p ffmpeg -f f32le -ac 2 -ar 44100 -i input.pcm \
         -filter_complex showcqt=fullhd=0:gamma=$gamma \
         -f rawvideo -y /dev/null
gamma  previous  modified
  1    48.49 s   45.38 s
  2    49.33 s   48.11 s
  3    80.86 s   59.80 s
  4    80.84 s   51.25 s
  5    80.75 s   61.06 s
  6    80.93 s   61.80 s
  7    80.03 s   61.56 s

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-03 11:53:04 +02:00
Michael Niedermayer 29ef54aa90 avcodec/nvenc: Make pix_fmts_nvenc const
Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-03 04:14:01 +02:00
Jérôme Martinez 14605a0b99 ffv1dec: plane_index is 1 in case of version 4 gray+alpha.
Since version 4, plane_index for the alpha plane is 1 in the case chroma_planes is 0.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-03 01:55:12 +02:00
Michael Niedermayer eb16881199 LICENSE.md: add *_rect filters
Found-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-03 01:43:30 +02:00
Michael Niedermayer c8b4ffdf55 configure: prepend avfilter_deps for *_rect filters
Found-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-03 01:42:51 +02:00
Michael Niedermayer 40964e2e89 Merge commit '3edeb7749e4276c78ad57307b8c3b32dd476d1da'
* commit '3edeb7749e4276c78ad57307b8c3b32dd476d1da':
  configure: Allow log2 with MSVC 2013 onwards.

Conflicts:
	configure

See: 4d93e758d7
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-03 01:30:53 +02:00
Michael Niedermayer 02b5af7744 Merge commit '863ee06809b215895ee20cbc557eeceb904cf770'
* commit '863ee06809b215895ee20cbc557eeceb904cf770':
  configure: Use the right local variable in the MSVC and ICL probes

Conflicts:
	configure

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-03 01:20:24 +02:00
Michael Niedermayer 0ba65c9f79 Merge commit '709e1c91ea7a5bbf2b9a104642572ca7616b224f'
* commit '709e1c91ea7a5bbf2b9a104642572ca7616b224f':
  avprobe: Print the display matrix from per-stream sidedata

Conflicts:
	avprobe.c

See: 08152f2df2
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-03 01:04:14 +02:00
Michael Niedermayer a72b61a317 ffprobe: support printing AVStream and AVPacket side data
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-03 00:53:19 +02:00
Michael Niedermayer 08152f2df2 ffprobe: Add Support to print information about AV_FRAME_DATA_DISPLAYMATRIX
Idea from 709e1c91ea by Martin Storsjö
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-03 00:39:47 +02:00
Michael Niedermayer 2a3270b66c ffprobe: add writer_print_integers() to allow printing formated 1d and 2d arrays of integers
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-03 00:38:52 +02:00
Michael Niedermayer db4649dd10 Merge commit '3080b0497ddf8549d86ee99b79ac0c15f44ee382'
* commit '3080b0497ddf8549d86ee99b79ac0c15f44ee382':
  avprobe: Support writing arrays of integers without keys

Conflicts:
	avprobe.c

Not merged
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-02 23:43:51 +02:00
Michael Niedermayer a1acae0409 ffmpeg_opt: remove rotate metadata in case of autorotate
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-02 23:04:00 +02:00
Michael Niedermayer f5b26fbc2f Merge commit '16302246b1fcb7ad4e6f7bd31c49956a455336d2'
* commit '16302246b1fcb7ad4e6f7bd31c49956a455336d2':
  avconv: Add an option for automatically rotating video according to display matrix

Conflicts:
	Changelog
	ffmpeg_opt.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-02 22:39:00 +02:00
Michael Niedermayer deedf3e590 Merge commit 'e2d50fc2f5f3600e13055acf1a10fec35e941f37'
* commit 'e2d50fc2f5f3600e13055acf1a10fec35e941f37':
  avplay: Add support for rotated video

Conflicts:
	configure
	doc/ffplay.texi
	ffplay.c

See: 08c51e12b1
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-02 22:31:20 +02:00
Michael Niedermayer e874772f70 Merge commit '21180b73239c6360aa28496d4879713b7ba4a8e5'
* commit '21180b73239c6360aa28496d4879713b7ba4a8e5':
  avplay: Factorize code for adding filters to the filter pipeline

Conflicts:
	ffplay.c

See: 08c51e12b1
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-02 22:08:11 +02:00
Michael Niedermayer 94f4bdc4f1 configure: add forgotten avcodec/avformat deps for find/cover_rect
Found-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-02 21:28:31 +02:00
Michael Niedermayer 61b4ab1860 avfilter: Add cover_rect filter
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-02 21:15:48 +02:00
Michael Niedermayer 94340e4b28 avfilter: add find_rect filter
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-02 21:15:48 +02:00