Commit Graph

675 Commits

Author SHA1 Message Date
Stefano Sabatini 93f0882725 ffserver: improve error feedback in case of av_write_frame() error 2013-12-13 09:42:15 +01:00
Stefano Sabatini b58161d6b6 ffserver: print error code description in case of write_header() failure
Improve feedback.
2013-11-30 14:35:33 +01:00
Stefano Sabatini 73b8730475 ffserver: improve error feedback in case of write_header() failure 2013-11-29 12:11:39 +01:00
Stefano Sabatini b133ec6244 ffserver: improve feedback in case no feed is defined for a stream 2013-11-29 12:11:34 +01:00
Stefano Sabatini 0083514727 ffserver: improve feedback in case of stream with unknown feed name 2013-11-29 12:11:28 +01:00
Stefano Sabatini b1049f89fa ffserver: deprecate inconsistent parsing behavior of Truncate option
Also make it accept the more consistent behavior (boolean option set to
true when specified).
2013-11-29 10:28:03 +01:00
Stefano Sabatini 0124fca03f ffserver: extend feedback in http_start_receive_data() 2013-11-29 10:28:03 +01:00
Stefano Sabatini ab89d2dd2a ffserver: fix typo in comment: defaut -> default 2013-11-28 23:13:46 +01:00
Stefano Sabatini 77f5cb92af ffserver: factorize code setting ReadOnlyFile/File options 2013-11-28 23:13:45 +01:00
Stefano Sabatini 0e1e5d0053 ffserver: improve error feedback in open_input_stream() 2013-11-28 23:13:45 +01:00
Stefano Sabatini ddab41995f ffserver: drop stream AudioQuality option
It has no effect, and it was never documented.
2013-11-28 23:13:45 +01:00
Stefano Sabatini 4f60d53b18 ffserver: add comment about how Launch path program is created 2013-11-28 23:13:45 +01:00
Stefano Sabatini 7cbbc4f7e7 ffserver: extend error handling when parsing the configuration file
In particular, abort immediately in case of memory error, avoid potential
crashes.
2013-11-28 23:13:45 +01:00
Stefano Sabatini 04702a0d3d ffserver: add some error handling to main() 2013-11-28 23:13:45 +01:00
Stefano Sabatini f7fbb7ac99 ffserver: clarify feedback in case of wrong AVOptionAudio/Video error 2013-11-28 10:19:03 +01:00
Stefano Sabatini 8adaee56c4 ffserver: factorize opt_audio/video_codec
Simplify.
2013-11-27 15:48:19 +01:00
Michael Niedermayer 885739f3b4 ffserver: strip odd chars from html error messages before sending them back
Fixes Ticket3034

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-09 00:30:46 +02:00
Alexey Balekhov 90ca814267 ffserver: allow choosing the pixel format
Fixes Ticket2954

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-14 03:51:45 +02:00
Michael Niedermayer e85771f268 ffserver: allocate rc_eq, prevent freeing invalid pointer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-13 15:24:30 +02:00
Michael Niedermayer 4131f21f77 Merge commit '612a5049d9b4ac1c2a293daf75fe814b7a94fdc7'
* commit '612a5049d9b4ac1c2a293daf75fe814b7a94fdc7':
  avserver: do not use a static string as a default for a string option

See: 19c41c6d8e
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-06 09:13:51 +02:00
Michael Niedermayer fcccb4c11d Merge commit 'b7e6da988bfd5def40ccf3476eb8ce2f98a969a5'
* commit 'b7e6da988bfd5def40ccf3476eb8ce2f98a969a5':
  rtpproto: Move rtpproto specific function declarations to a separate header

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-01 12:03:24 +02:00
Michael Niedermayer 8740762c43 Merge commit 'd010e95f86089abe9a3d4d4a66ac8102312d28a4'
* commit 'd010e95f86089abe9a3d4d4a66ac8102312d28a4':
  avserver: Remove unused loadable module support

Conflicts:
	configure
	ffserver.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-19 10:26:07 +02:00
Michael Niedermayer 2192f89368 ffserver: fix null pointer dereference
Fixes CID732208
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-04 13:19:27 +02:00
Michael Niedermayer 73920ac573 ffserver: replace atoll() by strtoll()
this should make it easier to support ffserver with msvc

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-19 11:13:07 +02:00
Michael Niedermayer 4a595cff79 ffserver/ctime1: avoid using strcpy()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-25 23:31:34 +01:00
Clément Bœsch 19c41c6d8e opt: re-enable memleak fix for duplicated options.
The memleak fix in a1bcc76e was causing problems when the original
string wasn't NULL or av_malloc'ed, thus was disabled. It seems the only
OPT_STRING occurence where it needed to be fixed is in ffserver. This
commit fixes that specific problem and so re-enable the original code.
2013-03-13 07:25:16 +01:00
Michael Niedermayer dac8799529 Merge commit 'ddcca4ba074aa537c3059c76d69eb4ad6316bfe9'
* commit 'ddcca4ba074aa537c3059c76d69eb4ad6316bfe9':
  lavc: stop setting AVFrame.motion_subsample_log2
  avserver: don't set deprecated options.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-12 14:27:54 +01:00
Reimar Döffinger 88d55b827d Remove incorrect use of ctype.h functions.
As far as I can tell the code should not change behaviour
depending on locale in any of these places.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2013-03-03 21:44:10 +01:00
Clément Bœsch 9db5f82032 ffserver: add missing padding to extradata. 2012-12-30 22:22:18 +01:00
Michael Niedermayer cbe43e62c9 ffserver: set oformat
Fix Ticket1986

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-09 23:39:06 +01:00
Michael Niedermayer c2c1726847 ffserver remove CONFIG_NOCUTILS check
Nothing sets CONFIG_NOCUTILS, i also dont remember anything setting it in
the past.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-27 14:41:41 +01:00
Michael Niedermayer ff3b59c848 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  x86: dsputil: port to cpuflags
  crc: av_crc() parameter names should match between .c, .h and doxygen
  avserver: replace av_read_packet with av_read_frame
  avserver: fix constness casting warnings

Conflicts:
	libavcodec/x86/dsputil.asm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-16 13:23:35 +01:00
Michael Niedermayer f30cf51d46 ffserver: put NoDaemon back so as not not break existing conf files.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-16 13:12:09 +01:00
Michael Niedermayer 3db32ec119 Merge commit 'bf5f46b4cc47b7a4568119f224057d4ff91b6cdd'
* commit 'bf5f46b4cc47b7a4568119f224057d4ff91b6cdd':
  APIChanges: add entry for av_read_packet deprecation
  mxfdec: fix typo in mxf_read_seek()
  avserver: use freopen to redirect stdin/out/err to /dev/null
  avserver: remove daemon mode
  configure: Check for -Werror parameters on clang
  doxygen: remove obsolete options from Doxyfile
  configure: Add option to disable all command line programs

Conflicts:
	Changelog
	configure
	doc/APIchanges
	doc/ffserver.conf
	doc/ffserver.texi
	ffserver.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-16 13:07:10 +01:00
Clément Bœsch 0e482a8e49 ffserver: fix streams and priv_data memleaks when closing a connection. 2012-11-15 11:52:44 +01:00
Clément Bœsch 26afdbcfc0 ffserver: fix NULL dereference with quoted Stream name. 2012-11-14 10:09:57 +01:00
Clément Bœsch a9ba9268d7 ffserver: prefer av_asprintf over malloc+snprintf for Launch setting. 2012-11-14 10:09:51 +01:00
Michael Niedermayer a04698c4a9 ffserver: zero dest_addr
Fixes CID733838
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-04 13:00:20 +01:00
Michael Niedermayer 8943ad4014 Merge commit '4521645b1aee9e9ad8f5cea7b2392cd5f6ffcd26'
* commit '4521645b1aee9e9ad8f5cea7b2392cd5f6ffcd26':
  avio: fix pointer type mismatches in avio_enum_protocols()
  avserver: use socklen_t where appropriate
  udp: use socklen_t where appropriate
  network: use HAVE_THREADS instead of local hack
  af_channelmap: remove stray enum declaration
  buffersink: remove stray semicolon after function definition

Conflicts:
	libavformat/avio.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-28 13:19:11 +01:00
Martin Ettl cc72d52dc1 ffserver: fix printf argument type 2012-10-25 16:35:57 +00:00
Michael Niedermayer 71bc8c95d7 ffm_read_write_index: check lseek return code
Fixes CID732184
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-17 20:35:16 +02:00
Michael Niedermayer 378a5b9c5f ffm_write_write_index: check lseek() return code
Fixes CID732185
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-17 20:23:16 +02:00
Michael Niedermayer d6e87190fd Merge commit 'a25d912dca9cd553440167e0476c47581359c0fc'
* commit 'a25d912dca9cd553440167e0476c47581359c0fc':
  avcodec_encode_audio(): fix invalid free
  pcm-mpeg: correct bitrate calculation
  ffv1: K&R formatting cosmetics
  fate: Add rangecoder test
  network: #include stdint.h in network.h
  nut: export codec_tag provided by rawvideo
  avserver: move avserver-specific code from ffmdec.c to avserver.c

Conflicts:
	ffserver.c
	libavcodec/ffv1.c
	libavformat/ffmdec.c
	libavformat/nutenc.c
	tests/ref/lavfi/crop
	tests/ref/lavfi/crop_scale
	tests/ref/lavfi/crop_scale_vflip
	tests/ref/lavfi/crop_vflip
	tests/ref/lavfi/null
	tests/ref/lavfi/pixdesc
	tests/ref/lavfi/pixfmts_copy
	tests/ref/lavfi/pixfmts_crop
	tests/ref/lavfi/pixfmts_hflip
	tests/ref/lavfi/pixfmts_null
	tests/ref/lavfi/pixfmts_pad
	tests/ref/lavfi/pixfmts_scale
	tests/ref/lavfi/pixfmts_vflip
	tests/ref/lavfi/scale200
	tests/ref/lavfi/scale500
	tests/ref/lavfi/vflip
	tests/ref/lavfi/vflip_crop
	tests/ref/lavfi/vflip_vflip

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-17 14:17:55 +02:00
Michael Niedermayer ff814c75a3 ffserver: fix return value of add_codec()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-13 05:36:41 +02:00
Michael Niedermayer 0f46825d98 ffserver: prevent nb_streams from becoming too large
Fixes CID732249

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-13 00:31:21 +02:00
Martin Ettl f077e1fb4c ffserver: fix potential buffer overflow, based on wrong fscanf format indentifier.
Fixed Ticket1780

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-02 22:59:03 +02:00
Michael Niedermayer 032ba74ed2 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  ARM: fix Thumb PIC on Apple
  nut: add do {} while (0) to GET_V
  tiffenc: Check av_malloc() results.
  tiffenc: Simplify pixel format setup using AVPixFmtDescriptor.
  Use atexit() instead of defining a custom exit_program() interface.
  msvc: Fix detection of VFW & Avisynth required libs

Conflicts:
	ffmpeg.c
	ffmpeg_opt.c
	ffplay.c
	ffprobe.c
	ffserver.c
	libavcodec/tiffenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-02 19:48:54 +02:00
Michael Niedermayer 31ab1575e5 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avcodec: Convert some commented-out printf/av_log instances to av_dlog
  avcodec: Drop silly and/or broken printf debug output
  avcodec: Drop some silly commented-out av_log() invocations
  avformat: Convert some commented-out printf/av_log instances to av_dlog
  avformat: Remove non-compiling and/or silly commented-out printf/av_log statements
  Remove some silly disabled code.
  ac3dec: ensure get_buffer() gets a buffer for the correct number of channels

Conflicts:
	libavcodec/dnxhddec.c
	libavcodec/ffv1.c
	libavcodec/h264.c
	libavcodec/h264_parser.c
	libavcodec/mjpegdec.c
	libavcodec/motion_est_template.c
	libavcodec/mpegaudiodec.c
	libavcodec/mpegvideo_enc.c
	libavcodec/put_bits.h
	libavcodec/ratecontrol.c
	libavcodec/wmaenc.c
	libavdevice/timefilter.c
	libavformat/asfdec.c
	libavformat/avidec.c
	libavformat/avienc.c
	libavformat/flvenc.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-01 16:12:38 +02:00
Bobby Bingham f1b6c14297 ffserver: fix typo in log message
Signed-off-by: Bobby Bingham <uhmmmm@gmail.com>
2012-09-18 21:11:06 -05:00
Michael Niedermayer ac0f1ae64b Merge remote-tracking branch 'qatar/master'
* qatar/master:
  utvideoenc: Add missing AV_ prefix to codec ID
  avserver: Add missing #include for av_gettime()
  configure: Only disable aligned stack on MSVC on 32 bit
  configure: indentation cosmetics

Conflicts:
	configure

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-12 11:46:47 +02:00
Michael Niedermayer 1fc3e8f4ea ffserver: fix unsafe snprintf() return usage.
Found-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-09 14:10:11 +02:00
Michael Niedermayer 9c6af3a3db ffserver: increase buffer size in http_send_too_busy_reply()
also add a assert0 to make sure the data is not truncated (which
should be impossible now)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-09 14:09:59 +02:00
Michael Niedermayer d40c0e4a67 ffserver: fix order of evaluation bugs
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-08 23:56:26 +02:00
Michael Niedermayer bb3ed3bae6 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  fate: Add FATE tests for the Ut Video encoder
  lavc: add Ut Video encoder
  mpegvideo_enc: remove stray duplicate line from 7f9aaa4
  swscale: x86: fix #endif comments in rgb2rgb template file
  avconv: mark more options as expert.
  avconv: split printing "main options" into global and per-file.
  avconv: refactor help printing.

Conflicts:
	Changelog
	ffmpeg_opt.c
	ffserver.c
	libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-20 17:31:55 +02:00
Michael Niedermayer aee51039ee Merge commit 'f8b1e665539010d3ca148f09cb1203c20c1ca174'
* commit 'f8b1e665539010d3ca148f09cb1203c20c1ca174':
  avconv: print info/capabilities options in a separate help group.
  avtools: add -h demuxer/muxer
  cmdutils: extend -h to allow printing codec details.

Conflicts:
	cmdutils.h
	ffmpeg_filter.c
	ffmpeg_opt.c
	ffplay.c
	ffserver.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-20 17:06:50 +02:00
Michael Niedermayer 67a6dac7c1 Merge commit '7c5012127fb7e18f0616011257bb4248f6a8b608'
* commit '7c5012127fb7e18f0616011257bb4248f6a8b608':
  cmdutils: change semantics of show_help_options() and document it.
  avtools: move some newlines to show_help_options().
  avconv: deprecate -isync.

Conflicts:
	ffmpeg_opt.c
	ffserver.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-20 16:55:08 +02:00
Michael Niedermayer 927022a753 Merge commit 'd3810c47fe8c9509c28c65c0244e743c1d353daf'
* commit 'd3810c47fe8c9509c28c65c0244e743c1d353daf':
  avconv: get rid of ugly casts in the options table.
  avconv: try to match codecs by codec descriptor name as a last resort.
  avtools: fix show_foo() signatures.

Conflicts:
	cmdutils.c
	cmdutils.h
	cmdutils_common_opts.h
	ffmpeg_opt.c
	ffplay.c
	ffprobe.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-20 15:48:21 +02:00
Michael Niedermayer 7a72695c05 Merge commit '36ef5369ee9b336febc2c270f8718cec4476cb85'
* commit '36ef5369ee9b336febc2c270f8718cec4476cb85':
  Replace all CODEC_ID_* with AV_CODEC_ID_*
  lavc: add AV prefix to codec ids.

Conflicts:
	doc/APIchanges
	doc/examples/decoding_encoding.c
	doc/examples/muxing.c
	ffmpeg.c
	ffprobe.c
	ffserver.c
	libavcodec/8svx.c
	libavcodec/avcodec.h
	libavcodec/dnxhd_parser.c
	libavcodec/dvdsubdec.c
	libavcodec/error_resilience.c
	libavcodec/h263dec.c
	libavcodec/libvorbisenc.c
	libavcodec/mjpeg_parser.c
	libavcodec/mjpegenc.c
	libavcodec/mpeg12.c
	libavcodec/mpeg4videodec.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c
	libavcodec/pcm.c
	libavcodec/r210dec.c
	libavcodec/utils.c
	libavcodec/v210dec.c
	libavcodec/version.h
	libavdevice/alsa-audio-dec.c
	libavdevice/bktr.c
	libavdevice/v4l2.c
	libavformat/asfdec.c
	libavformat/asfenc.c
	libavformat/avformat.h
	libavformat/avidec.c
	libavformat/caf.c
	libavformat/electronicarts.c
	libavformat/flacdec.c
	libavformat/flvdec.c
	libavformat/flvenc.c
	libavformat/framecrcenc.c
	libavformat/img2.c
	libavformat/img2dec.c
	libavformat/img2enc.c
	libavformat/ipmovie.c
	libavformat/isom.c
	libavformat/matroska.c
	libavformat/matroskadec.c
	libavformat/matroskaenc.c
	libavformat/mov.c
	libavformat/movenc.c
	libavformat/mp3dec.c
	libavformat/mpeg.c
	libavformat/mpegts.c
	libavformat/mxf.c
	libavformat/mxfdec.c
	libavformat/mxfenc.c
	libavformat/nsvdec.c
	libavformat/nut.c
	libavformat/oggenc.c
	libavformat/pmpdec.c
	libavformat/rawdec.c
	libavformat/rawenc.c
	libavformat/riff.c
	libavformat/sdp.c
	libavformat/utils.c
	libavformat/vocenc.c
	libavformat/wtv.c
	libavformat/xmv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-07 22:45:46 +02:00
Michael Niedermayer 4da42ebe44 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  MS Screen 1 decoder
  aacdec: Fix popping channel layouts.
  av_gettime: support Win32 without gettimeofday()
  Use av_gettime() in various places
  Move av_gettime() to libavutil
  dct-test: use emms_c() from libavutil instead of duplicating it
  mov: fix operator precedence bug
  mathematics.h: remove a couple of math defines
  Remove unnecessary inclusions of [sys/]time.h
  lavf: remove unnecessary inclusions of unistd.h
  bfin: libswscale: add const where appropriate to fix warnings
  bfin: libswscale: remove unnecessary #includes
  udp: Properly check for invalid sockets
  tcp: Check the return value from getsockopt
  network: Use av_strerror for getting error messages
  udp: Properly print error from getnameinfo
  mmst: Use AVUNERROR() to convert error codes to the right range for strerror
  network: Pass pointers of the right type to get/setsockopt/ioctlsocket on windows
  rtmp: Reduce the number of idle posts sent by sleeping 50ms

Conflicts:
	Changelog
	configure
	libavcodec/aacdec.c
	libavcodec/allcodecs.c
	libavcodec/avcodec.h
	libavcodec/dct-test.c
	libavcodec/version.h
	libavformat/riff.c
	libavformat/udp.c
	libavutil/Makefile
	libswscale/bfin/yuv2rgb_bfin.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-20 20:47:46 +02:00
Michael Niedermayer 715c8a5a50 Merge remote-tracking branch 'qatar/master'
* qatar/master: (28 commits)
  dfa: use more meaningful return codes
  eatgv: check vector_bits
  eatgv: check motion vectors
  Mark a number of variables only used in av_dlog() calls as av_unused.
  dvdec: drop const qualifier from variable to eliminate a warning
  avcodec: Improve comment for thread_safe_callbacks to avoid misinterpretation.
  tests/utils: don't ignore the return value of fwrite()
  lavfi/formats: use sizeof(var) instead of sizeof(type).
  lavfi: remove avfilter_default_config_input_link() declaration
  lavfi: always enable the scale filter and depend on sws.
  vf_split: support user-specifiable number of outputs.
  avconv: remove stray useless comment.
  mpegmux: add stuffing to avoid incomplete PCM frames
  rtsp: avoid const warnings from strtol() call
  avserver: check return value of ftruncate()
  lagarith: make offset array type unsigned
  dfa: add some checks to ensure that decoder won't write past frame end
  aacps: NEON optimisations
  aacps: align some arrays
  aacps: move some loops to function pointers
  ...

Conflicts:
	configure
	doc/filters.texi
	libavcodec/dfa.c
	libavcodec/eatgv.c
	libavfilter/Makefile
	libavfilter/allfilters.c
	libavfilter/avfilter.h
	libavfilter/formats.c
	libavfilter/vf_split.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-06 21:53:19 +02:00
Michael Niedermayer d40ff29cac Merge remote-tracking branch 'qatar/master'
* qatar/master:
  asf: only set index_read if the index contained entries.
  cabac: add overread protection to BRANCHLESS_GET_CABAC().
  cabac: increment jump locations by one in callers of BRANCHLESS_GET_CABAC().
  cabac: remove unused argument from BRANCHLESS_GET_CABAC_UPDATE().
  cabac: use struct+offset instead of memory operand in BRANCHLESS_GET_CABAC().
  h264: add overread protection to get_cabac_bypass_sign_x86().
  h264: reindent get_cabac_bypass_sign_x86().
  h264: use struct offsets in get_cabac_bypass_sign_x86().
  h264: fix overreads in cabac reader.
  wmall: fix seeking.
  lagarith: fix buffer overreads.
  dvdec: drop unnecessary dv_tablegen.h #include
  build: fix doc generation errors in parallel builds
  Replace memset(0) by zero initializations.
  faandct: Remove FAAN_POSTSCALE define and related code.
  dvenc: print allowed profiles if the video doesn't conform to any of them.
  avcodec_encode_{audio,video}: only reallocate output packet when it has non-zero size.
  FATE: add a test for vp8 with changing frame size.
  fate: add kgv1 fate test.
  oggdec: calculate correct timestamps in Ogg/FLAC

Conflicts:
	libavcodec/4xm.c
	libavcodec/cook.c
	libavcodec/dvdata.c
	libavcodec/dvdsubdec.c
	libavcodec/lagarith.c
	libavcodec/lagarithrac.c
	libavcodec/utils.c
	tests/fate/video.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-29 04:11:10 +02:00
Miroslav Slugeň 00969376ce ffserver: add missing buffer set after rewrite av_open_input_file to avformat_open_input.
Fixes Ticket346

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-12 03:31:59 +01:00
Michael Niedermayer 9fcc62ed9b Revert "ffserver: remove unused variable."
This reverts commit f02f745e4a.
2012-03-12 03:31:59 +01:00
Michael Niedermayer 184fc600e1 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mpegvideo_enc: only allocate output packet when we know there will be output
  Add names for more channel layouts to the channel layout map.
  sunrast: Add a sample request for RMP_RAW colormap.
  avcodec: do not override pts or duration from the audio encoder
  Add prores regression test.
  Enable already existing rso regression test.
  Add regression test for "sox" format muxer/demuxer.
  Add dpx encoding regression test.
  swscale: K&R formatting cosmetics for PowerPC code (part I/II)
  img2: Use ff_guess_image2_codec(filename) shorthand where appropriate.
  Clarify licensing information about files borrowed from libjpeg.
  Mark mutable static data const where appropriate.
  avplay: fix -threads option
  dvbsubdec: avoid undefined signed left shift in RGBA macro
  mlpdec: use av_log_ask_for_sample()
  gif: K&R formatting cosmetics
  png: make .long_name more descriptive
  movdec: Adjust keyframe flagging in fragmented files
  rv34: change most "int stride" into "ptrdiff_t stride".

Conflicts:
	avprobe.c
	ffplay.c
	libavcodec/mlpdec.c
	libavcodec/mpegvideo_enc.c
	libavcodec/pngenc.c
	libavcodec/x86/v210-init.c
	libavfilter/vf_boxblur.c
	libavfilter/vf_crop.c
	libavfilter/vf_drawtext.c
	libavfilter/vf_lut.c
	libavfilter/vf_overlay.c
	libavfilter/vf_pad.c
	libavfilter/vf_scale.c
	libavfilter/vf_select.c
	libavfilter/vf_setpts.c
	libavfilter/vf_settb.c
	libavformat/img2.c
	libavutil/audioconvert.c
	tests/codec-regression.sh
	tests/lavf-regression.sh
	tests/ref/lavf/dpx
	tests/ref/vsynth1/prores
	tests/ref/vsynth2/prores

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-22 02:24:18 +01:00
Paul B Mahol 0b717e24f9 ffserver: use avcodec_get_context_defaults3()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-07 05:51:31 +01:00
Michael Niedermayer 9430c232e8 ffserver: fix program reference
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-01 19:33:51 +01:00
Michael Niedermayer feb997577b Merge remote-tracking branch 'qatar/master'
* qatar/master: (25 commits)
  riff: fix invalid av_freep() calls on EOF in ff_read_riff_info
  pam: Fix a typo that broke writing and reading PAM files.
  mxfdec: fix memleak on av_realloc failures
  mxfdec: Do not parse slices or DeltaEntryArrays.
  mxfdec: hybrid demuxing/seeking solution
  mxfdec: Add Avid's essence element key.
  mfxdec: Separate mxf_essence_container_uls for audio and video.
  mxfdec: Compute packet offsets properly.
  mxfdec: Use MaterialPackage - Track - TrackID instead of the system_item hack.
  mxfdec: use av_dlog() for 'no corresponding source package found'
  mxfdec: Make mxf->partitions sorted by offset.
  mxfdec: parse ThisPartition
  mxfdec: Speed up metadata and index parsing.
  mxfdec: Make sure DataDefinition is consistent between material track and source track.
  mxfdec: add EssenceContainer UL found in 0001GL00.MXF.A1.mxf_opatom.mxf
  mxfdec: Add hack that adjusts the n_delta calculation when system items are present.
  mxfdec: Parse IndexTableSegments and convert them into AVIndexEntry arrays.
  mxfdec: Move FooterPartition to MXFContext and make sure it is never zero.
  mxfdec: check return value of avio_seek
  mxfdec: skip to end of structural sets
  ...

Conflicts:
	configure
	libavcodec/pnm.c
	libavformat/mxfdec.c
	libavformat/riff.c
	libavformat/rtsp.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-23 01:05:20 +01:00
Michael Niedermayer b5a69e79c5 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtpdec: Use our own SSRC in the SDES field when sending RRs
  Finalize changelog for 0.8 Release
  Prepare for 0.8 Release
  threads: change the default for threads back to 1
  threads: update slice_count and slice_offset from user context
  aviocat: Remove useless includes
  doc/APIChanges: fill in missing dates and hashes
  Revert "avserver: fix build after the next bump."
  mpegaudiodec: switch error detection check to AV_EF_BUFFER
  lavf: rename fer option and document resulting (f_)err_detect options
  lavc: rename err_filter option to err_detect and document it
  mpegvideo: fix invalid memory access for small video dimensions
  movenc: Reorder entries in the MOVIentry struct, for tigheter packing
  rtsp: Remove extern declarations for variables that don't exist
  aviocat: Flush the output before closing

Conflicts:
	Changelog
	RELEASE
	libavcodec/mpegaudiodec.c
	libavcodec/pthread.c
	libavformat/options.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-21 23:11:27 +01:00
Michael Niedermayer 8f0768cc22 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Add a tool that uses avio to read and write, doing a plain copy of data
  ARM: fix build with FFT enabled and MDCT disabled
  lavf: force single-threaded decoding in avformat_find_stream_info
  avidec: migrate last of lavf from FF_ER_* to AV_EF_*
  avserver: fix build after the next bump.

Conflicts:
	libavformat/Makefile
	libavformat/avidec.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-21 01:33:31 +01:00
Michael Niedermayer b18e17eabf Merge remote-tracking branch 'qatar/master'
* qatar/master: (21 commits)
  utils: Check for extradata size overflows.
  ARM: rv34: fix asm syntax in dc transform functions
  avio: Fix the value of the deprecated URL_FLAG_NONBLOCK
  rv34: fix and optimise frame dependency checking
  rv34: NEON optimised dc only inverse transform
  avprobe: use avio_size() instead of deprecated AVFormatContext.file_size.
  ffmenc: remove references to deprecated AVFormatContext.timestamp.
  lavf: undeprecate read_seek().
  avserver: remove code using deprecated CODEC_CAP_PARSE_ONLY.
  lavc: replace some remaining FF_I_TYPE with AV_PICTURE_TYPE_I
  lavc: ifdef out parse_only AVOption
  nellymoserdec: SAMPLE_FMT -> AV_SAMPLE_FMT
  mpegvideo_enc: ifdef out/replace references to deprecated codec flags.
  riff: remove references to sonic codec ids
  indeo4: add some missing static and const qualifiers
  rv34: DC-only inverse transform
  avconv: use AVFrame.width/height/format instead of corresponding AVCodecContext fields
  lavfi: move version macros to a new installed header version.h
  vsrc_buffer: release the buffer on uninit.
  rgb2rgb: rgb12tobgr12()
  ...

Conflicts:
	avconv.c
	doc/APIchanges
	ffprobe.c
	libavfilter/Makefile
	libavfilter/avfilter.h
	libswscale/rgb2rgb.c
	libswscale/rgb2rgb.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-13 01:29:48 +01:00
Michael Niedermayer fc5a905a6d ffserver: check chdir() return
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-08 00:18:36 +01:00
Stefano Sabatini 93613338fe ff* tools: move descriptions from copyright header to @file doxy 2011-12-27 12:58:08 +01:00
Michael Niedermayer 452406bd5b ff*: Fix duplicatedly printed version info with -version
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-20 22:23:12 +01:00
Michael Niedermayer 8bc7fe4daf Merge remote-tracking branch 'qatar/master'
* qatar/master:
  doxygen: misc consistency, spelling and wording fixes
  vcr1: drop unnecessary emms_c() calls without MMX code
  Replace all uses of av_close_input_file() with avformat_close_input().
  lavf: add avformat_close_input().
  lavf: deprecate av_close_input_stream().
  lavf doxy: add some basic demuxing documentation.
  lavf doxy: add some general lavf information.
  lavf doxy: add misc utility functions to a group.
  lavf doxy: add av_guess_codec/format to the encoding group.
  lavf doxy: add core functions to a doxy group.
  Add basic libavdevice documentation.
  lavc: convert error_recognition to err_recognition.
  avconv: update -map option help text
  x86: Require 7 registers for the cabac asm
  x86: bswap: remove test for bswap instruction
  bswap: make generic implementation more compiler-friendly
  h264: remove useless cast
  proresdec: fix decode_slice() prototype

Conflicts:
	configure
	doc/APIchanges
	ffprobe.c
	libavcodec/avcodec.h
	libavcodec/celp_math.h
	libavcodec/h264.c
	libavfilter/src_movie.c
	libavformat/anm.c
	libavformat/avformat.h
	libavformat/version.h
	libavutil/avstring.h
	libavutil/bswap.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-13 00:39:48 +01:00
Michael Niedermayer 7fad19a63d Merge remote-tracking branch 'qatar/master'
* qatar/master:
  x86: cabac: replace explicit memory references with "m" operands
  avplay: don't request a stereo downmix
  wmapro: use av_float2int()
  lavc: avoid invalid memcpy() in avcodec_default_release_buffer()
  lavu: replace int/float punning functions
  lavfi: install libavfilter/vsrc_buffer.h
  Remove extraneous semicolons
  sdp: Restore the original mp4 format h264 extradata if converted
  rtpenc: Add support for mp4 format h264
  rtpenc: Simplify code by introducing a separate end pointer
  movenc: Use the actual converted sample for RTP hinting
  Fix a bunch of common typos.

Conflicts:
	doc/developer.texi
	doc/eval.texi
	doc/filters.texi
	doc/protocols.texi
	ffmpeg.c
	ffplay.c
	libavcodec/mpegvideo.h
	libavcodec/x86/cabac.h
	libavfilter/Makefile
	libavformat/avformat.h
	libavformat/cafdec.c
	libavformat/flvdec.c
	libavformat/flvenc.c
	libavformat/gxfenc.c
	libavformat/img2.c
	libavformat/movenc.c
	libavformat/mpegts.c
	libavformat/rtpenc_h264.c
	libavformat/utils.c
	libavformat/wtv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-12 01:25:37 +01:00
Michael Niedermayer db29da9ac8 ffserver: use av_noreturn
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-11 04:25:53 +01:00
Michael Niedermayer 13b7781ec8 Merge remote-tracking branch 'qatar/master'
* qatar/master: (23 commits)
  x86inc: use sse versions of common macros instead of sse2 when applicable
  doc/APIchanges: add missing dates and hashes
  lavf: don't return from void av_update_cur_dts()
  Changelog: add more entries.
  Changelog: update ffmpeg/avconv incompatibility list.
  avconv: remove some redundant temporary variables.
  avconv: fix broken indentation
  avconv: move copy_initial_nonkeyframes to the options context.
  avconv: use file:stream instead of file.stream in log messages.
  doc/avconv: elaborate on basic functionality.
  doc/avconv: -sample_fmts, not -help sample_fmts prints the sample formats
  openssl: Only use CRYPTO_set_id_callback on OpenSSL < 1.0.0
  Call avformat_network_init/deinit in the programs
  Remove leftover includes of strings.h
  avutil: Don't allow using strcasecmp/strncasecmp
  Replace all usage of strcasecmp/strncasecmp
  avstring: Add locale independent implementations of strcasecmp/strncasecmp
  avstring: Add locale independent implementations of toupper/tolower
  cosmetics: insert some spaces in explicit enum value assignments
  move 8SVX audio codecs to the audio codec list part on the next bump
  ...

Conflicts:
	avprobe.c
	doc/APIchanges
	ffplay.c
	ffserver.c
	libavcodec/avcodec.h
	libavdevice/bktr.c
	libavdevice/v4l.c
	libavdevice/v4l2.c
	libavformat/matroskaenc.c
	libavformat/wtv.c
	libavutil/avstring.c
	libavutil/avstring.h
	libavutil/avutil.h
	libswscale/x86/swscale_template.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-07 03:01:43 +01:00
Michael Niedermayer d0492578c8 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  presets: rename presets directory
  lavc: make avcodec_get_context_defaults3 "officially" public
  lavf: replace av_new_stream->avformat_new_stream part II.
  lavf,lavd: replace av_new_stream->avformat_new_stream part I.
  lavf: add avformat_new_stream as a replacement for av_new_stream.
  Use correct scaling table for bwd-pred MVs in second B-field
  Ut Video decoder
  Makefile: change presets extension to .avpreset
  lavfi: add rgbtestsrc source, ported from MPlayer libmpcodecs
  lavfi: add testsrc source
  AVOptions: add documentation.
  presets: update libx264 ffpresets

Conflicts:
	Changelog
	doc/APIchanges
	doc/ffmpeg.texi
	ffpresets/libx264-ipod320.ffpreset
	ffpresets/libx264-ipod640.ffpreset
	ffserver.c
	libavcodec/avcodec.h
	libavcodec/options.c
	libavcodec/version.h
	libavdevice/libdc1394.c
	libavfilter/avfilter.h
	libavfilter/vsrc_testsrc.c
	libavformat/flvdec.c
	libavformat/riff.c
	libavformat/version.h
	libavformat/wtv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-20 02:34:51 +02:00
Michael Niedermayer f884ef00de Merge remote-tracking branch 'qatar/master'
* qatar/master: (31 commits)
  tiffenc: initialize forgotten avctx.
  avplay: free the active audio packet at exit.
  avplay: free rdft data used for spectrogram analysis.
  log.h: make AVClass a named struct
  fix ac3 encoder documentation
  vc1: more prettyprinting cosmetics
  vc1: prettyprint some tables
  vc1: K&R formatting cosmetics
  AVOptions: bump minor and add APIchanges entry.
  cmdutils/avtools: simplify show_help() by using av_opt_child_class_next()
  AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_*
  Remove all uses of deprecated AVOptions API.
  AVOptions: add av_opt_next, deprecate av_next_option.
  AVOptions: add functions for evaluating option strings.
  AVOptions: split get_number().
  AVOptions: add av_opt_get*, deprecate av_get*.
  AVOptions: add av_opt_set*().
  AVOptions: add new API for enumerating children.
  rv34: move inverse transform functions to DSP context
  flvenc: Write the right metadata entry count
  ...

Conflicts:
	avconv.c
	cmdutils.c
	doc/APIchanges
	ffplay.c
	ffprobe.c
	libavcodec/ac3dec.c
	libavcodec/h264.c
	libavcodec/libvpxenc.c
	libavcodec/libx264.c
	libavcodec/mpeg12enc.c
	libavcodec/options.c
	libavdevice/libdc1394.c
	libavdevice/v4l2.c
	libavfilter/vf_drawtext.c
	libavformat/flvdec.c
	libavformat/mpegtsenc.c
	libavformat/options.c
	libavutil/avutil.h
	libavutil/opt.c
	libswscale/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-13 06:00:03 +02:00
Michael Niedermayer ef74ab20c2 Merge remote-tracking branch 'qatar/master'
* qatar/master: (34 commits)
  dpcm: return error if packet is too small
  dpcm: use smaller data types for static tables
  dpcm: use sol_table_16 directly instead of through the DPCMContext.
  dpcm: replace short with int16_t
  dpcm: check to make sure channels is 1 or 2.
  dpcm: misc pretty-printing
  dpcm: remove unnecessary variable by using bytestream functions.
  dpcm: move codec-specific variable declarations to their corresponding decoding blocks.
  dpcm: consistently use the variable name 'n' for the next input byte.
  dpcm: output AV_SAMPLE_FMT_U8 for Sol DPCM subcodecs 1 and 2.
  dpcm: calculate and check actual output data size prior to decoding.
  dpcm: factor out the stereo flag calculation
  dpcm: cosmetics: rename channel_number to ch
  avserver: Fix a bug where the socket is IPv4, but IPv6 is autoselected for the loopback address.
  lavf: Avoid using av_malloc(0) in av_dump_format
  dxva2_h264: pass the correct 8x8 scaling lists
  dca: NEON optimised high freq VQ decoding
  avcodec: reject audio packets with NULL data and non-zero size
  dxva: Add ability to enable workaround for older ATI cards
  latmenc: Set latmBufferFullness to largest value to indicate it is not used
  ...

Conflicts:
	libavcodec/dxva2_h264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-01 02:54:46 +02:00
Michael Niedermayer 7c1aba4f01 Merge remote-tracking branch 'qatar/master'
* qatar/master: (21 commits)
  fate: allow testing with libavfilter disabled
  x86: XOP/FMA4 CPU detection support
  ws_snd: misc cosmetic clean-ups
  ws_snd: remove the 2-bit ADPCM table and just subtract 2 instead.
  ws_snd: use memcpy() and memset() instead of loops
  ws_snd: use samples pointer for loop termination instead of a separate iterator variable.
  ws_snd: make sure number of channels is 1
  ws_snd: add some checks to prevent buffer overread or overwrite.
  ws_snd: decode to AV_SAMPLE_FMT_U8 instead of S16.
  flacdec: fix buffer size checking in get_metadata_size()
  rtp: Simplify ff_rtp_get_payload_type
  rtpenc: Add a payload type private option
  rtp: Correct ff_rtp_get_payload_type documentation
  avconv: replace all fprintf() by av_log().
  avconv: change av_log verbosity from ERROR to FATAL for fatal errors.
  cmdutils: replace fprintf() by av_log()
  avtools: parse loglevel before all the other options.
  oggdec: add support for Xiph's CELT codec
  sol: return error if av_get_packet() fails.
  cosmetics: reindent and pretty-print
  ...

Conflicts:
	avconv.c
	cmdutils.c
	libavcodec/avcodec.h
	libavcodec/version.h
	libavformat/oggparsecelt.c
	libavformat/utils.c
	libavutil/avutil.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-27 02:14:37 +02:00
Michael Niedermayer d2084402e6 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  lavc: fix type for thread_type option
  avconv: move format to options context
  avconv: move limit_filesize to options context
  avconv: move start_time, recording_time and input_ts_offset to options context
  avconv: add a context for options.
  cmdutils: allow storing per-stream/chapter/.... options in a generic way
  cmdutils: split per-option code out of parse_options().
  cmdutils: add support for caller-provided option context.
  cmdutils: declare only one pointer type in OptionDef
  cmdutils: move grow_array() from avconv to cmdutils.
  cmdutils: move exit_program() declaration to cmdutils from avconv
  http: Consider the stream as seekable if the reply contains Accept-Ranges: bytes
  nutenc: add namespace to the api facing functions

Conflicts:
	avconv.c
	cmdutils.c
	cmdutils.h
	ffmpeg.c
	ffplay.c
	ffprobe.c
	ffserver.c
	libavformat/http.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-05 03:10:45 +02:00
Michael Niedermayer 094a496818 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  fifo: add FIFO API test program, and fate test
  fifo: add av_fifo_peek2(), and deprecate av_fifo_peek()
  postprocess.c: filter name needs to be double 0 terminated
  doxygen: fix wrong comment syntax, //< vs. ///<
  doxygen: drop pointless star from pointer variable names
  Replace deprecated av_find_stream_info() by avformat_find_stream_info().
  xmv: eliminate superfluous zeroing of zero data
  configure: fix typo in avconv dependency list

Conflicts:
	configure
	doc/APIchanges
	libavutil/Makefile
	libavutil/avutil.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-26 23:18:54 +02:00
Anton Khirnov 4d58e4cb4c Rename ffserver to avserver. 2011-08-09 19:56:25 +02:00
Michael Niedermayer 042f9d62ca Merge remote-tracking branch 'qatar/master'
* qatar/master:
  configure: Automatically add more flags required on symbian
  mem.h: switch doxygen parameter order to match function prototype
  doxygen: replace @sa tag by the more readable but equivalent @see
  doxygen: use Doxygen markup for authors and web links where appropriate
  doxygen: do not include license boilerplate in Doxygen documentation
  ac3enc: Mark AVClasses const
  ffserver: Replace two loops with one loop.
  ffmpeg: Fix the check for experimental codecs
  swscale: extend mmx padding.
  swscale: clip unscaled colorspace conversion path.
  doxygen: misc consistency cosmetics
  doc: remove file name from @file directive in Doxygen usage example
  doxygen: consistently place brief description
  doxygen: place empty line between brief description and detailed description
  avformat_open_input(): Add braces to shut up gcc warning.

Conflicts:
	libavcodec/8svx.c
	libavcodec/tiff.c
	libavcodec/tiff.h
	libavcodec/vaapi_h264.c
	libavcodec/vorbis.c
	libavcodec/vorbisdec.c
	libavcodec/vp6.c
	libswscale/swscale_unscaled.c
	libswscale/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-15 17:51:09 +02:00
Mike Williams 863e2046fd ffserver: Replace two loops with one loop.
Signed-off-by: Mike Williams <mike@mikebwilliams.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-07-14 14:00:07 -07:00
Michael Niedermayer 80e4fe4063 Merge commit 'b5849f77095439e994b11c25e6063d443b36c228'
* commit 'b5849f77095439e994b11c25e6063d443b36c228': (21 commits)
  ac3enc: merge AC3MDCTContext with AC3EncodeContext.
  ac3enc: prefer passing AC3EncodeContext rather than AVCodecContext
  ac3enc: fix memleak
  mpeg1video: add CODEC_CAP_SLICE_THREADS.
  lavf: fix segfault in av_open_input_stream()
  mpegtsenc: set Random Access indicator on keyframe start packets
  lavf: Cleanup try_decode_frame() logic.
  Replace some gotos that lead to single return statements by direct return.
  build: move tests/seek_test.c to libavformat and reuse generic build rules
  mxfenc: include needed header for ff_iso8601_to_unix_time() prototype
  Add a check for strptime().
  lavf: factor out conversion of ISO8601 string to unix time
  wav: parse 'bext' metadata
  wav: keep parsing until EOF if the input is seekable and we know the size of the data tag
  wav: Refactor the tag checking into a switch statement
  wav: make sure neither data_size nor sample_count is negative.
  wav: refactor the 'fmt ' tag search and parsing.
  wav: add an option for writing BEXT chunk
  ffmpeg: get rid of a pointless limit on number of streams.
  ffmpeg: remove an unused define.
  ...

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-14 02:24:10 +02:00
Diego Biurrun 71a1d1116f Replace some gotos that lead to single return statements by direct return. 2011-07-13 17:53:49 +02:00
Michael Niedermayer 3602ad7ee6 Merge commit '142e76f1055de5dde44696e71a5f63f2cb11dedf'
* commit '142e76f1055de5dde44696e71a5f63f2cb11dedf':
  swscale: fix crash with dithering due incorrect offset calculation.
  matroskadec: fix stupid typo (!= -> ==)
  build: remove duplicates from order-only directory prerequisite list
  build: rework rules for things in the tools dir
  configure: fix --cpu=host with gcc 4.6
  ARM: use const macro to define constant data in asm
  bitdepth: simplify FUNC/FUNCC macros
  dsputil: remove ff_emulated_edge_mc macro used in one place
  9/10-bit: simplify clipping macros
  matroskadec: reindent
  matroskadec: defer parsing of cues element until we seek.
  lavc: add support for codec-specific defaults.
  lavc: make avcodec_alloc_context3 officially public.
  lavc: remove a half-working attempt at different defaults for audio/video codecs.
  ac3dec: add a drc_scale private option
  lavf: add avformat_find_stream_info()
  lavc: introduce avcodec_open2() as a replacement for avcodec_open().

Conflicts:
	Makefile
	libavcodec/utils.c
	libavformat/avformat.h
	libswscale/swscale_internal.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-11 04:23:25 +02:00
Anton Khirnov 71a861cf40 lavc: make avcodec_alloc_context3 officially public.
Deprecate avcodec_alloc_context/2.
2011-07-10 17:09:28 +02:00
Anton Khirnov 0b950fe240 lavc: introduce avcodec_open2() as a replacement for avcodec_open().
Adds support for decoder-private options and makes setting other options
simpler.
2011-07-10 17:06:22 +02:00
Michael Niedermayer c3b6cc61e5 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  ffserver: remove unused variable.
  Remove unused and outdated TODO file.
  gitignore: Drop individual .d ignore; it is already covered by a wildcard.
  lavf: deprecate AVStream.quality.
  bink: pass Bink version to audio decoder through extradata instead of codec_tag.
  libpostproc: Remove disabled code.
  flashsv: improve some comments and fix some wrong ones
  flashsv: Eliminate redundant variable indirection.
  flashsv: set reference frame type to full frame
  flashsv: replace bitstream description by a link to the specification
  flashsv: convert a debug av_log into av_dlog
  flashsv: simplify condition
  flashsv: return more meaningful error values
  flashsv: cosmetics: break some overly long lines
  flashsv: cosmetics: drop some unnecessary parentheses
  swscale: amend documentation to mention use of native depth for scaling.
  eval: add missing comma to tests.
  eval: fix memleak.
  H.264: make loopfilter bS const where applicable

Conflicts:
	libavcodec/binkaudio.c
	libavformat/bink.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-06 23:57:11 +02:00
Chris Wilson f02f745e4a ffserver: remove unused variable.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-07-06 22:41:15 +02:00
Michael Niedermayer 976a8b2179 Merge remote-tracking branch 'qatar/master'
* qatar/master: (40 commits)
  H.264: template left MB handling
  H.264: faster fill_decode_caches
  H.264: faster write_back_*
  H.264: faster fill_filter_caches
  H.264: make filter_mb_fast support the case of unavailable top mb
  Do not include log.h in avutil.h
  Do not include pixfmt.h in avutil.h
  Do not include rational.h in avutil.h
  Do not include mathematics.h in avutil.h
  Do not include intfloat_readwrite.h in avutil.h
  Remove return statements following infinite loops without break
  RTSP: Doxygen comment cleanup
  doxygen: Escape '\' in Doxygen documentation.
  md5: cosmetics
  md5: use AV_WL32 to write result
  md5: add fate test
  md5: include correct headers
  md5: fix test program
  doxygen: Drop array size declarations from Doxygen parameter names.
  doxygen: Fix parameter names to match the function prototypes.
  ...

Conflicts:
	libavcodec/x86/dsputil_mmx.c
	libavformat/flvenc.c
	libavformat/oggenc.c
	libavformat/wtv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-04 00:45:21 +02:00
Mans Rullgard 0ebcdf5cda Do not include mathematics.h in avutil.h
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-03 21:42:06 +01:00
Jeff Downs a09918335f Make all option parsing functions match the function pointer type through which they are called.
All option parsing functions now match the function pointer signature through
which they are called (int f(const char *, const char *), thereby working
reliably on all platforms.
Prefix all option processing functions with opt_
2011-06-30 11:49:48 -04:00
Michael Niedermayer 2905e3ff64 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  lavc: add opt_find to AVCodecContext class.
  h264: Complexify frame num gap shortening code
  intreadwrite.h: fix AV_RL32/AV_RB32 signedness.
  Fix decoding of mpegts streams with h264 video that does *NOT* have b frames
  Add minor bumps and APIChanges entries for lavf private options.
  ffmpeg: deprecate -vc and -tvstd
  ffmpeg: use new avformat_open_* API.
  ffserver: use new avformat_open_* API.
  ffprobe: use new avformat_open_* API.
  ffplay: use new avformat_open_* API.
  cmdutils: add opt_default2().
  dict: add AV_DICT_APPEND flag.
  lavf: add avformat_write_header() as a replacement for av_write_header().
  Deprecate av_open_input_* and remove their uses.
  lavf: add avformat_open_input() as a replacement for av_open_input_*
  AVOptions: add av_opt_find() as a replacement for av_find_opt.
  AVOptions: add av_opt_set_dict() mapping a dictionary struct to a context.
  ffmpeg: don't abuse a global for passing frame size from input to output
  ffmpeg: don't abuse a global for passing pixel format from input to output
  ffmpeg: initialise encoders earlier.

Conflicts:
	cmdutils.c
	doc/APIchanges
	ffmpeg.c
	ffplay.c
	ffprobe.c
	libavcodec/h264.c
	libavformat/avformat.h
	libavformat/utils.c
	libavformat/version.h
	libavutil/avutil.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-18 05:10:38 +02:00
Anton Khirnov 50f2dfad67 ffserver: use new avformat_open_* API. 2011-06-16 20:24:57 +02:00
Anton Khirnov dc59ec5e79 AVOptions: add av_opt_find() as a replacement for av_find_opt. 2011-06-16 20:24:56 +02:00
Michael Niedermayer f9ecb849ef Merge remote-tracking branch 'qatar/master'
* qatar/master:
  crypto: Use av_freep instead of av_free
  lavf: don't try to free private options if priv_data is NULL.
  swscale: fix types of assembly arguments.
  swscale: move two macros that are only used once into caller.
  swscale: remove unused function.
  options: Add missing braces around struct initializer.
  mov: Remove leftover crufty debug statement with references to a local file.
  dvbsubdec: Fix compilation of debug code.
  Remove all uses of now deprecated metadata functions.
  Move metadata API from lavf to lavu.

Conflicts:
	doc/APIchanges
	libavformat/aiffdec.c
	libavformat/asfdec.c
	libavformat/avformat.h
	libavformat/avidec.c
	libavformat/cafdec.c
	libavformat/matroskaenc.c
	libavformat/mov.c
	libavformat/mp3enc.c
	libavformat/wtv.c
	libavutil/avutil.h
	libavutil/internal.h
	libswscale/swscale.c
	libswscale/x86/swscale_template.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-09 04:47:19 +02:00
Anton Khirnov d2d67e424f Remove all uses of now deprecated metadata functions. 2011-06-08 07:43:45 +02:00
Michael Niedermayer 99eb31e263 Merge remote-tracking branch 'qatar/master'
* qatar/master: (25 commits)
  Replace custom DEBUG preprocessor trickery by the standard one.
  vorbis: Remove non-compiling debug statement.
  vorbis: Remove pointless DEBUG #ifdef around debug output macros.
  cook: Remove non-compiling debug output.
  Remove pointless #ifdefs around function declarations in a header.
  Replace #ifdef + av_log() combinations by av_dlog().
  Replace custom debug output functions by av_dlog().
  cook: Remove unused debug functions.
  Remove stray extra arguments from av_dlog() invocations.
  targa: fix big-endian build
  v4l2: remove one forgotten use of AVFormatParameters.pix_fmt.
  vfwcap: add a framerate private option.
  v4l2: add a framerate private option.
  libdc1394: add a framerate private option.
  fbdev: add a framerate private option.
  bktr: add a framerate private option.
  oma: check avio_read() return value
  nutdec: remove unused variable
  Remove unused variables
  swscale: allocate larger buffer to handle altivec overreads.
  ...

Conflicts:
	ffmpeg.c
	libavcodec/dca.c
	libavcodec/dirac.c
	libavcodec/error_resilience.c
	libavcodec/h264.c
	libavcodec/mpeg12.c
	libavcodec/mpeg4videodec.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c
	libavcodec/pthread.c
	libavcodec/rv10.c
	libavcodec/s302m.c
	libavcodec/shorten.c
	libavcodec/truemotion2.c
	libavcodec/utils.c
	libavdevice/dv1394.c
	libavdevice/fbdev.c
	libavdevice/libdc1394.c
	libavdevice/v4l2.c
	libavformat/4xm.c
	libavformat/apetag.c
	libavformat/asfdec.c
	libavformat/avidec.c
	libavformat/mmf.c
	libavformat/mpeg.c
	libavformat/mpegenc.c
	libavformat/mpegts.c
	libavformat/oggdec.c
	libavformat/oggparseogm.c
	libavformat/rl2.c
	libavformat/rmdec.c
	libavformat/rpl.c
	libavformat/rtpdec_latm.c
	libavformat/sauce.c
	libavformat/sol.c
	libswscale/utils.c
	tests/ref/vsynth1/error
	tests/ref/vsynth2/error

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-03 05:19:30 +02:00
Diego Biurrun f190f676bc Replace custom DEBUG preprocessor trickery by the standard one. 2011-06-03 00:44:06 +02:00
Michael Niedermayer 027264cb82 Merge remote-tracking branch 'qatar/master'
* qatar/master: (31 commits)
  ARM: add ARMv6 optimised av_clip_uintp2
  ARM: remove volatile from asm statements in libavutil/intmath
  ARM: fix av_clipl_int32_arm()
  v4l: include avdevice.h
  ffserver: move close_connection() call to avoid a temporary string and copy.
  lavf: initialize demuxer private options.
  AVOptions: set string default values.
  lavdevice: mark v4l for removal on next major bump.
  swscale: fix compile on ppc.
  swscale: fix compile on x86-32.
  build: Remove generated .version file on distclean.
  configure: Add -D_GNU_SOURCE to CPPFLAGS on OS/2.
  doc: Drop hint at --enable-memalign-hack for MinGW, it is now autodetected.
  ffplay: Remove disabled code.
  Mark parameterless function declarations as 'void'.
  swscale: use av_clip_uint8() in yuv2yuv1_c().
  swscale: remove VOF/VOFW.
  swscale: split chroma buffers into separate U/V planes.
  swscale: replace formatConvBuffer[VOF] by allocated array.
  rgb2rgb: remove duplicate mmx/mmx2/3dnow/sse2 functions.
  ...

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-27 02:53:21 +02:00
Mike Williams e2d7dc87df ffserver: move close_connection() call to avoid a temporary string and copy.
Signed-off-by: Mike Williams <mike@mikebwilliams.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-26 20:05:48 +02:00
Mike Williams db3262b700 ffserver: Fix a null pointer dereference as a result of the FF_API_MAX_STREAMS cleanup.
Fixed another dereference in the RTSP code.

Removed a useless variable.

Changed an unnecessary looping assignment to a simple assignment suggested by
Maksym.

Added fixes and tweaks suggested by Maksym Veremeyenko [verem@m1stereo.tv] and
Clément B.
2011-05-26 12:57:59 +02:00
Mike William 840238b870 ffserver: dont just crash
With changes from ubitux.
2011-05-21 04:50:59 +02:00
Maksym Veremeyenko ab1c19efc5 fix ffserver's SIGSEGV 2011-05-21 04:39:20 +02:00
Michael Niedermayer 72153419b5 Merge remote branch 'qatar/master'
* qatar/master: (33 commits)
  rtpdec_qdm2: Don't try to parse data packet if no configuration is received
  ac3enc: put the counting of stereo rematrixing bits in the same place to make the code easier to understand.
  ac3enc: clean up count_frame_bits() and count_frame_bits_fixed()
  mpegvideo: make FF_DEBUG_DCT_COEFF output coeffs via av_log() instead of just via AVFrame.
  srtdec: make sure we don't write past the end of buffer
  wmaenc: improve channel count and bitrate error handling in encode_init()
  matroskaenc: make sure we don't produce invalid file with no codec ID
  matroskadec: check that pointers were initialized before accessing them
  lavf: fix function name in compute_pkt_fields2 av_dlog message
  lavf: fix av_find_best_stream when providing a wanted stream.
  lavf: fix av_find_best_stream when decoder_ret is given and using a related stream.
  ffmpeg: factorize quality calculation
  tiff: add support for SamplesPerPixel tag in tiff_decode_tag()
  tiff: Prefer enum TiffCompr over int for TiffContext.compr.
  mov: Support edit list atom version 1.
  configure: Enable libpostproc automatically if GPL code is enabled.
  Cosmetics: fix prototypes in oggdec
  oggdec: fix memleak with continuous streams.
  matroskaenc: add missing new line in av_log() call
  dnxhdenc: add AVClass in private context.
  ...

swscale changes largely rewritten by me or replaced by baptsites due to lots of bugs in ronalds code.
Above code is also just in case its not obvios to a large extended duplicates that where cherry picked
from ffmpeg.

Conflicts:
	configure
	ffmpeg.c
	libavformat/matroskaenc.c
	libavutil/pixfmt.h
	libswscale/ppc/swscale_template.c
	libswscale/swscale.c
	libswscale/swscale_template.c
	libswscale/utils.c
	libswscale/x86/swscale_template.c
	tests/fate/h264.mak
	tests/ref/lavfi/pixdesc_le
	tests/ref/lavfi/pixfmts_copy_le
	tests/ref/lavfi/pixfmts_null_le
	tests/ref/lavfi/pixfmts_scale_le
	tests/ref/lavfi/pixfmts_vflip_le

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-13 04:40:40 +02:00
Diego Biurrun 046f081b46 configure: Do not unconditionally add -D_POSIX_C_SOURCE to CPPFLAGS.
Adding _POSIX_C_SOURCE to CPPFLAGS globally produces all sorts of problems
since it causes certain system functions to be hidden on some (BSD) systems.
The solution is to only add the flag on systems that really require it, i.e.
glibc-based ones.

This change makes BSD systems compile out-of-the-box without the need for
adding specific flags manually.  It also allows dropping a number of flags
set manually on a file-per-file basis, but were only present to work around
breakage introduced by the presence of _POSIX_C_SOURCE.

Also add _XOPEN_SOURCE to CPPFLAGS for glibc systems.  We use XSI extensions
in several places already, so it is preferable to define it globally instead
of littering source files with individual #defines only needed for glibc.
2011-05-12 11:41:59 +02:00
Michael Niedermayer d7e5aebae7 Merge remote branch 'qatar/master'
* qatar/master: (23 commits)
  ac3enc: correct the flipped sign in the ac3_fixed encoder
  Eliminate pointless '#if 1' statements without matching '#else'.
  Add AVX FFT implementation.
  Increase alignment of av_malloc() as needed by AVX ASM.
  Update x86inc.asm from x264 to allow AVX emulation using SSE and MMX.
  mjpeg: Detect overreads in mjpeg_decode_scan() and error out.
  documentation: extend documentation for ffmpeg -aspect option
  APIChanges: update commit hashes for recent additions.
  lavc: deprecate FF_*_TYPE macros in favor of AV_PICTURE_TYPE_* enums
  aac: add headers needed for log2f()
  lavc: remove FF_API_MB_Q cruft
  lavc: remove FF_API_RATE_EMU cruft
  lavc: remove FF_API_HURRY_UP cruft
  pad: make the filter parametric
  vsrc_movie: add key_frame and pict_type.
  vsrc_movie: fix leak in request_frame()
  lavfi: add key_frame and pict_type to AVFilterBufferRefVideo.
  vsrc_buffer: add sample_aspect_ratio fields to arguments.
  lavfi: add fieldorder filter
  scale: make the filter parametric
  ...

Conflicts:
	Changelog
	doc/filters.texi
	ffmpeg.c
	libavcodec/ac3dec.h
	libavcodec/dsputil.c
	libavfilter/avfilter.h
	libavfilter/vf_scale.c
	libavfilter/vf_yadif.c
	libavfilter/vsrc_buffer.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-27 03:51:04 +02:00
Diego Biurrun e6ff064845 Eliminate pointless '#if 1' statements without matching '#else'. 2011-04-26 20:18:27 +02:00
Michael Niedermayer 7b376b398a Merge remote branch 'qatar/master'
* qatar/master:
  Handle unicode file names on windows
  rtp: Rename the open/close functions to alloc/free
  Lowercase all ff* program names.
  Refer to ff* tools by their lowercase names.
NOT Pulled  Replace more FFmpeg instances by Libav or ffmpeg.
  Replace `` by $() syntax in shell scripts.
  patcheck: Allow overiding grep program(s) through environment variables.
NOT Pulled  Remove stray libavcore and _g binary references.
  vorbis: Rename decoder/encoder files to follow general file naming scheme.
  aacenc: Fix whitespace after last commit.
  cook: Fix small typo in av_log_ask_for_sample message.
  aacenc: Finish 3GPP psymodel analysis for non mid/side cases.
  Remove RDFT dependency from AAC decoder.
  Add some debug log messages to AAC extradata
  Fix mov debug (u)int64_t format strings.
  bswap: use native types for av_bwap16().
  doc: FLV muxing is supported.
  applehttp: Handle AES-128 encrypted streams
  Add a protocol handler for AES CBC decryption with PKCS7 padding
  doc: Mention that DragonFly BSD requires __BSD_VISIBLE set

Conflicts:
	ffplay.c
	ffprobe.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-24 03:41:22 +02:00
Diego Biurrun 89b503b55f Lowercase all ff* program names. 2011-04-23 19:12:24 +02:00
Diego Biurrun 43fb279f56 Replace more FFmpeg instances by Libav or ffmpeg. 2011-04-23 19:12:23 +02:00
Michael Niedermayer efb5fa79f5 Merge remote branch 'qatar/master'
* qatar/master: (37 commits)
  In avcodec_open(), set return code to an error value only when an error occurs instead of unconditionally at the start of the function.
  lavc: remove reference to opt.h from Makefile.
  prefer avio_check() over url_exist()
  avio: remove AVIO_* access symbols in favor of new AVIO_FLAG_* symbols
  lavu: remove misc disabled cruft
  lavu: remove FF_API_OLD_IMAGE_NAMES cruft
NOT PULLED  lavu: remove FF_API_OLD_EVAL_NAMES cruft
  lavc: remove misc disabled cruft.
  lavc: remove the FF_API_INOFFICIAL cruft.
  lavc: remove the FF_API_SET_STRING_OLD cruft.
  lavc: remove the FF_API_USE_LPC cruft.
  lavc: remove the FF_API_SUBTITLE_OLD cruft.
  lavc: remove the FF_API_VIDEO_OLD cruft.
  lavc: remove the FF_API_AUDIO_OLD cruft.
  lavc: remove the FF_API_OPT_SHOW cruft.
  lavc: remove the FF_API_MM_FLAGS cruft.
  lavf: remove misc disabled cruft.
  lavf: remove FF_API_INDEX_BUILT cruft
  lavf: remove FF_API_URL_CLASS cruft.
  lavf: remove FF_API_SYMVER cruft
  ...

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-20 04:48:23 +02:00
Stefano Sabatini 55815edca0 prefer avio_check() over url_exist()
The problem with url_exist() is that it tries to open a resource in
RDONLY mode. If the file is a FIFO and there is already a reading
client, the open() call will hang.

By using avio_check() with access mode of 0, the second reading
process will check if the file exists without attempting to open it,
thus avoiding the lock.

Fix issue #1663.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-19 19:48:07 +02:00
Stefano Sabatini 59d96941f0 avio: remove AVIO_* access symbols in favor of new AVIO_FLAG_* symbols
Make AVIO_FLAG_ access constants work as flags, and in particular fix
the behavior of functions (such as avio_check()) which expect them to
be flags rather than modes.

This breaks API.
2011-04-19 19:47:58 +02:00
Anton Khirnov 41d0eb1c81 lavc: remove the FF_API_SET_STRING_OLD cruft. 2011-04-19 18:41:00 +02:00
Anton Khirnov 761ad42968 lavf: remove FF_API_MAX_STREAMS cruft 2011-04-19 18:28:38 +02:00
Michael Niedermayer d4d09329ee Merge remote branch 'qatar/master'
* qatar/master:
  lavf: bump minor and add an APIChanges entry for avformat cleanup
  lavf: get rid of ffm-specific stuff in avformat.h
Not pulled:  avio: deprecate av_protocol_next().
  avio: add a function for iterating though protocol names.
  lavf: rename a parameter of av_sdp_create from buff->buf
  lavf: rename avf_sdp_create to av_sdp_create.
  lavf: make av_guess_image2_codec internal
  avio: make URLProtocol internal.
  avio: make URLContext internal.
  lavf: mark av_pkt_dump(_log) for remove on $next+1 bump.
  lavf: use designated initializers for all protocols
  applehttp: don't use deprecated url_ functions.
  avio: move two ff_udp_* functions from avio_internal to url.h
  asfdec: remove a forgotten declaration of nonexistent function
  avio: deprecate the typedef for URLInterruptCB

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-09 03:17:07 +02:00
Anton Khirnov 3ee53dabcf lavf: get rid of ffm-specific stuff in avformat.h 2011-04-08 20:58:19 +02:00
Anton Khirnov c3675dfe1e lavf: rename avf_sdp_create to av_sdp_create.
The new name is more consistent with the rest of the API.
2011-04-08 16:45:40 +02:00
Michael Niedermayer c88caa522c Merge remote branch 'qatar/master'
* qatar/master:
  proto: include os_support.h in network.h
  matroskaenc: don't write an empty Cues element.
  lavc: add a FF_API_REQUEST_CHANNELS deprecation macro
  avio: move extern url_interrupt_cb declaration from avio.h to url.h
  avio: make av_register_protocol2 internal.
  avio: avio_ prefix for url_set_interrupt_cb.
  avio: AVIO_ prefixes for URL_ open flags.
  proto: introduce listen option in tcp
  doc: clarify configure features
  proto: factor ff_network_wait_fd and use it on udp

Conflicts:
	ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-08 02:50:13 +02:00
Anton Khirnov f87b1b373a avio: AVIO_ prefixes for URL_ open flags. 2011-04-07 18:07:16 +02:00
Michael Niedermayer 2cae9809e2 Merge remote branch 'qatar/master'
* qatar/master:
  fate: fix partial run when no samples path is specified
  ARM: NEON fixed-point forward MDCT
  ARM: NEON fixed-point FFT
  lavf: bump minor version and add an APIChanges entry for avio changes
  avio: simplify url_open_dyn_buf_internal by using avio_alloc_context()
  avio: make url_fdopen internal.
  avio: make url_open_dyn_packet_buf internal.
  avio: avio_ prefix for url_close_dyn_buf
  avio: avio_ prefix for url_open_dyn_buf
  avio: introduce an AVIOContext.seekable field
  ac3enc: use generic fixed-point mdct
  lavfi: add fade filter
  Change yadif to not use out of picture lines.
  lavc: deprecate AVCodecContext.antialias_algo
  lavc: mark mb_qmin/mb_qmax for removal on next major bump.

Conflicts:
	doc/filters.texi
	libavcodec/ac3enc_fixed.h
	libavcodec/ac3enc_float.h
	libavfilter/Makefile
	libavfilter/allfilters.c
	libavfilter/vf_fade.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-04 02:15:12 +02:00
Anton Khirnov 403ee835e7 avio: make url_open_dyn_packet_buf internal.
It doesn't look fit to be a part of the public API.

Adding a temporary hack to ffserver to be able to use it, should be
cleaned up when somebody is up for it.
2011-04-03 22:47:32 +02:00
Anton Khirnov 6dc7d80de7 avio: avio_ prefix for url_close_dyn_buf 2011-04-03 22:47:05 +02:00
Anton Khirnov b92c545282 avio: avio_ prefix for url_open_dyn_buf 2011-04-03 22:46:56 +02:00
Anton Khirnov 8978fedaee avio: introduce an AVIOContext.seekable field
Use it instead of url_is_streamed and AVIOContext.is_streamed.
2011-04-03 22:46:40 +02:00
Mans Rullgard 2912e87a6c Replace FFmpeg with Libav in licence headers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00
Anton Khirnov 83fddaeb81 avio: deprecate url_open_buf
It's only used in one place and does the same thing as
avio_alloc_context.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-16 22:59:39 -04:00
Anton Khirnov d9d86e00b2 avio: avio_ prefix for url_fprintf
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-16 22:59:39 -04:00
Anton Khirnov 22a3212e32 avio: rename url_fopen/fclose -> avio_open/close.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 10:18:55 -05:00
Martin Storsjö 28c4741a66 libavformat: Remove FF_NETERRNO()
Map EAGAIN and EINTR from ff_neterrno to the normal AVERROR()
error codes. Provide fallback definitions of other errno.h network
errors, mapping them to the corresponding winsock errors.

This eases catching these error codes in common code, without having
to distinguish between FF_NETERRNO(EAGAIN) and AVERROR(EAGAIN).

This fixes roundup issue 2614, unbreaking blocking network IO on
windows.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 07:21:31 -05:00
Anton Khirnov 77eb5504d3 avio: avio: avio_ prefixes for put_* functions
In the name of consistency:
put_byte           -> avio_w8
put_<type>         -> avio_w<type>
put_buffer         -> avio_write

put_nbyte will be made private
put_tag will be merged with avio_put_str

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-21 14:25:15 -05:00
Anton Khirnov ae628ec1fd avio: rename ByteIOContext to AVIOContext.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-20 08:37:15 -05:00
Martin Storsjö c2ca851b23 ffserver: Try matching the RTSP url without a trailing slash
If the client sends PLAY/PAUSE requests with the same url as
specified in Content-Base, these requests may have urls with
trailing slashes.
2011-02-17 23:18:46 +01:00
Anton Khirnov ab0287fcbd Move find_info_tag to lavu and add av_ prefix to it
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-02-17 15:35:18 +01:00
Anton Khirnov 9fcae9735e Replace remaining uses of parse_date with av_parse_time.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-16 23:39:57 +00:00
Nicolas George 6741f7c9be ffserver: set the sample aspect ratio
Hi.

It seems that ffserver sets sample_aspect_ratio to an invalid value and lavf
rejects it.

I am not sure what I am doing here, but the attached patch actually solves
something: using the following config:

CustomLog -
NoDaemon
RTSPPort 5454
<Stream test1-rtsp.mpg>
Format rtp
File "/tmp/test1-rtsp.mpg"
</Stream>

it allows a somewhat old ffplay (unaffected by the content-base issue I
spoke of in another thread) to play the stream.

Without it, ffserver logs this and closes the stream:

Wed Feb 16 14:52:14 2011 [rtp @ 0x1399de0]Aspect ratio mismatch between encoder and muxer layer

Regards,

--
  Nicolas George

From 1b89c3c2164335060e87567b27deb0d354e0a814 Mon Sep 17 00:00:00 2001
From: Nicolas George <nicolas.george@normalesup.org>
Date: Wed, 16 Feb 2011 14:44:31 +0100
Subject: [PATCH] ffserver: set the sample aspect ratio.

Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
2011-02-17 00:37:00 +01:00
Reinhard Tartler 737eb5976f Merge libavcore into libavutil
It is pretty hopeless that other considerable projects will adopt
libavutil alone in other projects. Projects that need small footprint
are better off with more specialized libraries such as gnulib or rather
just copy the necessary parts that they need. With this in mind, nobody
is helped by having libavutil and libavcore split. In order to ease
maintenance inside and around FFmpeg and to reduce confusion where to
put common code, avcore's functionality is merged (back) to avutil.

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-02-15 16:18:21 +01:00
Mans Rullgard efa6ce9982 ffserver: put gcc attribute under proper ifdef 2011-01-24 22:09:37 +00:00
Reinhard Tartler 305ca590cf ffserver: cleanup
remove the trivial function do_switch_stream as it doesn't help to make
the code easier to understand.
2011-01-23 08:53:40 +01:00
Luca Barbato 2a12706710 Unbreak ffserver
Make sure the sample_aspect_ratio is 0 and not 0/0.

Originally committed as revision 26254 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-07 18:48:45 +00:00
Martin Storsjö 77223c5388 rtsp: Pass the method name to ff_rtsp_parse_line
Originally committed as revision 26191 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-02 10:10:12 +00:00
Stefano Sabatini 6e872935db Implement get_preset_file() in cmdutils.h and use it to factorize code
from ffmpeg.c and ffserver.c.

Originally committed as revision 25679 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-04 23:07:04 +00:00
Aurelien Jacobs aff8810172 ffserver: use a local MAX_STREAMS limit
Originally committed as revision 25495 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-15 19:09:54 +00:00
Aurelien Jacobs 9389b925f1 ffserver: fix prepare_sdp_description() to dynamically allocate streams
Originally committed as revision 25494 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-15 19:09:05 +00:00
Stefano Sabatini 126b638ea0 Deprecate av_parse_video_frame_size() and av_parse_video_frame_rate()
in favor of the newly added corresponding functions
av_parse_video_size() and av_parse_video_rate() defined in
libavcore/parseutils.h.

This change also adds a linking-time dependency of libavcodec and of
libavfilter on libavcore.

Originally committed as revision 24518 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-26 23:12:28 +00:00
Howard Chu 0aee2a57c8 Also use 503 for bandwidth limit exceeded
Originally committed as revision 24107 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-08 09:21:24 +00:00
Howard Chu 2a22187f39 Fix "server too busy" status code
Originally committed as revision 24105 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-08 08:59:53 +00:00
Måns Rullgård f3bfe388b5 Make ff_url_split() public
ff_url_split() is retained as an alias, as it was used by ffserver,
to avoid breaking ABI compatibility with it.

Originally committed as revision 23822 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-27 14:16:46 +00:00
Martin Storsjö 5634f30c4a ffserver: Use avcodec_copy_context instead of manually copying an AVCodecContext
Originally committed as revision 23692 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-22 06:45:05 +00:00
Howard Chu d9aac26761 When reading a stream, should retry on EAGAIN instead of just failing. Also,
when reading a live feed, should retry regardless of whether any client has
opened the stream.

Originally committed as revision 23621 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-16 01:12:26 +00:00
Howard Chu 8190f62f9b Support presets in ffserver.conf
Originally committed as revision 23524 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-08 09:55:30 +00:00
Martin Storsjö f475f35fdd ffserver: Calculate cur_pts using first_pts as origin instead of ist->start_time
This fixes cases where ist->start_time wasn't initialized. This also makes
cur_pts calculated against the same origin for all streams.

Originally committed as revision 23450 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-03 20:58:22 +00:00
Martin Storsjö 3b963552bc ffserver: Allow floating point audio bit rates
This allows setting bit rates that aren't an exact multiple of 1000.

Originally committed as revision 23419 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-02 07:09:44 +00:00
Martin Storsjö 577ee94871 ffserver: Send a Content-Base header in the reply to RTSP DESCRIBE requests
This is needed for QuickTime Player to be able to connect properly.

Originally committed as revision 23325 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-25 19:23:18 +00:00
Martin Storsjö 111c935980 ffserver: Fix one of the codec parameter checks
This is probably what was originally intended; the codec pointers are all NULL.

Fix by Howard Chu, hyc at highlandsun dot com

Originally committed as revision 23295 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-24 20:24:39 +00:00
Martin Storsjö a5ba4cedf2 ffserver: Fix streaming with more than one stream
Fix by Howard Chu, hyc at highlandsun dot com

Originally committed as revision 23294 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-24 20:08:02 +00:00
Howard Chu e175b55edf ffserver: Fix extradata handling
Patch by Howard Chu, hyc at highlandsun dot com

Originally committed as revision 23293 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-24 19:59:18 +00:00
Martin Storsjö c966c91279 ffserver: Fix an out of bounds read
Fix by Howard Chu, hyc at highlandsun dot com

Originally committed as revision 23292 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-24 19:23:31 +00:00
Martin Storsjö 9cc9a15510 ffserver: Fix another memory leak
Don't allocate st->codec, it will be overwritten by the memcpy a few
lines further down.

Fix by Howard Chu, hyc at highlandsun dot com

Originally committed as revision 23291 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-24 19:12:00 +00:00
Howard Chu ea4f8aabab ffserver: Plug some memory leaks
Patch by Howard Chu, hyc at highlandsun dot com

Originally committed as revision 23290 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-24 19:05:22 +00:00
Martin Storsjö 576fb48e6d Make ff_random_get_seed public, rename to av_get_random_seed, export the header
Keep an old ff_ named function for binary compatibility until the
next major bump.

Originally committed as revision 23254 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-23 08:53:40 +00:00
Howard Chu 686d6f4022 ffserver: Avoid busylooping while reading non-blocking input
Patch by Howard Chu, hyc at highlandsun dot com

Originally committed as revision 23210 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-21 07:59:12 +00:00
Martin Storsjö 90c9210028 Cosmetics: reindent
Originally committed as revision 23156 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-18 11:46:23 +00:00
Howard Chu 1bf5228eb6 ffserver: Don't set me_method unconditionally
Patch by Howard Chu, hyc at highlandsun dot com

Originally committed as revision 23155 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-18 11:45:09 +00:00
Howard Chu 0156fcf252 ffserver: Write proper GMT date/times in Date headers
Patch by Howard Chu, hyc at highlandsun dot com

Originally committed as revision 23154 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-18 11:16:12 +00:00
Martin Storsjö 43d09fafd4 ffserver: Make sure a destination URL is set when creating the SDP
Debugged by Howard Chu, hyc at highlandsun dot com.

Originally committed as revision 23151 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-17 17:34:13 +00:00
Stefano Sabatini 2ef6c1242a Mark av_metadata_set() as deprecated, and use av_metadata_set2()
in its place.

av_metadata_set() is going to be dropped at the next major bump.

Originally committed as revision 22961 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-25 14:27:42 +00:00
Stefano Sabatini 472e12f510 Implement ffserver.c:report_config_error() and a macro for logging
error messages / updating the error count.

Originally committed as revision 22960 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-24 10:39:28 +00:00
Stefano Sabatini 6675a5bf73 Statically initialize ffserver.c:config_filename, simplify.
Originally committed as revision 22959 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-24 10:39:25 +00:00
Luca Barbato bacde6466c Make ffserver support rfc3550
Originally committed as revision 22907 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-19 11:42:02 +00:00
Benjamin Larsson 58f48adb51 Add DynamicACL support for FFserver.
Originally committed as revision 22815 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-07 20:06:02 +00:00
Ronald S. Bultje d9521cb119 Fix FFM-based streaming from ffmpeg to ffserver. The basic problem is that
we'd memset() the codec context to zero, thereby setting audio input to U8
and video to YUV420P. For most video encoders, that actually works, but for
most audio codecs, it doesn't. This patch changes defaults to those set by
avcodec_context_get_defaults() and have ffmpeg figure out the optimal encoding
format itself if not set explicitely (as it does for the non-ffserver-cases
also).

Originally committed as revision 22751 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-31 21:02:34 +00:00
Jean-Daniel Dupas cc947f04cc Replace all occurences of PKT_FLAG_KEY with AV_PKT_FLAG_KEY.
Patch by Jean-Daniel Dupas, devlists shadowlab org

Originally committed as revision 22744 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-31 12:29:58 +00:00
Stefano Sabatini 72415b2adb Define AVMediaType enum, and use it instead of enum CodecType, which
is deprecated and will be dropped at the next major bump.

Originally committed as revision 22735 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-30 23:30:55 +00:00
Martin Storsjö 2626308abb Actually parse the auth headers in RTSP
Originally committed as revision 22677 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-25 21:48:58 +00:00
Måns Rullgård 22f73dccad Move resolve_host() to ffserver.c
This deprecated function is only used by ffserver, yet does not have
a prototype visible there.

In the long term, ffserver should be made IPv6-aware.  In the meantime,
this change removes cruft from lavf and fixes some warnings in ffserver.

Originally committed as revision 22329 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-08 18:43:27 +00:00
Martin Storsjö c5c6e67c28 Rename url_split to ff_url_split
Since this function isn't in the public API, it should have an ff_ prefix.

Originally committed as revision 22321 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-08 09:03:25 +00:00
Måns Rullgård ffabdaa14a ffserver: remove bogus comment
Originally committed as revision 22303 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-08 00:26:54 +00:00
Måns Rullgård 6580d5e377 Remove hacks not required since HAVE_AV_CONFIG_H was unset for the apps
Originally committed as revision 22295 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-07 22:18:37 +00:00
Måns Rullgård acd0026c0b ffserver: do not use intreadwrite.h
intreadwrite.h is not part of the public API and should thus
not be used by the ff* applications.

Originally committed as revision 22293 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-07 22:18:30 +00:00
Måns Rullgård fd7bec5e3c ffserver: use av_stristr()
Originally committed as revision 22252 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-06 19:41:24 +00:00
Ronald S. Bultje 19c8c4ecf4 Update to work with chunked encoding HTTP streams (as served by FFmpeg since
a few months now). Fixes issue 1738.

Originally committed as revision 22175 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-03 18:41:50 +00:00
Ronald S. Bultje 3307e6ea86 Prefix non-static RTSP functions with ff_.
Originally committed as revision 21974 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-23 00:35:50 +00:00
Diego Biurrun 7f6a384a4f Mark http_log() as static; it is only used in this file.
Originally committed as revision 21017 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-04 17:55:52 +00:00
Stefano Sabatini aa13b573b4 Use av_match_ext() in place of the deprecated match_ext() function.
Originally committed as revision 21000 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-01 23:56:09 +00:00
Stefano Sabatini 0f52ef1a00 Use av_guess_format() in place of the deprecated guess_format().
Originally committed as revision 20994 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-01 12:58:03 +00:00
Stefano Sabatini 1642ee4337 Deprecate and mark for deletion the function guess_stream_format(),
and clone its code to ffserver_guess_format() in ffserver.c.

guess_stream_format() is hackish since it relies on some undocumented
properties of the name of the muxers (wich is currently only relevant
for the ASF muxer), and has no use outside ffserver.c.

Originally committed as revision 20987 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-12-31 14:12:58 +00:00
Stefano Sabatini 992f8eaee7 Factorize common commandline options definition.
Originally committed as revision 20664 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-11-29 23:12:19 +00:00
Michael Niedermayer 8447f0bd74 Split show_formats().
Originally committed as revision 20553 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-11-19 16:35:55 +00:00
Stefano Sabatini 43d160fd00 Prefer "loglevel" over "logging level number or string" as argname of
the loglevel command line option.

Make the loglevel option help message more clear, since the option
argument is shown as a single token, and make the whole message better
aligned with the other help messages.

Originally committed as revision 20149 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-10-02 19:06:27 +00:00
Diego Biurrun a392f82a3a Remove disabled code cruft.
Originally committed as revision 20087 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-29 21:08:33 +00:00
Stefano Sabatini 7087a0f525 Add a -loglevel command line option to ffserver.
The -loglevel option makes possible to set the logging level used by
the libav* libraries.

Originally committed as revision 20035 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-26 23:30:41 +00:00
Benjamin Larsson c64c0a9b76 Move get_arg to avoid future declaration of function when
new code is added.

Originally committed as revision 19815 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-10 19:08:03 +00:00
Diego Biurrun 5e567aae48 Consistently lowercase all HTML tags.
Originally committed as revision 19464 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-07-19 10:44:36 +00:00
Baptiste Coudurier 64159a588b check if feed max file size is too small
Originally committed as revision 18109 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-21 10:32:43 +00:00