Commit Graph

7751 Commits

Author SHA1 Message Date
Tomas Härdin
40612f2601 Cosmetics: indent
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-18 18:36:45 +02:00
Tomas Härdin
6629dbd299 Keep parsing wav until EOF if the input is seekable and we know the size of the data tag
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-18 18:36:22 +02:00
Tomas Härdin
a06d238e8c Refactor the tag checking into a switch statement
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-18 18:27:51 +02:00
Tomas Härdin
93df511ec7 Use avio_tell() instead of url_ftell()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-18 18:27:07 +02:00
JULIAN GARDNER
8146d16b60 cleaned up the udp.c, removed some variables and an av_log 2011-05-18 17:17:56 +02:00
Stefano Sabatini
64be0d1eda id3v2: prevent unsigned integer overflow in ff_id3v2_parse()
In ff_id3v2_parse(), prevent unsigned integer overflow if data length
indicator is skipped and tlen is < 4.

Fix crash decoding file Allaby_cut.mp3, fix trac issue #182.
2011-05-18 10:35:52 +02:00
Stefano Sabatini
b69e5ee902 id3v2: add @file doxy and link to format documentation 2011-05-18 10:35:45 +02:00
Michael Niedermayer
b4bcd1e2f1 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Fix compilation of iirfilter-test.
  libx264: handle closed GOP codec flag
  lavf: remove duplicate assignment in avformat_alloc_context.
  lavf: use designated initializers for AVClasses.
  flvdec: clenup debug code
  asfdec: fix possible overread on broken files.
  asfdec: do not fall back to binary/generic search
  asfdec: reindent after previous commit c7bd5ed
  asfdec: fallback to binary search internally
  mpegaudio: add _fixed suffix to some names
  Modify x86util.asm to ease transitioning to 10-bit H.264 assembly.
  dct: build dct32 as separate object files
  qdm2: include correct header for rdft

Conflicts:
	ffpresets/libx264-fast.ffpreset
	ffpresets/libx264-fast_firstpass.ffpreset
	ffpresets/libx264-faster.ffpreset
	ffpresets/libx264-faster_firstpass.ffpreset
	ffpresets/libx264-medium.ffpreset
	ffpresets/libx264-medium_firstpass.ffpreset
	ffpresets/libx264-placebo.ffpreset
	ffpresets/libx264-placebo_firstpass.ffpreset
	ffpresets/libx264-slow.ffpreset
	ffpresets/libx264-slow_firstpass.ffpreset
	ffpresets/libx264-slower.ffpreset
	ffpresets/libx264-slower_firstpass.ffpreset
	ffpresets/libx264-superfast.ffpreset
	ffpresets/libx264-superfast_firstpass.ffpreset
	ffpresets/libx264-ultrafast.ffpreset
	ffpresets/libx264-ultrafast_firstpass.ffpreset
	ffpresets/libx264-veryfast.ffpreset
	ffpresets/libx264-veryfast_firstpass.ffpreset
	ffpresets/libx264-veryslow.ffpreset
	ffpresets/libx264-veryslow_firstpass.ffpreset
	libavformat/flvdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-18 05:42:42 +02:00
Anton Khirnov
29e3489602 lavf: remove duplicate assignment in avformat_alloc_context.
AVClass is already initialized in  avformat_get_context_defaults.
2011-05-17 23:01:42 +02:00
Anton Khirnov
f0029cbcf6 lavf: use designated initializers for AVClasses. 2011-05-17 23:01:42 +02:00
Tomas Härdin
3d922c8462 Make sure neither data_size nor sample_count is negative 2011-05-17 22:19:58 +02:00
Tomas Härdin
cc1ca9e534 Refactor the 'fmt ' tag search and parsing
Moving the search and parsing of the 'fmt ' info the main loop of wav_read_header() allows tags that precede it to be parsed.
Creating wav_parse_fmt_tag() makes wav_read_header() easier to read.
2011-05-17 22:19:52 +02:00
Alex Converse
13220b1856 flvdec: clenup debug code 2011-05-17 22:08:11 +02:00
Uoti Urpala
29fa570d0c asfdec: fix possible overread on broken files. 2011-05-17 22:06:00 +02:00
Vladimir Pantelic
69fa23961e asfdec: do not fall back to binary/generic search
asf_read_seek() inside the asf demuxer already does the
right thing, it tries the index and if that fails it uses
binary search. If binary search is called from outside of asfdec.c
it will fail because the asf code cannot clean up after itself.
Therefore introduce AVFMT_NOBINSEARCH that prevents the seek
code to fallback to binary search and AVFMT_NOGENSEARCH that
prevents the seek code to fallback to generic search.
2011-05-17 22:06:00 +02:00
Vladimir Pantelic
b58bc17cf7 asfdec: reindent after previous commit c7bd5ed 2011-05-17 22:05:22 +02:00
Vladimir Pantelic
c7bd5edae4 asfdec: fallback to binary search internally
lavf will do that anyway in case seek by index fails
2011-05-17 21:48:16 +02:00
Nicolas George
bec994dff2 Ogg demuxer: give meaningful error codes and warnings.
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
2011-05-17 12:39:00 +02:00
Michael Niedermayer
e6e7ba0ce3 Add some forgotten const to function arguments in libavfilter & libavformat.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-17 03:05:36 +02:00
Carl Eugen Hoyos
f2962ac8ad Write channel_layout for multichannel aif files. 2011-05-17 01:56:01 +02:00
Carl Eugen Hoyos
6d721f714e Fix ff_mov_write_chan() so it can be used by other muxers. 2011-05-17 01:47:12 +02:00
Carl Eugen Hoyos
d2549ba9df Fix some mov files with little endian audio (tickets 201 - 203). 2011-05-17 01:17:27 +02:00
Stefano Sabatini
e280a4da2a iff/8svx: redesign 8SVX demuxing and decoding for handling stereo samples correctly
Make the iff demuxer send the whole audio chunk to the decoder as a
single packet, move stereo interleaving from the iff demuxer to the
decoder, and introduce an 8svx_raw decoder which performs
stereo interleaving.

This is required for handling stereo data correctly, indeed samples
are stored like:
LLLLLL....RRRRRR

that is all left samples are at the beginning of the chunk, all right
samples at the end, so it is necessary to store and process the whole
buffer in order to decode each frame. Thus the decoder needs all the
audio chunk before it can return interleaved data.

Fix decoding of files 8svx_exp.iff and 8svx_fib.iff, fix trac issue #169.
2011-05-17 00:58:33 +02:00
Stefano Sabatini
d8353256a3 iff: compact code setting metadata tags
Ease readability.
2011-05-17 00:53:50 +02:00
Stefano Sabatini
34f590b29b iff: fix bitrate computation for compressed audio stream 2011-05-17 00:53:43 +02:00
Stefano Sabatini
1af99b0292 iff: distinguish fields for audio and video compression
Create separate fields 8svx_compression (for audio compression), and
bitmap_compression (for video compression), and perform minor related
logging tweaks.

Improve clarity, also simplify the case when both types of compression
are employed in the same file.
2011-05-17 00:53:37 +02:00
Carl Eugen Hoyos
d43a6edf7d Bump minor after adding a caf muxer. 2011-05-16 11:24:23 +02:00
Carl Eugen Hoyos
2c4ad1a37b Initial caf muxer. 2011-05-15 03:25:57 +02:00
Carl Eugen Hoyos
0c3803f6bb Support decoding of amr_nb and gsm in caf. 2011-05-15 03:25:57 +02:00
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
Baptiste Coudurier
7e19a6e868 movenc: always write esds descriptor length using 4 bytes.
ipod shuffle doesn't support anything else.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-13 07:38:54 +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
Reimar Döffinger
5ce33e6bc5 Move ifdef to avoid unused variable warnings. 2011-05-07 20:14:47 +02:00
Reimar Döffinger
1795364205 Remove unused variables. 2011-05-07 20:14:47 +02:00
Reimar Döffinger
8c3651f4a5 Fix printf format string, fixes a warning. 2011-05-07 20:14:47 +02:00
Michael Niedermayer
7deaa2b8bd riffenc/ffmpeg: Fix stream copy
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-07 20:03:04 +02:00
Reimar Döffinger
5631729c3d Increase TS packet size detection buffer.
Fixes warning message with ticket #68.
2011-05-07 17:38:18 +02:00
Reimar Döffinger
90f5e991be Assume some TS packet size instead of failing completely.
Fixes ticket #68.
2011-05-07 17:38:18 +02:00
jan gerber
5901cd6236 oggdec:Correct duration
Based on a patch by Reimar Döffinger.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-07 16:21:55 +02:00
Reimar Döffinger
6266c51538 Simplify condition. 2011-05-07 09:47:35 +02:00
Michael Niedermayer
e5a85164b1 Merge remote branch 'qatar/master'
* qatar/master:
  mov: fix composition timestamps on movie fragments.
  wmavoice: Use proper size in memeset().
2011-05-07 04:14:09 +02:00
Michael Niedermayer
c60d2be551 mp3enc:simplify
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-07 04:01:28 +02:00
Michael Niedermayer
e1e8a8ded4 mp3enc:better variable name for the frames field file postion.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-07 04:01:08 +02:00
Michael Niedermayer
4382bc2ceb mp3enc: drop nested structs
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-07 03:59:57 +02:00
Michael Niedermayer
f2a90c3b34 mp3enc:use FFMIN()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-07 03:58:52 +02:00
Michael Niedermayer
01be9331c7 mp3enc:Drop unneeded floating point math.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-07 03:58:51 +02:00
Michael Niedermayer
ec9a5deb20 mp3enc: drop sum and count bytes instead of bitrates from decoded headers.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-07 03:58:17 +02:00
Michael Niedermayer
7d62475656 mp3enc: remove unneeded ifdef
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-07 03:43:12 +02:00
Michael Niedermayer
173c975ead mp3enc: remove unneeded static const variables.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-07 03:43:12 +02:00
Peter Belkner
d62bf5d4e7 mp3enc: mux a XING header
The patch below provides exactly that to the MP3 muxer. A XING header
containing

   * the numer of frames,
   * the size, and
   * a TOC

is generated.

It's based on an idea by Anton Khirnov (restricted to the number of
frames) found at

   http://patches.ffmpeg.org/patch/1891/

The TOC is generated as found in lame's "VbrTag.c".

According to my tests the following reproduces the number of frames, the
size and the TOC in "c.mp3" from "b.mp3" (except a shift due to shorter
XING header generated by FFmpeg):

   lame -V2 a.wav b.mp3
   ffmpeg -i b.mp3 -acodec copy -y c.mp3
2011-05-07 03:27:38 +02:00
Michael Niedermayer
a565c7b7f2 aiffdec:Rewrite get_meta()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-06 17:39:31 +02:00
Yusuke Nakamura
45a811b512 mov: fix composition timestamps on movie fragments.
This fixes, for instance, the case that there is a track that has some samples with composition time offset and has a track run without sample-composition-time-offsets-present.
2011-05-05 22:07:54 -07:00