Commit Graph

2405 Commits

Author SHA1 Message Date
Stefano Sabatini bd6240e7e9 lavfi/sendcmd: move buf init() variable to internal scope where it is used 2012-10-23 22:08:55 +02:00
Stefano Sabatini c7065f1f89 lavfi/sendcmd: release file in case of failed allocation
Avoid hanging file.
2012-10-23 22:08:55 +02:00
Michael Niedermayer 6182e0a6f6 vf_aspect: unbreak avoption system
This fixes ff* -h infinite looping

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-22 13:12:15 +02:00
Stefano Sabatini 6752aac6bc lavfi/aspect: add max option 2012-10-22 10:46:43 +02:00
Stefano Sabatini ccd6def9b3 lavfi/aspect: extend syntax for the setdar and setsar filters
Add support for named options, and deprecate old "num:den" ambiguous
syntax.
2012-10-22 10:46:34 +02:00
Michael Niedermayer 39747d87d0 avfilter_graph_parse: add support for parsing sws_flags
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-22 00:07:35 +02:00
Stefano Sabatini 8f37a1e8dc lavfi/avfiltergraph: avoid to print "(null)" in the scale args
Fix parsing.
2012-10-21 21:44:53 +02:00
Stefano Sabatini 2969abd908 lavfi/graphparser: fix parsing error in case of NULL sws_opts addition
If sws_opts was NULL it was resulting in the args being set to
"W:H:(null)", which with the new parsing code was generating a syntax
failure.
2012-10-21 21:44:45 +02:00
Clément Bœsch fbedce6b85 lavfi/silencedetect: export silence info to metadata. 2012-10-21 17:29:11 +02:00
Clément Bœsch de23953de2 lavfi/select: store scene score in buf ref metadata. 2012-10-21 17:29:11 +02:00
Clément Bœsch 6fb2fd895e lavc: add lavfi metadata support.
This commit introduces a new AVPacket side data type:
AV_PKT_DATA_STRINGS_METADATA. Its main goal is to provide a way to
transmit the metadata from the AVFilterBufferRef up to the AVFrame. This
is at the moment "only" useful for lavfi input from libavdevice:
lavd/lavfi only outputs packets, and the metadata from the buffer ref
kept in its context needs to be transmitted from the packet to the frame
by the decoders. The buffer ref can be destroyed at any time (along with
the metadata), and a duplication of the AVPacket needs to duplicate the
metadata as well, so the choice of using the side data to store them was
selected.

Making sure lavd/lavfi raises the metadata is useful to allow tools like
ffprobe to access the filters metadata (it is at the moment the only
way); ffprobe will now automatically show the AVFrame metadata in any
customizable output format for users. API users will also be able to
access the AVFrame->metadata pointer the same way ffprobe does
(av_frame_get_metadata).

All the changes are done in this single commit to avoid some memory
leaks: for instances, the changes in lavfi/avcodec.c are meant to
duplicate the metadata from the buffer ref into the AVFrame. Unless we
have an internal way of freeing the AVFrame->metadata automatically, it
will leak in most of the user apps. To fix this problem, we introduce
AVCodecContext->metadata and link avctx->metadata to the current
frame->metadata and free it at each decode frame call (and in the codec
closing callback for the last one). But doing this also means to update
the way the tiff decoder already handles the AVFrame->metadata (it's the
only one decoder with frame metadata at the moment), by making sure it
is not trying to free a pointer already freed by the lavc internals.

The lavfi/avcodec.c buffer ref code is based on an old Thomas Kühnel
work, the rest of the code belongs to the commit author.

Signed-off-by: Thomas Kühnel <kuehnelth@googlemail.com>
Signed-off-by: Clément Bœsch <ubitux@gmail.com>
2012-10-21 17:29:10 +02:00
Clément Bœsch 273fca9ac0 lavfi/silencedetect: increase duration precision.
This should also fix CID717889.
2012-10-21 01:28:19 +02:00
Hendrik Leppkes 79393a8363 Replace usage of the deprecated av_pix_fmt_descriptors array with av_pix_fmt_desc_get
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-20 18:00:13 +02:00
Michael Niedermayer aaf78e4d14 vf_mp: fix null ptr deref in case of ENOMEM
Fixes CID703675
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-19 19:59:38 +02:00
Michael Niedermayer 042a738b45 vf_mp: check list in querry_format()
Fixes CID717772
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-19 19:59:38 +02:00
Michael Niedermayer 31fdf3065d vf_idet: reorder operations to avoid division by 0
Fixes CID733738
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-19 19:59:32 +02:00
Nicolas George 709628aa71 lavfi/avf_concat: fix invalid exclusive test.
The invalid test did not cause any actual problem since
the first branch is only possible with bogus filters.

Fix coverity issue CID 733850.
2012-10-17 21:28:58 +02:00
Michael Niedermayer 657998b5ee libavfilter/lavfutils: remove useless NULL check on format context
Fixes: CID733804
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-17 20:00:31 +02:00
Michael Niedermayer fd9e88fe60 libavfilter/lavfutils: remove useless NULL check on codec context
The code would crash before if it was NULL

Fixes CID733804
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-17 20:00:20 +02:00
Michael Niedermayer 5d2b885074 lavfi: limit matching w/h/fmt asserts to non scale filters
This fixes a regression with the scale filters input changing.
In the long run filters should get a flag to indicate support of this
and then this flag be used here.
But the regression should not be left standing until thats done.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-17 00:06:12 +02:00
Michael Niedermayer 6cbb8a450f libavfilter/buffersrc: Do not fail hard on changes of input parameters.
Several filters support this already.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-17 00:06:12 +02:00
Michael Niedermayer 4cc4ca5847 mandelbrot: fix inner=period coloring routine
Fixes CID717571
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-16 04:00:55 +02:00
Stefano Sabatini faa1cb50ed lavfi/ass: extend syntax for ass filter
Make the filter accept named options for the first argument, and update
documentation accordingly.
2012-10-15 22:40:08 +02:00
Michael Niedermayer d6f6a7557c Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avutil: Do not make ff_ symbols globally visible.
  avutil: Rename ff_set_systematic_pal2() ---> avpriv_set_systematic_pal2()
  build: tms470: work around glibc math.h problems
  configure: improve tms470 compiler usage with glibc

Conflicts:
	libavcodec/bmpenc.c
	libavcodec/rawdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-14 15:11:34 +02:00
Clément Bœsch 096d96ffda lavfi/select/scene: use pointer increments instead of y*linesize. 2012-10-14 02:09:05 +02:00
Clément Bœsch 0852648301 lavfi/select/scene: fix potential overread.
Also make sure we use the actual width of the image and not the whole
linesize.
2012-10-14 02:08:06 +02:00
Clément Bœsch dff826b4a8 lavfi/select/scene: move out convoluted sad variable init from loop. 2012-10-14 01:23:00 +02:00
Michael Niedermayer 3b0bb321a5 Merge commit 'f6c38c5f4ed6683a6a61db2ed418a68bbe5f5507'
* commit 'f6c38c5f4ed6683a6a61db2ed418a68bbe5f5507':
  avfilter: call x86 init functions under if (ARCH_X86), not if (HAVE_MMX)
  rtspdec: Set the default port for listen mode, if none is specified
  tscc2: Fix an out of array access
  rtmpproto: Fix an out of array write
  rtspdec: Fix use of uninitialized byte
  vp8: reset loopfilter delta values at keyframes.
  avutil: add yuva422p and yuva444p formats

Conflicts:
	libavutil/pixdesc.c
	libavutil/pixfmt.h
	tests/ref/lavfi/pixdesc
	tests/ref/lavfi/pixfmts_copy
	tests/ref/lavfi/pixfmts_null
	tests/ref/lavfi/pixfmts_scale
	tests/ref/lavfi/pixfmts_vflip

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-13 14:14:11 +02:00
Michael Niedermayer d2a618ab22 af_pan: fix memleak of arg
Fixes CID718988
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-13 01:51:45 +02:00
Michael Niedermayer f374e9989b vf_fade: fix memleaks of args
Fixes: CID718989
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-13 01:08:08 +02:00
Diego Biurrun f6c38c5f4e avfilter: call x86 init functions under if (ARCH_X86), not if (HAVE_MMX) 2012-10-12 19:58:51 +02:00
Michael Niedermayer 13afee951a Merge commit '59ee9f78b0cc4fb84ae606fa317d8102ad32a627'
* commit '59ee9f78b0cc4fb84ae606fa317d8102ad32a627':
  lavfi: do not use av_pix_fmt_descriptors directly.

Conflicts:
	libavfilter/buffersrc.c
	libavfilter/drawutils.c
	libavfilter/filtfmts.c
	libavfilter/vf_ass.c
	libavfilter/vf_boxblur.c
	libavfilter/vf_drawtext.c
	libavfilter/vf_lut.c
	libavfilter/vf_pad.c
	libavfilter/vf_scale.c
	libavfilter/vf_showinfo.c
	libavfilter/vf_transpose.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-12 17:04:58 +02:00
Anton Khirnov 59ee9f78b0 lavfi: do not use av_pix_fmt_descriptors directly. 2012-10-12 12:45:39 +02:00
Clément Bœsch 9ad1ea13e0 lavfi/ebur128: fix typo in condition.
Fixes CID733727.
2012-10-11 18:41:07 +02:00
Michael Niedermayer 9ba2484ece af_aresample: fix leak on alloc failure
Fixes CID733798
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-11 16:48:25 +02:00
Michael Niedermayer 7457da3698 drawtext: fix leak with timecodes
Fixes CID733799
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-11 16:45:50 +02:00
Michael Niedermayer 526cb36e4b Merge commit '4436f25a1682ada3f7226cb6fadf429946933161'
* commit '4436f25a1682ada3f7226cb6fadf429946933161':
  build: remove references to unused EXTRAOBJS variable
  lavfi: convert input/ouput list compound literals to named objects
  fate: add h263 obmc vsynth tests
  avconv: remove bogus warning when using avconv -h without parameter
  averror: explicitly define AVERROR_* values
  flashsv: propagate inflateReset() errors
  indeo4/5: remove constant parameter num_bands from wavelet recomposition
  mxfdec: return error if no segments are available in mxf_get_sorted_table_segments
  Double motion vector range for HPEL interlaced picture in proper place

Conflicts:
	libavcodec/v210dec.h
	libavfilter/af_aformat.c
	libavfilter/af_amix.c
	libavfilter/af_asyncts.c
	libavfilter/af_channelmap.c
	libavfilter/af_join.c
	libavfilter/asrc_anullsrc.c
	libavfilter/buffersrc.c
	libavfilter/f_setpts.c
	libavfilter/f_settb.c
	libavfilter/fifo.c
	libavfilter/src_movie.c
	libavfilter/vf_ass.c
	libavfilter/vf_blackframe.c
	libavfilter/vf_boxblur.c
	libavfilter/vf_delogo.c
	libavfilter/vf_drawbox.c
	libavfilter/vf_drawtext.c
	libavfilter/vf_fade.c
	libavfilter/vf_fieldorder.c
	libavfilter/vf_fps.c
	libavfilter/vf_hflip.c
	libavfilter/vf_overlay.c
	libavfilter/vf_pad.c
	libavfilter/vf_select.c
	libavfilter/vf_transpose.c
	libavfilter/vf_yadif.c
	libavfilter/vsrc_testsrc.c
	libavformat/mxfdec.c
	libavutil/error.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-11 15:46:48 +02:00
Michael Niedermayer bdcff5af7f af_volumedetect: fix use of uninitilaized variable in case of planar audio.
Fixes: CID733841
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-11 03:12:40 +02:00
Michael Niedermayer 989c91b504 asrc_aevalsrc: Fix use of uninitialized pointer inside av_strtok()
Fixes CID733842
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-11 03:00:34 +02:00
Michael Niedermayer 4d4f431ab7 vf_idet: zero pointers after freeing references
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-11 02:21:28 +02:00
Michael Niedermayer cac749a551 vf_idet: fix free after use
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-11 02:21:28 +02:00
Mans Rullgard 568c70e79e lavfi: convert input/ouput list compound literals to named objects
A number of compilers, for example those from TI and IBM, choke on
these initialisers.  The current style is also quite ugly.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-10 22:26:12 +01:00
Matthieu Bouron f94edfe484 vf_idet: remove some unnecessary statement and unused variable
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-10 16:48:58 +02:00
Michael Niedermayer cd6f5c4895 Merge commit '6d0beefbf6ee6dbf8efb522a9307e54c6ed5f702'
* commit '6d0beefbf6ee6dbf8efb522a9307e54c6ed5f702':
  swscale: Do not make ff_ symbols globally visible.
  rtspdec: use av_strlcpy for writing into fixed size buffer
  g722enc: fix size argument in memset
  http: use av_strlcpy instead of strcpy() without size checks
  avfilter: correct memcpy size avfilter_copy_buf_props()
  lavc: split asv12 encoder/decoder

Conflicts:
	libavcodec/asvdec.c
	libavfilter/buffer.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-10 14:07:05 +02:00
Michael Niedermayer 50b5477616 Merge commit 'b94e4acb4874843e914fd3cb8e089aff0756bb4a'
* commit 'b94e4acb4874843e914fd3cb8e089aff0756bb4a':
  cmdutils_read_file: increment *size after writing the trailing \0
  af_resample: unref out_buf when avresample_convert returns 0
  af_amix: prevent memory leak on error path
  vc1dec: prevent memory leak in error path
  vc1dec: prevent memory leak on av_realloc error
  af_channelmap: free old extended_data on reallocation
  avconv: simplify memory allocation in copy_chapters
  matroskaenc: check cue point validity before reallocation
  swfenc: error out for more than 1 audio or video stream
  build: link test programs only against static libs

Conflicts:
	ffmpeg_opt.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-10 13:18:05 +02:00
Clément Bœsch 6ac5e3fe9d lavfi/silencedetect: add av_opt_free() call.
This avoids a memleak with noise_str.
2012-10-09 22:37:29 +02:00
Janne Grunau 79e6e8eba2 avfilter: correct memcpy size avfilter_copy_buf_props()
Does not make a difference in this case since sizeof(uint8_t*) ==
sizeof(uint8_t**). Fixes CID703814.
2012-10-09 21:05:14 +02:00
Janne Grunau ac9a89562a af_resample: unref out_buf when avresample_convert returns 0
Fixes CID732273.
2012-10-09 18:43:30 +02:00
Janne Grunau 8501c09868 af_amix: prevent memory leak on error path
Fixes CID732272.
2012-10-09 16:15:15 +02:00
Janne Grunau 1afd7a118f af_channelmap: free old extended_data on reallocation
Prevents writes to freed memory and the leak of the old extended data.
Fixes CID732303.
2012-10-09 15:41:24 +02:00
Michael Niedermayer ac627b3d38 Merge commit '716d413c13981da15323c7a3821860536eefdbbb'
* commit '716d413c13981da15323c7a3821860536eefdbbb':
  Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat

Conflicts:
	doc/examples/muxing.c
	ffmpeg.h
	ffmpeg_filter.c
	ffmpeg_opt.c
	ffplay.c
	ffprobe.c
	libavcodec/8bps.c
	libavcodec/aasc.c
	libavcodec/aura.c
	libavcodec/avcodec.h
	libavcodec/avs.c
	libavcodec/bfi.c
	libavcodec/bmp.c
	libavcodec/bmpenc.c
	libavcodec/c93.c
	libavcodec/cscd.c
	libavcodec/cyuv.c
	libavcodec/dpx.c
	libavcodec/dpxenc.c
	libavcodec/eatgv.c
	libavcodec/escape124.c
	libavcodec/ffv1.c
	libavcodec/flashsv.c
	libavcodec/fraps.c
	libavcodec/h264.c
	libavcodec/huffyuv.c
	libavcodec/iff.c
	libavcodec/imgconvert.c
	libavcodec/indeo3.c
	libavcodec/kmvc.c
	libavcodec/libopenjpegdec.c
	libavcodec/libopenjpegenc.c
	libavcodec/libx264.c
	libavcodec/ljpegenc.c
	libavcodec/mjpegdec.c
	libavcodec/mjpegenc.c
	libavcodec/motionpixels.c
	libavcodec/mpeg12.c
	libavcodec/mpeg12enc.c
	libavcodec/mpeg4videodec.c
	libavcodec/mpegvideo_enc.c
	libavcodec/pamenc.c
	libavcodec/pcxenc.c
	libavcodec/pgssubdec.c
	libavcodec/pngdec.c
	libavcodec/pngenc.c
	libavcodec/pnm.c
	libavcodec/pnmdec.c
	libavcodec/pnmenc.c
	libavcodec/ptx.c
	libavcodec/qdrw.c
	libavcodec/qpeg.c
	libavcodec/qtrleenc.c
	libavcodec/raw.c
	libavcodec/rawdec.c
	libavcodec/rl2.c
	libavcodec/sgidec.c
	libavcodec/sgienc.c
	libavcodec/snowdec.c
	libavcodec/snowenc.c
	libavcodec/sunrast.c
	libavcodec/targa.c
	libavcodec/targaenc.c
	libavcodec/tiff.c
	libavcodec/tiffenc.c
	libavcodec/tmv.c
	libavcodec/truemotion2.c
	libavcodec/utils.c
	libavcodec/vb.c
	libavcodec/vp3.c
	libavcodec/wnv1.c
	libavcodec/xl.c
	libavcodec/xwddec.c
	libavcodec/xwdenc.c
	libavcodec/yop.c
	libavdevice/v4l2.c
	libavdevice/x11grab.c
	libavfilter/avfilter.c
	libavfilter/avfilter.h
	libavfilter/buffersrc.c
	libavfilter/drawutils.c
	libavfilter/formats.c
	libavfilter/src_movie.c
	libavfilter/vf_ass.c
	libavfilter/vf_drawtext.c
	libavfilter/vf_fade.c
	libavfilter/vf_format.c
	libavfilter/vf_hflip.c
	libavfilter/vf_lut.c
	libavfilter/vf_overlay.c
	libavfilter/vf_pad.c
	libavfilter/vf_scale.c
	libavfilter/vf_transpose.c
	libavfilter/vf_yadif.c
	libavfilter/video.c
	libavfilter/vsrc_testsrc.c
	libavformat/movenc.c
	libavformat/mxf.h
	libavformat/utils.c
	libavformat/yuv4mpeg.c
	libavutil/imgutils.c
	libavutil/pixdesc.c
	libswscale/input.c
	libswscale/output.c
	libswscale/swscale_internal.h
	libswscale/swscale_unscaled.c
	libswscale/utils.c
	libswscale/x86/swscale_template.c
	libswscale/x86/yuv2rgb.c
	libswscale/x86/yuv2rgb_template.c
	libswscale/yuv2rgb.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-08 21:06:57 +02:00
Michael Niedermayer 43c157f4a4 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  af_resample: avoid conversion of identical sample formats for 1 channel
  avcodec: allow either planar or interleaved sample format when encoding mono
  adpcmenc: ensure calls to adpcm_ima_compress_sample() are in the right order
  timefilter: De-doxygenize normal code comments and drop silly ones
  gxf: Include the right header for the avpriv_frame_rate_tab declaration

Conflicts:
	libavcodec/adpcmenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-08 13:11:11 +02:00
Anton Khirnov 716d413c13 Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat 2012-10-08 07:13:26 +02:00
Justin Ruggles 7b556be673 af_resample: avoid conversion of identical sample formats for 1 channel
When there is only 1 channel, the planar and interleaved formats of the same
data type should be treated as identical.
2012-10-07 16:45:50 -04:00
Bobby Bingham 51211d351c vf_tile: fix typos/grammar in comments
Signed-off-by: Bobby Bingham <uhmmmm@gmail.com>
2012-10-06 11:34:10 -05:00
Michael Niedermayer 55c49afc42 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  yuv4mpeg: return proper error codes.
  Give all anonymously typedeffed structs in headers a name
  fate: Add parseutils test
  parseutils-test: Drop random colors from parsing test
  vf_pad/scale: use double precision for aspect ratios.
  build: error on variable-length arrays
  ppc: swscale: rework yuv2planeX_altivec()
  ppc: fmtconvert: kill VLA in float_to_int16_interleave_altivec()
  x86: dsputil: kill VLA in gmc_mmx()
  libspeexenc: Updated commentary to reflect recent changes
  libspeexenc: Add an option for enabling DTX
  doc/APIchanges: fill in missing dates and hashes.
  lavr: bump major to 1 and declare it stable.
  lavr: change the type of the data buffers to uint8_t**.
  lavc: deprecate the audio resampling API.

Conflicts:
	cmdutils.h
	configure
	doc/APIchanges
	ffplay.c
	libavcodec/dwt.h
	libavcodec/libspeexenc.c
	libavfilter/vf_pad.c
	libavfilter/vf_scale.c
	libavformat/asf.h
	tests/fate/libavutil.mak
	tests/ref/fate/parseutils

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-06 13:45:08 +02:00
Diego Biurrun e4cbf7529b Give all anonymously typedeffed structs in headers a name
Anonymous structs cannot be forward declared and have no benefit.
2012-10-06 09:27:11 +02:00
Anton Khirnov ba04177eeb vf_pad/scale: use double precision for aspect ratios.
Fixes Bug 203.

CC:libav-stable@libav.org
2012-10-06 07:27:53 +02:00
Carl Eugen Hoyos eb63a74789 Do not print debug output for the (MPlayer) pullup filter. 2012-10-05 21:03:59 +02:00
Anton Khirnov e7ba5b1de0 lavr: change the type of the data buffers to uint8_t**.
This is more consistent with what the rest of Libav does.

This breaks API.
2012-10-05 13:49:44 +02:00
Michael Niedermayer 0f1446a4d0 Merge commit 'ab35ec29a4071871934856c00da7d6ebcc0c095b'
* commit 'ab35ec29a4071871934856c00da7d6ebcc0c095b':
  vf_overlay: get rid of pointless messing with timebase.
  samplefmt: make av_samples_alloc() initialize the data to silence.
  libspeexdec: handle NULL return value from speex_packet_to_header()
  h264probe: Don't error out on bits that no longer are reserved
  mpegvideo: set extended_data in ff_update_duplicate_context()
  libspeexdec: properly handle DTX for multiple frames-per-packet
  libspeexdec: move the SpeexHeader from LibSpeexContext to where it is used
  libspeexdec: simplify setting of frame_size
  libspeexdec: set channel_layout

Conflicts:
	libavfilter/vf_overlay.c
	libavformat/h264dec.c
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-04 13:11:45 +02:00
Anton Khirnov 4673a5a761 vf_overlay: properly sync inputs.
Right now it incorrectly assumes that the frames are sent in the proper
order, which worked with old ffmpeg and avconv versions by accident.
2012-10-04 10:23:25 +02:00
Anton Khirnov ab35ec29a4 vf_overlay: get rid of pointless messing with timebase.
Output frames correspond 1:1 to input frames on the main input.
So use the main input timebase for output.
2012-10-04 10:21:58 +02:00
Stefano Sabatini c053f48662 lavfi/transpose: add passthrough option 2012-10-02 09:43:06 +02:00
Stefano Sabatini 6300062774 lavfi/transpose: add support to named options and shortands
Allow extensibility.
2012-10-02 09:20:10 +02:00
Clément Bœsch 2308c5bb25 lavfi/edgedetect: add missing minus in a comment. 2012-10-01 22:31:14 +02:00
Clément Bœsch d771b1d137 lavfi: EBU R.128 scanner. 2012-10-01 22:26:19 +02:00
Clément Bœsch 13d878366f lavfi/ashowinfo: check plane value before deferencing. 2012-09-30 21:00:52 +02:00
jamal a70b4935f1 Add missing version macros to libraries
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-28 15:10:18 +02:00
Nicolas George 9de731e9d0 lavfi/sink_buffer: implement libav compatibility API.
Implement av_buffersink_read() and av_buffersink_read_samples()
for ffmpeg's version of buffersink.

With this change, avconv linked against ffmpeg's libraries passes
the same number of tests whether it uses ffbuffersink or
buffersink_old.
2012-09-27 18:43:37 +02:00
Nicolas George 8e1f063efc lavfi: enable buffersinks unconditionally.
They are part of the public API. Their libav compatibility
counterpart are already enabled unconditionally.
2012-09-27 15:57:30 +02:00
Michael Niedermayer 46a35959d8 Merge commit '7751e4693dd10ec98c20fbd9887233b575034272'
* commit '7751e4693dd10ec98c20fbd9887233b575034272':
  ogg: check that the expected number of headers had been parsed
  libx264: change default to closed gop to match x264cli
  Use avcodec_free_frame() to free AVFrames.
  lavf: use a malloced AVFrame in try_decode_frame().
  lavc: add avcodec_free_frame().
  lavc: ensure extended_data is set properly on decoding
  lavc: initialize AVFrame.extended_data in avcodec_get_frame_defaults()
  lavc: use av_mallocz to allocate AVFrames.
  lavc: rename the argument of avcodec_alloc_frame/get_frame_defaults

Conflicts:
	doc/APIchanges
	doc/examples/decoding_encoding.c
	libavcodec/utils.c
	libavcodec/version.h
	libavfilter/src_movie.c
	libavformat/oggdec.c
	libavformat/oggdec.h
	libavformat/oggparsetheora.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-25 15:15:16 +02:00
Anton Khirnov 11d1ca4b2c Use avcodec_free_frame() to free AVFrames. 2012-09-24 12:31:25 +02:00
Stefano Sabatini 740c995288 lavfi: add asendcmd and sendcmd filters 2012-09-23 00:50:06 +02:00
Stefano Sabatini 7fe1ecefe1 lavfi/hue: simplify/fix setting logic in set_options()
Parse expression only when a new value is explicitly specified.

In particular, avoid double free in case an old expression value is
cached, it is set in the context, it is freed as the old value, and
finally the pointer stored in the context is freed again when the filter
is released.
2012-09-23 00:46:33 +02:00
Andrew Wason 225efccefc lavfi/buffersink: fix check on pixel_fmts in the opaque parameter
Fix programmatic selection of accepted pixel formats.

Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2012-09-22 10:59:40 +02:00
Loren Merritt 1b1b902e2c hqdn3d: Fix out of array read in LOWPASS
Fixes ticket1752

Commit message by commiter
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-22 03:17:28 +02:00
Stefano Sabatini 3aa1b53256 lavfi/hue: set to NULL freed pointers
Possibly safer.
2012-09-21 12:44:44 +02:00
Stefano Sabatini 31aa5b1a78 lavfi/hue: fix crash when resetting the saturation expression
Previously when saturation was reinited, the old value was freed when
setting options, and freed again in PARSE_EXPRESSION().
2012-09-21 12:43:52 +02:00
Michael Niedermayer 3dc24600ba vsrc_testsrc: Fix case without a specified duration
Fixes regression since 98f753ec51

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-21 03:00:15 +02:00
Clément Bœsch 2f39d7ff3f lavfi/select: make lavc dependency optional. 2012-09-20 18:45:47 +02:00
Stefano Sabatini 98f753ec51 lavfi/testsrc: increase precision of the duration parameter
Compute duration in microseconds, rather than in timebase units. Decrease
approximation errors.
2012-09-20 12:13:17 +02:00
Michael Niedermayer c1f3a4d1e3 libavfilter/filtfmts: fix argv/argc checks
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-19 22:43:03 +02:00
Michael Niedermayer f5326dc68e bavfilter/filtfmts: fix type for channel layouts
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-19 22:19:06 +02:00
Clément Bœsch b89c16e73e lavfi/select: make sure avctx is set before closing it.
This avoid a crash when the filter fails before config_input(),
typically with a syntax error in the next filter:
    select=gt(scene\,.4),select=fail
2012-09-18 18:52:57 +02:00
Michael Niedermayer 91af76099e Merge commit '23aae62c2cb4504a09ceb8cd0cabc1c8b260f521'
* commit '23aae62c2cb4504a09ceb8cd0cabc1c8b260f521':
  alsdec: Check k used for rice decoder.
  avfiltergraph: silence an uninitialized variable warning
  xsubenc: reindent
  lavc: replace AVCodecContext.encode with subtitle-specific callback
  lavc: add const to private codec class initialization.
  avconv: don't pass a bogus parameter to avfilter_graph_create_filter().
  id3v2: strdup the genre name explicitly.
  lavf/id3v2: do not export empty fields.
  buffersrc: add const to the AVFrame* argument of av_buffersrc_write_frame()
  lavfi: replace empty input/output lists with null pointers

Conflicts:
	ffmpeg_filter.c
	libavcodec/alsdec.c
	libavcodec/dvdsubenc.c
	libavcodec/utils.c
	libavcodec/v210dec.h
	libavfilter/af_channelsplit.c
	libavfilter/avfiltergraph.c
	libavfilter/buffersrc.c
	libavfilter/src_movie.c
	libavfilter/vf_ass.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-18 14:45:44 +02:00
Anton Khirnov e3496e5dbe avfiltergraph: silence an uninitialized variable warning
The warning is:
libavfilter/avfiltergraph.c: In function ‘avfilter_graph_config’:
libavfilter/avfiltergraph.c:528:9: warning: ‘best_idx’ may be used uninitialized in this function [-Wuninitialized]
libavfilter/avfiltergraph.c:479:13: note: ‘best_idx’ was declared here

Initialize it to an invalid value and add an assert that it's properly
set later.
2012-09-17 15:48:20 +02:00
Anton Khirnov 4e48aa8656 buffersrc: add const to the AVFrame* argument of av_buffersrc_write_frame() 2012-09-17 15:48:20 +02:00
Mans Rullgard 1fce361d70 lavfi: replace empty input/output lists with null pointers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-09-17 14:35:06 +01:00
Clément Bœsch 74434d3bfe lavfi/ass: mark ass_libavfilter_log_level_map as static const. 2012-09-16 02:59:43 +02:00
Hendrik Leppkes e3a1eb9edf af_pan: Fix sscanf formats to work with buggy sscanf implementations
Some implementations of sscanf do not handle a space before a trailing %n
properly.

As an example, MSVC's does this for the second insatnce in this patch, for
an input of "0x3:c0=c1:c1=c0":
    1) Match the final "c0" or "c1".
    2) Realize it's at the end of the string.
    3) Check for %n.
    4) There is no %n, but a space instead.
    5) Leave 'len' unitilialized.

So, move it out of the sscanf format strings, and call skip_spaces instead.

This bug does not affect skip_spaces since %n is the first and only formatting
string.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2012-09-15 19:49:34 -04:00
Jérémy Tran 75d34864d1 lavfi/hue: add dynamic expression evaluation support
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2012-09-15 01:05:27 +02:00
Stefano Sabatini dead4580e2 lavfi/avcodec: apply cosmetics style fixes 2012-09-14 11:06:40 +02:00
Nicolas George 8ad54a44eb lavfi: check that buffer and link properties match. 2012-09-13 20:09:53 +02:00
Nicolas George c262ddb8c5 lavfi: set sample_rate in the default allocator. 2012-09-13 20:09:53 +02:00
Nicolas George b5bea2f960 lavfi/aresample: set buffer properties after copy.
The aresample filter changes the format, layout and/or sample rate,
it can not copy them blindly from its input.

Related to trac ticket #1671.
2012-09-13 12:05:19 +02:00
Stefano Sabatini 3015194448 lavfi/amerge: clarify the error message in case of input overlap 2012-09-11 18:58:19 +02:00
Clément Bœsch bbae8cdf4d lavfi/amerge: avoid a forward declaration. 2012-09-11 18:38:09 +02:00
Clément Bœsch 7b56dddd56 lavfi/amerge: fix input pad name behaviour.
This fixes two problems:
 - the invalid pad.name stack pointer after init() ends
 - the duplicated name for all inputs
2012-09-11 14:59:23 +02:00
Stefano Sabatini 206c34e17d lavfi/setpts: set SAMPLE_RATE to NAN when input is no audio
Should be more robust/consistent.
2012-09-10 18:52:28 +02:00