Commit Graph

7671 Commits

Author SHA1 Message Date
Michael Niedermayer 7b915726eb udp: remove resource.h inclusion, it breaks mingw compilation.
The header seems unneeded, if its needed we will put it back with appropriate #if
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-15 01:48:17 +02:00
Michael Niedermayer e60e54ceb5 UDP: dont use thread_t as truth value.
Unbreak compile on mingw.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-14 13:34:08 +02:00
Michael Niedermayer 03f8f39769 udp: switch custom fifo to libavutil fifo.
This also allows us to drop the semaphore as our fifo is lock free.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-13 17:43:17 +02:00
Michael Niedermayer 593bb98d61 udp: use FFMAX&FFMIN.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-13 17:42:19 +02:00
JULIAN GARDNER 4275602183 udp: add a thread into udp.c for receiving data into a circular buffer, this stops the problem of live decoding/encoding giving errors.
Also added a buf_size which is the number of TS packets that to be allocated for the circular buffer.
2011-05-13 17:40:59 +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
Carl Eugen Hoyos 410ca3bc2d Support Digital Voodoo SD 8 Bit in mov (ticket 195). 2011-05-13 01:08:01 +02:00
ami_stuff 92ccdfb8bf Support R10g in mov. 2011-05-13 00:49:29 +02:00
Carl Eugen Hoyos 86f2c36c6c Add 5.1 plus stereo-downmix to mov_channel_layout array. 2011-05-13 00:23:30 +02:00
Martin Storsjö 552a99957f rtpdec_qdm2: Don't try to parse data packet if no configuration is received
The later parsing of payload data depends on the configuration
being present. If it hasn't been configured properly yet,
parsing a data packet may lead to a crash.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-05-13 00:20:59 +03:00
Aurelien Jacobs 89d4c13057 matroskaenc: make sure we don't produce invalid file with no codec ID
Signed-off-by: Aurelien Jacobs <aurel@gnuage.org>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-12 18:02:28 +02:00
Aurelien Jacobs 9c569ef712 matroskadec: check that pointers were initialized before accessing them
Signed-off-by: Aurelien Jacobs <aurel@gnuage.org>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-12 18:02:28 +02:00
Stefano Sabatini 4ad0693edc lavf: fix function name in compute_pkt_fields2 av_dlog message
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-12 18:02:28 +02:00
Marton Balint 2c71581698 lavf: fix av_find_best_stream when providing a wanted stream.
In the main loop, stream_number is incremented after checking the stream type,
so the search usually will not find the wanted stream.

This patch eliminates the useless stream_number variable and introduces a new
one, called real_stream_index to store the real stream index of the current
stream, no matter if we are looping through all the streams or only the streams
of a program.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-12 18:02:27 +02:00
Marton Balint 6b35a795f8 lavf: fix av_find_best_stream when decoder_ret is given and using a related stream.
Yet another fix for the code originally designed for use without related_stream.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-12 18:02:27 +02:00
Uoti Urpala bcedf2e519 asfdec: fix assert failure on invalid files
Add an extra size validity check in asf_read_frame_header(). Without
this asf->packet_size_left may become negative, which triggers an
assertion failure later.
2011-05-12 16:09:39 +02:00
Michael Niedermayer 10291562f3 Revert "asfdec: fix assert failure on invalid files"
Reverting this pulled change as author considers this change buggy compared to his
original version.
This reverts commit 0bd433a916.
2011-05-12 16:04:13 +02:00
Yusuke Nakamura 5f0bb0baef mov: Support edit list atom version 1.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-05-12 15:52:25 +02:00
Thierry Foucu b7903ab16b If a MP3 file contains the string NSVs, the NSV probe will think it is a NSV file instead of a MP3 file. Check for 0xBEEF after a Video/Audio chunck for more accuracy.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-12 14:37:50 +02:00
Clément Bœsch e575685fad Cosmetics: fix prototypes in oggdec
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-05-12 13:34:20 +02:00
Clément Bœsch 5780f41af5 oggdec: fix memleak with continuous streams.
This avoids the creation of a new AVStream instead of replacing it when
a stream reset occurs (track change with some webradios for example).

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-05-12 13:34:20 +02:00
Aurelien Jacobs 2501d2f386 matroskaenc: add missing new line in av_log() call
Signed-off-by: Aurelien Jacobs <aurel@gnuage.org>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-12 13:08:30 +02:00
Baptiste Coudurier 304e983dc7 movenc: fix yuv range in avid atoms used by dnxhd.
yuv range: full 1 / normal 2

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-12 13:07:21 +02:00
Alex Converse 7fe3207e25 movenc: fix adpcm mono muxing.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-12 13:05:30 +02:00
Baptiste Coudurier 6ae38aa3ce mpegts: do not output known sized packet if an unbounded packet is already queued.
Fix issue #2624.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-12 13:04:58 +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
Thierry Foucu 45faf7fcd3 nsv: Fix misdetection of MP3 files as NSV.
If an MP3 file contains the string NSVs, the NSV probe will confuse it for an
NSV file. Check for 0xBEEF after a Video/Audio chunk to achieve more accuracy.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-05-12 11:32:39 +02:00
Clément Bœsch b3bbc6fdc5 oggdec: use explicit AVInputFormat struct initializers
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-05-12 11:32:26 +02:00
Clément Bœsch f95257d27c oggdec: simplify ogg_probe
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-05-12 11:32:26 +02:00
Michael Niedermayer 612122b187 Merge remote branch 'qatar/master'
* qatar/master: (32 commits)
  10-bit H.264 x86 chroma v loopfilter asm
  Port SMPTE S302M audio decoder from FFmbc 0.3. [Copyright headers corrected]
  Fix crash of interlaced MPEG2 decoding
  h264pred: fix one more aliasing violation.
  doc/APIchanges: fill in missing hashes and dates.
  flacenc: use proper initializers for AVOption default values.
  lavc: deprecate named constants for deprecated antialias_algo.
  aac: workaround for compilation on cygwin
  swscale: extend YUV422p support to 10bits depth
  tiff: add support for inverted FillOrder for uncompressed data
  Remove unused softfloat implementation.
  h264pred: fix aliasing violations.
  rotozoom: Eliminate French variable name.
  rotozoom: Check return value of fread().
  rotozoom: Return an error value instead of calling exit().
  rotozoom: Make init_demo() return int and check for errors on invocation.
  rotozoom: Drop silly UINT8 typedef.
  rotozoom: Drop some unnecessary parentheses.
  rotozoom: K&R coding style cosmetics
  rtsp: Only do keepalive using GET_PARAMETER if the server supports it
  ...

Conflicts:
	Changelog
	cmdutils.c
	doc/APIchanges
	doc/general.texi
	ffmpeg.c
	ffplay.c
	libavcodec/h264pred_template.c
	libavcodec/resample.c
	libavutil/pixfmt.h
	libavutil/softfloat.c
	libavutil/softfloat.h
	tests/rotozoom.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-12 04:51:24 +02:00
Michael Niedermayer 4ea216e761 libavformat/utils: Only consider dvb teletext timestamps for start time when they are consistent with the rest.
This fixes Ticket51.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-12 03:40:21 +02:00
ami_stuff 4f038fdc23 Add "DAVC" FourCC
This FourCC is used by "mpegable AVC" codec and the file encoded with this codec decodes correctly with FFmpeg's H264 decoder.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-11 22:43:30 +02:00
Baptiste Coudurier 9aa91043f3 Port SMPTE S302M audio decoder from FFmbc 0.3. 2011-05-11 17:25:06 +02:00
Martin Storsjö 0b4949b518 rtsp: Only do keepalive using GET_PARAMETER if the server supports it
This is more like what VLC does. If the server doesn't mention
supporting GET_PARAMETER in response to an OPTIONS request,
VLC doesn't send any keepalive requests at all. After this patch,
libavformat will still send OPTIONS keepalives if GET_PARAMETER
isn't explicitly said to be supported.

Some RTSP cameras don't support GET_PARAMETER, and will
close the connection if this is sent as keepalive request
(but support OPTIONS just fine, but probably don't need any
keepalive at all). Some other cameras don't support using
OPTIONS as keepalive, but require GET_PARAMETER instead.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-05-11 10:42:34 +03:00
Michael Niedermayer 59eb12faff Merge remote branch 'qatar/master'
* qatar/master: (30 commits)
  AVOptions: make default_val a union, as proposed in AVOption2.
  arm/h264pred: add missing argument type.
  h264dsp_mmx: place bracket outside #if/#endif block.
  lavf/utils: fix ff_interleave_compare_dts corner case.
  fate: add 10-bit H264 tests.
  h264: do not print "too many references" warning for intra-only.
  Enable decoding of high bit depth h264.
  Adds 8-, 9- and 10-bit versions of some of the functions used by the h264 decoder.
  Add support for higher QP values in h264.
  Add the notion of pixel size in h264 related functions.
  Make the h264 loop filter bit depth aware.
  Template dsputil_template.c with respect to pixel size, etc.
  Template h264idct_template.c with respect to pixel size, etc.
  Preparatory patch for high bit depth h264 decoding support.
  Move some functions in dsputil.c into a new file dsputil_template.c.
  Move the functions in h264idct into a new file h264idct_template.c.
  Move the functions in h264pred.c into a new file h264pred_template.c.
  Preparatory patch for high bit depth h264 decoding support.
  Add pixel formats for 9- and 10-bit yuv420p.
  Choose h264 chroma dc dequant function dynamically.
  ...

Conflicts:
	doc/APIchanges
	ffmpeg.c
	ffplay.c
	libavcodec/alpha/dsputil_alpha.c
	libavcodec/arm/dsputil_init_arm.c
	libavcodec/arm/dsputil_init_armv6.c
	libavcodec/arm/dsputil_init_neon.c
	libavcodec/arm/dsputil_iwmmxt.c
	libavcodec/arm/h264pred_init_arm.c
	libavcodec/bfin/dsputil_bfin.c
	libavcodec/dsputil.c
	libavcodec/h264.c
	libavcodec/h264.h
	libavcodec/h264_cabac.c
	libavcodec/h264_cavlc.c
	libavcodec/h264_loopfilter.c
	libavcodec/h264_ps.c
	libavcodec/h264_refs.c
	libavcodec/h264dsp.c
	libavcodec/h264idct.c
	libavcodec/h264pred.c
	libavcodec/mlib/dsputil_mlib.c
	libavcodec/options.c
	libavcodec/ppc/dsputil_altivec.c
	libavcodec/ppc/dsputil_ppc.c
	libavcodec/ppc/h264_altivec.c
	libavcodec/ps2/dsputil_mmi.c
	libavcodec/sh4/dsputil_align.c
	libavcodec/sh4/dsputil_sh4.c
	libavcodec/sparc/dsputil_vis.c
	libavcodec/utils.c
	libavcodec/version.h
	libavcodec/x86/dsputil_mmx.c
	libavformat/options.c
	libavformat/utils.c
	libavutil/pixfmt.h
	libswscale/swscale.c
	libswscale/swscale_internal.h
	libswscale/swscale_template.c
	tests/ref/seek/lavf_avi

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-11 05:47:02 +02:00
Anton Khirnov b66752790a AVOptions: make default_val a union, as proposed in AVOption2.
This breaks API and ABI.
2011-05-10 20:22:06 +02:00
Andres Gonzalez dc05b6af3d Added oggpagesize option for Ogg encoding. Allows setting a preferred page size. When set, if an Ogg stream buffer has enough data, a page is made, instead of filling maximum-size pages. 2011-05-10 19:30:56 +02:00
Vitor Sessak ecc297308f lavf/utils: fix ff_interleave_compare_dts corner case.
This should fix behavior introduced by commit
96573c0d76. Av_rescale_rnd() is not
lossless so if two timestamps are equal after being rescaled they are
not always actually identical. This patch use av_compare_ts() to get
always a correct result.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-05-10 07:53:19 -04:00
Michael Niedermayer b97b4b58a6 Merge remote branch 'qatar/master'
* qatar/master:
  mpegaudiodec: group #includes more sanely
  mpegaudio: remove #if 0 blocks
  ffmpeg.c: reset avoptions after each input/output file.
  ffmpeg.c: store per-output stream sws flags.
  mpegaudio: remove CONFIG_MPEGAUDIO_HP option
  mpegtsenc: Clear st->priv_data when freeing it
  udp: Fix receiving RTP data over multicast
  rtpproto: Remove an unused variable
  regtest: fix wma tests
NOT pulled:  mpegaudio: remove CONFIG_AUDIO_NONSHORT
  regtest: separate flags for encoding and decoding

Conflicts:
	ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-10 04:03:17 +02:00
Michael Niedermayer 67d441499a seeking: Favor pkt->pos for generic index building where possible.
See [FFmpeg-devel] [PATCH] Only using st->parser->pos when doing?repacking in the parser.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-10 03:28:42 +02:00
Martin Storsjö ed87375dd5 mpegtsenc: Clear st->priv_data when freeing it
If not cleared, the caller might try to free it.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-05-09 19:14:40 +03:00
Martin Storsjö a7ea5e3d35 udp: Fix receiving RTP data over multicast
Earlier, AVIO_RDWR was handled as READ, and all the checks
for the AVIO_WRONLY flag explicitly meant the write-only case.
When changed from old AVIO/URL contants to AVIO_FLAG in
59d96941f0, these comparisons were updated incorrectly, by
mapping checks for AVIO_WRONLY to checks for AVIO_FLAG_WRITE.

When receiving RTP over UDP, the urlcontext is opened with
READ_WRITE flags.

This patch updates the flag comparisons to check for the same
conditions as the code did prior to 59d96941f0.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-05-09 19:14:38 +03:00
Martin Storsjö f9a6cfdd04 rtpproto: Remove an unused variable
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-05-09 19:14:37 +03:00
Michael Niedermayer 282e8d4b4f avienc: Update 2 debug statements to match the current code.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-09 17:49:25 +02:00
Michael Niedermayer 5deedf3552 h264probe: update to latest spec.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-09 16:05:29 +02:00
Michael Niedermayer 25308afbb2 wtvdec: Avoid gmtime_r() it breaks compile on windows.
Better solutions welcome, this is just a quick fix to unbreak compile.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-09 04:17:24 +02:00
Peter Ross fddf0521c6 wtv: calculate ole date correctly (is seconds since 1899-12-30) 2011-05-09 02:25:40 +02:00
Peter Ross 8acab7ae5b wtv: detect ole date overflow 2011-05-09 02:25:40 +02:00
Reimar Döffinger d3445a911c Remove unused variable. 2011-05-07 20:14:48 +02:00
Reimar Döffinger 48b9b7edb3 Replace deprecated url_fseek by avio_seek. 2011-05-07 20:14:48 +02:00