Commit Graph

7581 Commits

Author SHA1 Message Date
Michael Niedermayer ffb5a0d533 Merge commit '85770f2a2651497861ed938efcd0df3696ff5e45'
* commit '85770f2a2651497861ed938efcd0df3696ff5e45':
  AVOptions: make default_val a union, as proposed in AVOption2.
  Move ff_dynarray_add to lavu and make it public.
  lavf: remove duplicate assignment in avformat_alloc_context.
  lavf: use designated initializers for AVClasses.
  options: simplify av_find_opt by using av_next_option.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-01 00:26:05 +02:00
Reimar Döffinger 1a9f9f81b1 Do not drop packets with no valid ->pos set as e.g. DV-in-AVI produces.
Fixes ticket #140.
2011-04-30 23:06:04 +02:00
Michael Niedermayer ffdc49df25 AVIDEC: use_odmc demuxer specific option. (mostly an exmaple for demuxer specific options)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-30 22:09:15 +02:00
Michael Niedermayer 492026209b LAVFAPI: demuxer specific options.
(someone please add doxy)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-30 22:09:15 +02:00
Michael Niedermayer ce62b35c31 output_example: use avformat_alloc_output_context()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-30 22:09:15 +02:00
Michael Niedermayer 7d727f1338 LAVFAPI: avformat_alloc_output_context() / simplify usage of muxers.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-30 22:09:15 +02:00
Michael Niedermayer a2eef3e9f5 LAVF API: remove AVOutputFormat.set_parameters() the field is unused.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-30 22:09:15 +02:00
Reimar Döffinger 543f3db978 Read the album_artist, grouping and lyrics metadata.
Our muxer writes these out, so we really should support reading them.
Fixes ticket #30.
2011-04-30 11:02:49 +02:00
Anton Khirnov 85770f2a26 AVOptions: make default_val a union, as proposed in AVOption2.
This breaks API and ABI.
2011-04-30 08:34:16 +02:00
Michael Niedermayer be315a3232 Merge remote branch 'qatar/master'
* qatar/master:
Duplicate  AMV: disable DR1 and don't override EMU_EDGE
Duplicate  lavf: inspect more frames for fps when container time base is coarse
Wrong and we have correct fix: Fix races in default av_log handler
  vorbis: Replace sized int_fast integer types with plain int/unsigned.
  Remove disabled non-optimized code variants.
NO  bswap.h: Remove disabled code.
  Remove some disabled printf debug cruft.
  Replace more disabled printf() calls by av_dlog().
NO  tests: Remove disabled code.
NO  Replace some commented-out debug printf() / av_log() messages with av_dlog().
  vorbisdec: Replace some sizeof(type) by sizeof(*variable).
NO  vf_fieldorder: Replace FFmpeg by Libav in license boilerplate.

Conflicts:
	libavcodec/h264.c
	libavcodec/vorbisdec.c
	libavutil/log.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-30 01:58:26 +02:00
Anssi Hannula 7c152a458d lavf: inspect more frames for fps when container time base is coarse
As per issue2629, most 23.976fps matroska H.264 files are incorrectly
detected as 24fps, as the matroska timestamps usually have only
millisecond precision.

Fix that by doubling the amount of timestamps inspected for frame rate
for streams that have coarse time base. This also fixes 29.970 detection
in matroska.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 78431098f9)

Tested with mplayer based on this report
http://thread.gmane.org/gmane.comp.video.mplayer.user/66043/focus=66063

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-04-29 22:46:13 +02:00
Diego Biurrun 2e15305b70 Remove some disabled printf debug cruft. 2011-04-29 20:00:53 +02:00
Anton Khirnov 35ceaa7376 Move ff_dynarray_add to lavu and make it public. 2011-04-29 17:34:56 +02:00
Diego Biurrun 045dd4b928 Replace some commented-out debug printf() / av_log() messages with av_dlog(). 2011-04-29 17:27:01 +02:00
Anton Khirnov 9ac1bf88c0 lavf: remove duplicate assignment in avformat_alloc_context.
AVClass is already initialized in  avformat_get_context_defaults.
2011-04-29 11:42:05 +02:00
Anton Khirnov 4a7a1b7def lavf: use designated initializers for AVClasses. 2011-04-29 11:39:34 +02:00
Michael Niedermayer a3ffe0eb76 Revert "Fix url_fopen() flag values."
No longer needed after martins change to the values.
Though this would have been nicer ABI wise but iam too lazy to maintain this difference

This reverts commit 183401b924.
2011-04-29 04:31:28 +02:00
Michael Niedermayer 455ce979d0 Merge remote branch 'qatar/master'
* qatar/master:
LOTS of duplicates ...
  avio: Fix the deprecated fallback URL-prefixed open flags
  avoid duplicate -lm in .pc files
  mpeg12: terminate mpeg2_video_profiles arrays
  network: Check POLLERR and POLLHUP in ff_network_wait_fd
  mpegtsenc: make PMT PID really start on pmt_start_pid
  nut format: support PIX_FMT_BGR48LE and PIX_FMT_BGR48BE
  rawvideo codec: support PIX_FMT_BGR48LE and PIX_FMT_BGR48BE
  hflip: make the filter accept PIX_FMT_BGR48LE and PIX_FMT_BGR48BE pixel formats
  crop: make the filter accept PIX_FMT_BGR48LE and PIX_FMT_BGR48BE pixel formats
  libswcale: PIX_FMT_BGR48LE and PIX_FMT_BGR48BE scaler implementation

Conflicts:
	configure
	libswscale/swscale.h
	tests/ref/lavf/ts

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-29 04:29:21 +02:00
Martin Storsjö 5b81e29593 avio: Fix the deprecated fallback URL-prefixed open flags
While deprecated, they're totally useless as long as their values
are different from the AVIO_FLAG values that are used internally.
Currently, this leads to old libav applications still compiling
correctly (since we haven't removed the fallback wrappers), but
failing since the functions internally compare to the new AVIO_FLAG
values.

These should be removed at some point, but they aren't removed yet.
The intent is to be able to recompile an old application against
the new ABI without modifying the code, and this doesn't work
currently.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-28 23:28:17 +03:00
Michael Niedermayer 183401b924 Fix url_fopen() flag values.
Reported by: Luca Abeni
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-28 13:20:03 +02:00
Carl Eugen Hoyos 2d8d6882a7 Read channel layout atom in mov files. 2011-04-28 10:47:40 +02:00
Carl Eugen Hoyos dcf008af34 Clarify warning messages. 2011-04-28 10:47:00 +02:00
Carl Eugen Hoyos 91b782720f Move channel chunk reading function to isom.c.
Move ff_read_chan_chunk() to isom.c and rename it as ff_mov_read_chan().
2011-04-28 10:45:32 +02:00
Gil Pedersen f2c85458c4 network: Check POLLERR and POLLHUP in ff_network_wait_fd
Previously, the function would lead to an infinite wait (by
returning AVERROR(EAGAIN)) on sockets indicating an error
via either of these poll flags.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-28 10:28:51 +03:00
Anton Khirnov f8fec05052 mpegtsenc: make PMT PID really start on pmt_start_pid 2011-04-28 07:26:40 +02:00
Peter Ross f9fb574dee nut format: support PIX_FMT_BGR48LE and PIX_FMT_BGR48BE
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-28 07:25:28 +02:00
Carl Eugen Hoyos 058aabd475 Fix caf channel layouts ITU_2_2 and DVD_6. 2011-04-28 00:10:55 +02:00
Michael Niedermayer 7b9e98173c Revert "Eliminate pointless '#if 1' statements without matching '#else'."
no comment

This reverts commit e6ff064845.

Conflicts:

	libavcodec/dsputil.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-27 04:13:28 +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 3788a3c0c0 Merge remote branch 'qatar/master'
* qatar/master:
  graphparser: add a NULL check on the argument passed to strstr
  setdar: prefer "sar" over "par" in log info message
  fade: fix draw_slice() check on fade->factor value
  fade: make draw_slice() chroma check against planes 1 and 2
  win32: include the correct header in cmdutils.c
  ac3: fix memleak in fixed-point encoder
  flashsv: Return more meaningful error values.
  flashsv: Employ explicit AVCodec struct initializers.
  read AVI palette from the end of extradata
  cosmetics: K&R coding style and more whitespace for Flash Screen Video

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-26 04:21:15 +02:00
Reimar Döffinger 7f725f234e Set start_time to 0 for raw audio files.
None of the raw audio files have timestamps, thus setting
start_time to 0 should be reasonable.
2011-04-25 16:51:27 +02:00
Reimar Döffinger 5e9de76f54 Do not set non_interleaved for DV-in-AVI.
It does not make sense (DV is interleaved by design) and
it avoids a crash when the non-interleaved code tries to
use the priv_data of streams created by the DV demuxer.
The crash could be avoided differently, but then that stream
would still lack an index and would not play correctly in
non-interleaved mode.
Fixes e.g. samples/ffmpeg-bugs/roundup/issue1514/Dennis0002_video1.avi
2011-04-25 14:17:59 +02:00
Kostya Shishkov 23f40a0788 read AVI palette from the end of extradata
Official AVI specification says that stream header in case of video contains
BITMAPINFO, which is equal to BITMAPINFOHEADER and optional palette. Currently
lavf AVI demuxer thinks otherwise which produces garbage on codecs that have
both palette and extradata (luckily, there are not so many such codecs).

An example of such file is:
http://samples.multimedia.cx/V-codecs/KMVC/baseball1.avi
(IIRC, MSS1 or MSS2 also had such situation but they are still not supported
by lavc).

As a side note, passing palette in extradata as it's been done previously is
not quite correct since proper _extra_ data is surplus bytes in
BITMAPINFOHEADER, not including palette.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-04-24 23:26:45 -07:00
Peter Ross f27ac6d83c Set channel layout for 4 and 5.1 channel cdata audio files
Patch from Carl Eugen Hoyos (cehoyos at ag dot or dot at)

Signed-off-by: Peter Ross <pross@xvid.org>
2011-04-25 12:13:51 +10:00
Michael Niedermayer 989fb05fe3 Merge remote branch 'qatar/master'
* qatar/master:
  vorbisdec: Employ proper printf format specifiers for uint_fast32_t.
  applehttp: Don't export variant_bitrate if it isn't known
  crypto: Use av_freep instead of av_free
  configure: Add missing libm library dependencies to .pc files.
  oggdec: reindent after 8f3eebd6
  configure: Add missing libavutil inter-library dependencies to .pc files.

Conflicts:
	configure

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-25 02:29:09 +02:00
Carl Eugen Hoyos 03546a9ac8 Support fourcc MMJP.
Fixes ticket #107.
2011-04-25 00:44:48 +02:00
Carl Eugen Hoyos 69cf1824c6 Support fourcc XVIX.
Fixes ticket #106.
2011-04-25 00:44:48 +02:00
Carl Eugen Hoyos a8117a62f4 Support fourcc M263.
Fixes ticket #103.
2011-04-25 00:44:48 +02:00
ami_stuff 3e1c59ebc6 Support fourcc auv2.
Fixes ticket #101.
2011-04-25 00:44:48 +02:00
Michael Niedermayer fbfcc8f1b7 avi: try to synchronize the points in time of the starts of streams after seeking.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-24 22:38:05 +02:00
Michael Niedermayer 8a68697dc6 Add flag to force demuxers to sort more strictly by dts.
This enables non interleaved AVI mode for example.
Players that are picky on strict interleaving can set this.
Patches to only switch to non intereaved AVI mode when the index is not strictly
correctly interleaved are welcome.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-24 21:48:36 +02:00
Martin Storsjö 5f85d49b68 applehttp: Don't export variant_bitrate if it isn't known
If there are no variants, the total bitrate of the single
stream isn't known, and exporting variant_bitrate = 0 does
look weird, since there really aren't any variants.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-24 21:30:03 +03:00
Martin Storsjö ac9cf2e5c4 crypto: Use av_freep instead of av_free
Using av_freep is generally good practice.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-24 21:30:03 +03:00
Michael Niedermayer e3323a1cbd Fix some passing argument from incompatible pointer type warnings.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-24 17:46:50 +02:00
Clément Bœsch dc713546d4 oggdec: reindent after 8f3eebd6
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-04-24 16:45:45 +02:00
Sebastian Vater 183132872a HAM6/HAM8 support for IFF demuxer/decoder
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-24 12:45:19 +02:00
Peter Ross c2a8f12585 EA cdata demuxer: support files with 20 byte header
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-24 03:53:23 +02:00
Peter Ross db62d89833 EA cdata demuxer: support 6 channel files
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-24 03:52:40 +02:00
Peter Ross c8a5e8a894 EA cdata demuxer: set codec->sample_fmt
This is required by has_codec_parameters in libavformat/utils.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-24 03:52:20 +02:00