Commit Graph

12970 Commits

Author SHA1 Message Date
Paul B Mahol fa23f94eac wv: make probing more robust
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-05-15 10:51:30 +00:00
Michael Niedermayer 3ac3edf63b Merge remote-tracking branch 'cehoyos/master'
* cehoyos/master:
  Reduce probing score for flic animation files.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-15 11:37:58 +02:00
Michael Niedermayer c7c71f95f8 replace remaining PIX_FMT_* flags with AV_PIX_FMT_FLAG_*
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-15 11:23:14 +02:00
Carl Eugen Hoyos 86ea021b3a Reduce probing score for flic animation files.
Fixes ticket #2567.
2013-05-15 11:20:39 +02:00
Michael Niedermayer 85de84c3e0 Merge commit '7cbc4cb4424430586ce2d5c0dba81174c6d1db01'
* commit '7cbc4cb4424430586ce2d5c0dba81174c6d1db01':
  fate: update the mmf reference
  mmf: Write metadata into an Optional Data chunk
  jpeg2000dec: Use correct printf length modifier for pointer differences

Conflicts:
	libavformat/mmf.c
	tests/ref/lavf/mmf

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-15 10:15:15 +02:00
Yoshihisa Uchida 3dff1bf99c mmf: Write metadata into an Optional Data chunk
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-05-14 17:14:38 +02:00
Michael Niedermayer dc6f1a8dda avformat/srtdec: Fix pointer corruption
This fixes use of uninitialized memory and possible out of array access

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-14 16:38:33 +02:00
Hendrik Leppkes 37d9784083 md5enc: don't reuse priv_class in two formats
Apparently, this is not allowed and can trip up all sorts of things.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-13 23:39:29 +02:00
Reimar Döffinger 7d1d596817 Add a generic hash API.
Also use this API in framemd5.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2013-05-13 21:42:37 +02:00
Joseph Artsimovich 3967f68053 Better handling for MXF essence reading reaching EOF.
If no metadata follows MXF essence, that is essence ends with EOF,
"Operation not permitted" error was produced and a non-zero code
was returned from ffmpeg executable.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-13 19:03:04 +02:00
Carl Eugen Hoyos 231b331718 Do not read strd chunk in avi files as H264 extradata.
Fixes ticket #2561.
2013-05-13 12:39:44 +02:00
Paul B Mahol d93bc4ef5c redspark: fix memleak in redspark_read_header
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-05-12 12:14:33 +00:00
James Almer 67fad0d221 ADPCM IMA Radical decoder
Signed-off-by: James Almer <jamrial@gmail.com>
2013-05-10 16:53:50 -03:00
James Almer e5e86db178 RedSpark demuxer
Signed-off-by: James Almer <jamrial@gmail.com>
2013-05-10 16:53:02 -03:00
James Almer d3710c51d9 RSD demuxer
Signed-off-by: James Almer <jamrial@gmail.com>
2013-05-10 16:52:10 -03:00
James Almer b4866f717c ADP demuxer
Signed-off-by: James Almer <jamrial@gmail.com>
2013-05-10 16:10:52 -03:00
Michael Niedermayer a079ed63d3 avidec: Enable full parsing for potencoder mpeg1/2
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-10 16:55:06 +02:00
Michael Niedermayer c475a58dd6 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mmf: K&R formatting cosmetics

Conflicts:
	libavformat/mmf.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-10 09:35:33 +02:00
Luca Barbato ee9a4dff4a mmf: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-05-09 16:12:58 +02:00
Michael Niedermayer f302ba4dda Merge commit 'db9aee6ccf183508835acc325f5ad87d595eacc4'
* commit 'db9aee6ccf183508835acc325f5ad87d595eacc4':
  oma: properly forward errors in oma_read_packet

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-08 13:41:45 +02:00
Michael Niedermayer d13bc208da Merge commit '6f98508e2b86dcb79614d8c9b8e97c5e83a21cb0'
* commit '6f98508e2b86dcb79614d8c9b8e97c5e83a21cb0':
  oma: return meaningful errors

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-08 13:37:26 +02:00
Michael Niedermayer 9818bbde53 Merge commit 'e0c53c3408181d2e7d544eb65fc7355a79438dfe'
* commit 'e0c53c3408181d2e7d544eb65fc7355a79438dfe':
  nut: use meaningful error values
  FATE: use a less ambiguous end time for filter-trim-time test

Conflicts:
	libavformat/nutdec.c
	tests/fate/filter-video.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-08 12:47:54 +02:00
Michael Niedermayer a527e69259 avformat/vqf: check number of channels before use.
Fixes division by zero

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-07 22:26:56 +02:00
Luca Barbato db9aee6ccf oma: properly forward errors in oma_read_packet
Prevent spurios EIO on EOF.

CC:libav-stable@libav.org
2013-05-07 14:37:32 +02:00
Luca Barbato 6f98508e2b oma: return meaningful errors 2013-05-07 14:37:32 +02:00
Luca Barbato e0c53c3408 nut: use meaningful error values
Fix the mispresented EINVAL for EOF on partial files, among the other.
2013-05-07 14:37:32 +02:00
Reimar Döffinger 762d4335ae matroska: set "done" only during resync fail.
Fixes playback of test7.mkv validation test file.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2013-05-07 05:30:19 +02:00
Clément Bœsch a82cc54fb5 lavf/mpsub: remove sscanf from probing.
This should make probing faster.
2013-05-06 22:50:59 +02:00
Michael Niedermayer 09602dbe7a wav_seek_tag: fix integer overflow
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-06 10:58:31 +02:00
Michael Niedermayer 5cb9093aa8 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  wav: Always seek to an even offset

Conflicts:
	libavformat/wavdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-06 10:47:49 +02:00
Michael Niedermayer 77c85cbd9d Merge commit '46c1917350f58dfab84e41919e6c02d43950db8c'
* commit '46c1917350f58dfab84e41919e6c02d43950db8c':
  nut: use a define for the nut version
  bgmc: Do not mark ff_bgmc_decode_init() as av_cold

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-06 10:41:43 +02:00
Michael Niedermayer 5c2ccf83df Merge commit '7abd35a1ffaecfd79fa07b801621ee11ab595c43'
* commit '7abd35a1ffaecfd79fa07b801621ee11ab595c43':
  avformat: Add av_cold attributes to init functions missing them

Conflicts:
	libavformat/rtpdec_xiph.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-06 10:19:56 +02:00
Luca Barbato ac87eaf856 wav: Always seek to an even offset
RIFF chunks are aligned to 16bit according to the specification.

Bug-Id:500
CC:libav-stable@libav.org
2013-05-06 09:14:43 +02:00
Luca Barbato 46c1917350 nut: use a define for the nut version
Ease switching version in the future and make evident why that value.
2013-05-06 09:14:43 +02:00
Paul B Mahol f5846dc98c id3v2: stop ignoring text encoding for chapter titles
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-05-06 00:54:13 +00:00
Carl Eugen Hoyos 7c23922c2b Cosmetics: Reindent Sierra vmd demuxer after last commit. 2013-05-05 19:56:46 +02:00
Carl Eugen Hoyos 4ec509ce3d Support demuxing of audio-only vmd files.
Reviewed-by: Paul B Mahol
2013-05-05 19:52:30 +02:00
Diego Biurrun 7abd35a1ff avformat: Add av_cold attributes to init functions missing them 2013-05-05 18:33:04 +02:00
Michael Niedermayer 097f668047 avformat: replace "AVPROBE_SCORE_MAX / X" by AVPROBE_SCORE_EXTENSION / Y
Demuxers where the changed code looked less readable where skiped

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-05 13:34:56 +02:00
Michael Niedermayer fdccb84e3b Merge commit 'c0c2b96c136ec2cbfd808eefc26de399f447d62f'
* commit 'c0c2b96c136ec2cbfd808eefc26de399f447d62f':
  sctp: Add a note on why sctp_recvmsg and sctp_sendmsg have ff_-prefixes
  avs: Increase magic value score above file extension score

Conflicts:
	libavformat/avs.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-05 12:41:36 +02:00
Michael Niedermayer f083b4c338 Merge commit 'e0f8be6413b6a8d334d6052e610af32935c310af'
* commit 'e0f8be6413b6a8d334d6052e610af32935c310af':
  avformat: Add AVPROBE_SCORE_EXTENSION define and use where appropriate

Conflicts:
	libavformat/ac3dec.c
	libavformat/avformat.h
	libavformat/avs.c
	libavformat/m4vdec.c
	libavformat/mov.c
	libavformat/mp3dec.c
	libavformat/mpeg.c
	libavformat/mpegvideodec.c
	libavformat/psxstr.c
	libavformat/pva.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-05 12:31:03 +02:00
Michael Niedermayer 057c5d2e16 Merge commit '72e228b274a98af1aba9588415d0cd87fde44663'
* commit '72e228b274a98af1aba9588415d0cd87fde44663':
  nut: K&R formatting cosmetics

Conflicts:
	libavformat/nut.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-05 11:19:12 +02:00
Diego Biurrun c0c2b96c13 sctp: Add a note on why sctp_recvmsg and sctp_sendmsg have ff_-prefixes 2013-05-04 22:22:17 +02:00
Diego Biurrun a8a45dfe25 avs: Increase magic value score above file extension score
This should fix misdetection of AVS files as AviSynth scripts
when AviSynth support is enabled (Bugzilla #357).
2013-05-04 21:51:00 +02:00
Diego Biurrun e0f8be6413 avformat: Add AVPROBE_SCORE_EXTENSION define and use where appropriate 2013-05-04 21:43:06 +02:00
Diego Biurrun 4d7ed3e735 build: output-example: Add avutil to ELIBS in link command
output-example links against swscale, which depends on avutil.  In standard
configurations, by pure good luck, the libs before swscale pull in all of
swscale's dependencies and linking succeeds.  However, in some configurations
like --disable-asm this is not the case and linking fails.

Hardcode the dependency to avoid a more general Makefile refactoring.
2013-05-04 21:19:49 +02:00
Luca Barbato 72e228b274 nut: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-05-04 20:01:08 +02:00
Michael Niedermayer 30db867cb7 Merge remote-tracking branch 'cigaes/master'
* cigaes/master:
  lavf/matroskaenc: return an error for unsupported types.
  lavf/concatdec: remove invalid check for AVSEEK_FLAG_BACKWARD.
  lavf: filter out AVSEEK_FLAG_BACKWARD in new API.
  lavf: call the new seek API from the old.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-04 17:10:48 +02:00
Nicolas George fa245e432b lavf/matroskaenc: return an error for unsupported types. 2013-05-04 14:12:57 +02:00
Nicolas George d608a27d9e lavf/concatdec: remove invalid check for AVSEEK_FLAG_BACKWARD. 2013-05-04 14:11:53 +02:00
Nicolas George 3fc66dfef2 lavf: filter out AVSEEK_FLAG_BACKWARD in new API.
Also document that it has no effect.
2013-05-04 14:11:53 +02:00
Nicolas George cc24afb45c lavf: call the new seek API from the old.
If the demuxer implements read_seek2() and not read_seek(),
call avformat_seek_file() from av_seek_frame().
Allow to properly seek in formats that only implement the
new API from applications that use the old one.
Tested with mplayer and a concat script.
2013-05-04 14:11:53 +02:00
Michael Niedermayer 23a7c32a7a Merge remote-tracking branch 'qatar/master'
* qatar/master:
  wav: return meaningful errors

Conflicts:
	libavformat/wavdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-04 10:33:50 +02:00
Michael Niedermayer 0104570fb6 Merge commit 'a5f8873620ce502d37d0cc3ef93ada2ea8fb8de7'
* commit 'a5f8873620ce502d37d0cc3ef93ada2ea8fb8de7':
  silly typo fixes

Conflicts:
	doc/protocols.texi
	libavcodec/aacpsy.c
	libavformat/utils.c
	tools/patcheck

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-04 10:17:52 +02:00
Luca Barbato 69467fb64b wav: return meaningful errors 2013-05-03 19:56:06 +02:00
Diego Biurrun a5f8873620 silly typo fixes 2013-05-03 18:26:12 +02:00
Michael Niedermayer 760f7d3a90 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  compat: msvc: Make sure the object files are included when linking statically
  id3v2: check for end of file while unescaping tags

Conflicts:
	configure
	libavformat/id3v2.c

Note, ffmpeg is not affected by the out of buffer write bug

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-03 15:50:01 +02:00
Michael Niedermayer 6537827189 Merge commit 'e3b225a4fe0ff1e64a220b757c6f0a5cf9258521'
* commit 'e3b225a4fe0ff1e64a220b757c6f0a5cf9258521':
  matroskaenc: add an option to put the index at the start of the file

Conflicts:
	doc/muxers.texi
	libavformat/matroskaenc.c
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-03 13:16:34 +02:00
Michael Niedermayer 2e0cc34292 Merge commit '0574bc06d23a6690a16c5926dddc9be359a3d7bb'
* commit '0574bc06d23a6690a16c5926dddc9be359a3d7bb':
  matroskaenc: cosmetics, reorder the #includes

Conflicts:
	libavformat/matroskaenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-03 13:09:23 +02:00
Michael Niedermayer 482c1ac849 Merge commit '13f57a4d881ec669b87bf82f424bfff502433060'
* commit '13f57a4d881ec669b87bf82f424bfff502433060':
  wav: K&R formatting cosmetics

Conflicts:
	libavformat/wavdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-03 11:06:27 +02:00
Luca Barbato af4cc2605c id3v2: check for end of file while unescaping tags
Prevent a serious out of buffer bound write.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2013-05-03 10:21:27 +02:00
Anton Khirnov e3b225a4fe matroskaenc: add an option to put the index at the start of the file 2013-05-03 08:32:35 +02:00
Anton Khirnov 0574bc06d2 matroskaenc: cosmetics, reorder the #includes 2013-05-03 08:26:55 +02:00
Luca Barbato 13f57a4d88 wav: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-05-02 19:04:22 +02:00
Michael Niedermayer fd68371b07 nutdec: Implement duration parsing for indexed nuts
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-02 18:57:29 +02:00
Michael Niedermayer 0beff42823 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  id3v2: K&R formatting cosmetics
  ppc: Only compile AltiVec FFT assembly when AltiVec is enabled

Conflicts:
	libavformat/id3v2.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-02 12:49:23 +02:00
Luca Barbato 0671adbb18 id3v2: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-05-02 11:02:45 +02:00
Michael Niedermayer d602f16a37 Merge remote-tracking branch 'cigaes/master'
* cigaes/master:
  lavc: copy subtitle_header when copying context.
  lavf: data muxer and demuxer.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-01 20:16:26 +02:00
Michael Niedermayer a5ba4e186b Merge commit 'e926b5ceb1962833f0c884a328382bc2eca67aff'
* commit 'e926b5ceb1962833f0c884a328382bc2eca67aff':
  avformat: Drop unnecessary ff_ name prefixes from static functions

Conflicts:
	libavformat/audiointerleave.c
	libavformat/mux.c
	libavformat/mxfenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-01 18:28:48 +02:00
Nicolas George 276fcbde6c lavf: data muxer and demuxer.
Allow to use tools designed to work with demuxers, muxers
and packets (for example ffmpeg itself) to process raw byte
streams (like aviocat).
2013-05-01 11:56:34 +02:00
Diego Biurrun e926b5ceb1 avformat: Drop unnecessary ff_ name prefixes from static functions 2013-04-30 16:16:23 +02:00
Michael Niedermayer 147a45fca4 framecrcenc: workaround design flaw in sidedata palette
This should be reverted once palettes are dealt with in a endian independant way
in packets

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-30 13:35:14 +02:00
Carl Eugen Hoyos 00a61ac755 Recognize j2k as file suffix for the image2 muxer. 2013-04-29 13:11:32 +02:00
Michael Niedermayer 2ac6d6b7cd Merge commit 'c14010541035454b4d3ad08399d70423be4e0c87'
* commit 'c14010541035454b4d3ad08399d70423be4e0c87':
  oma: K&R formatting cosmetics

Conflicts:
	libavformat/omadec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-28 12:18:18 +02:00
Michael Niedermayer 54056c1493 Merge commit 'cf679b9476727a237c8006c685ace18acba149ab'
* commit 'cf679b9476727a237c8006c685ace18acba149ab':
  hls, segment: fix splitting for audio-only streams.

Conflicts:
	libavformat/hlsenc.c
	libavformat/segment.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-28 11:48:40 +02:00
Michael Niedermayer 0fb64da63f avformat: Add black ops audio demuxer
Fixes Ticket2064

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-28 04:21:29 +02:00
Luca Barbato c140105410 oma: K&R formatting cosmetics 2013-04-27 10:53:24 +02:00
Anton Khirnov cf679b9476 hls, segment: fix splitting for audio-only streams.
CC:libav-stable@libav.org
2013-04-27 10:19:04 +02:00
Michael Niedermayer ba323d67fa avformat/write_packet: drop disabled code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-26 14:57:56 +02:00
Michael Niedermayer eba33396f0 avformat/mux: set avoid_negative_ts based on flags if not overridden by user or muxer
This changes the default to avoid negative timestamps.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-26 14:51:47 +02:00
Michael Niedermayer e5891a2337 avformat/movenc: mov/mp4 should support negative timestamps through edit lists
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-26 14:51:47 +02:00
Michael Niedermayer 647f306b46 avformat/mux: assert that timestamps are positive after offsetting them
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-26 14:51:47 +02:00
Michael Niedermayer c329195a27 avformat/mux: use a local variable for offset
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-26 14:51:47 +02:00
Michael Niedermayer 060f14f493 avformat/mux: change avoid_negative_ts code to support later addition of AVStreams
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-26 14:51:47 +02:00
Michael Niedermayer c4bf740225 Merge commit 'c2cb01d418dd18e1cf997c038d37378d773121be'
* commit 'c2cb01d418dd18e1cf997c038d37378d773121be':
  lavf: introduce AVFMT_TS_NEGATIVE

Conflicts:
	libavformat/avformat.h
	libavformat/mux.c
	tests/ref/lavf/asf
	tests/ref/lavf/mkv
	tests/ref/lavf/mpg
	tests/ref/lavf/ts
	tests/ref/seek/lavf-asf
	tests/ref/seek/lavf-mkv
	tests/ref/seek/lavf-mpg
	tests/ref/seek/lavf-ts

This commit does not change the default ts behaviour, such
change will, if its done, be done separately.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-26 10:59:45 +02:00
Luca Barbato c2cb01d418 lavf: introduce AVFMT_TS_NEGATIVE
Most formats do not support negative timestamps, shift them to avoid
unexpected behaviour and a number of bad crashes.

CC:libav-stable@libav.org

Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-04-25 10:13:27 +02:00
Carl Eugen Hoyos 9526c9ccc3 Read block_align from extradata when decoding qclp in aiff.
Fixes ticket #1287.
2013-04-23 16:19:26 +02:00
Paul B Mahol ad56535dd1 avformat: fix orig_pos type to match pkt->pos
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-04-23 13:56:34 +00:00
Michael Niedermayer 74e1aa17df Merge commit 'a0d5ca4f0a8e2c34d784d503a12af6303424ac6a'
* commit 'a0d5ca4f0a8e2c34d784d503a12af6303424ac6a':
  mxfenc: Use correct printf format specifier for int64_t
  h264: Drop unused variable

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-22 18:33:37 +02:00
Michael Niedermayer 645d0384e8 Merge commit 'b845f5e97b655de0a191f736594777fec9754cf5'
* commit 'b845f5e97b655de0a191f736594777fec9754cf5':
  riff: Factor out WAVEFORMATEX parsing

Conflicts:
	libavformat/riff.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-22 12:53:58 +02:00
Michael Niedermayer 05deb05fe9 Merge commit 'a3bf80a5aea577663354bd538e345b283bcb73de'
* commit 'a3bf80a5aea577663354bd538e345b283bcb73de':
  riff: Perform full lookup on WAVEFORMATEXTENSIBLE subformat guid

Conflicts:
	libavformat/riff.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-22 12:36:29 +02:00
Michael Niedermayer 52e40155a8 Merge commit 'e544782623caf1eb4b2429e9c4f35d6b627accba'
* commit 'e544782623caf1eb4b2429e9c4f35d6b627accba':
  riff: Move guid structs and helper functions into riff

Conflicts:
	libavformat/asf.h
	libavformat/riff.c
	libavformat/wtv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-22 12:20:04 +02:00
Diego Biurrun a0d5ca4f0a mxfenc: Use correct printf format specifier for int64_t
libavformat/mxfenc.c:1861:9: warning: format '%lld' expects argument of type 'long long int', but argument 5 has type 'int64_t' [-Wformat]
2013-04-22 12:05:09 +02:00
Michael Niedermayer 369e5dcfc5 Merge commit '8e329dba378cef0ff6400c7df9c51da167d5a1f0'
* commit '8e329dba378cef0ff6400c7df9c51da167d5a1f0':
  riff: check for eof if chunk size and code are 0

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-22 11:46:22 +02:00
Michael Niedermayer e381cc3e4e Merge commit '1c88617b9421c9af8ae961c05d2381b19c585026'
* commit '1c88617b9421c9af8ae961c05d2381b19c585026':
  riff: K&R formatting cosmetics

Conflicts:
	libavformat/riff.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-22 10:50:05 +02:00
Luca Barbato b845f5e97b riff: Factor out WAVEFORMATEX parsing
Makes the code simpler to follow.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-04-21 18:20:30 +02:00
Peter Ross a3bf80a5ae riff: Perform full lookup on WAVEFORMATEXTENSIBLE subformat guid
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-04-21 18:20:30 +02:00
Peter Ross e544782623 riff: Move guid structs and helper functions into riff
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-04-21 18:20:30 +02:00
Luca Barbato 8e329dba37 riff: check for eof if chunk size and code are 0
Prevent an infinite loop.

Inspired by a patch from Michael Niedermayer

CC: libav-stable@libav.org

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-04-21 18:20:30 +02:00
Peter Ross 516089d5d8 riff: Add ACTRAC3+ guid
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-04-21 18:20:30 +02:00
Luca Barbato 1c88617b94 riff: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-04-21 18:20:12 +02:00
Michael Niedermayer 578d9cf7cc mxf_timestamp_to_str: dont leave uninitilaized fields in time.
Fixes CID1005318
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-21 00:26:20 +02:00
Clément Bœsch 67cc31d6c7 lavf/gif: add final_delay option. 2013-04-20 00:11:04 +02:00
Clément Bœsch a16c20569d lavf/gifdec: add loop support.
Loop is ignored by default.
2013-04-20 00:05:35 +02:00
Michael Niedermayer 194d0399a2 Merge commit '505642f18276aed03278ac91b1f334ea888eac6a'
* commit '505642f18276aed03278ac91b1f334ea888eac6a':
  mp3dec: fallback to generic seeking when a TOC is not present

Conflicts:
	libavformat/mp3dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-19 21:36:23 +02:00
Michael Niedermayer 833bc6678f avformat: change seeking index consistency asserts to av_asserts
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-19 17:44:07 +02:00
Clément Bœsch 30e6a02c23 lavf/http: remove duplicated dec flag. 2013-04-19 14:44:58 +02:00
Clément Bœsch 6189ff3679 lavf/gif: avoid forward declaration. 2013-04-19 12:11:10 +02:00
Clément Bœsch a7c5b7a676 lavf/gif: correct the delay after the first frame.
To define accurately the delay between two frames, it is necessary to
have both available. Before this commit, the first frame had a delay of
0; while in practice the problem is not visible in most situation, it is
problematic with low frame rate and large scene change.

This commit notably fixes output generated with commands such as:

  ffmpeg -i big_buck_bunny_1080p_h264.mov
     -vf "select='gt(scene,0.4)',scale=320:-1,setpts=N/TB"
     -frames:v 5 -y out.gif

Also, to avoid odd loop delays, the N-1 delay is duplicated for the last
frame.
2013-04-19 12:02:19 +02:00
Michael Niedermayer 505642f182 mp3dec: fallback to generic seeking when a TOC is not present
Fixes seeking without a Xing/Info header.

CC: libav-stable@libav.org
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-04-19 09:26:34 +02:00
Clément Bœsch 7e57adb464 lavf/gif: fix timing.
pkt->duration can not be used since the values are only based on frame
rate.
2013-04-19 02:15:57 +02:00
Clément Bœsch 13478b270a gif: use only one graphic control extension block per image.
The encoder now doesn't produce any extra graphic control extension
block anymore. Only the image is encoded, and the muxer writing
its own GCE containing notably the timing information now includes the
optional palette transmitted through packet side data.

This commit avoid setting clashes between the two GCE, and reduce the
size of the generated file with pal8 output.
2013-04-19 02:10:59 +02:00
Marton Balint 007989c7a2 mxfdec: fix return variable type for avio_seek
Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-19 01:29:35 +02:00
Michael Niedermayer 020c287f5e avformat: Dont stop probing before the whole id3 tag is read
When a file appears to start with a id3 tag and appears to
also be something else, then try to increase the probe buffer
size if its below its limit.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-18 23:48:32 +02:00
Clément Bœsch 7c1a002c78 subtitles: introduce ASS codec id and use it.
Currently, we have a AV_CODEC_ID_SSA, which matches the way the ASS/SSA
markup is muxed in a standalone .ass/.ssa file. This means the AVPacket
data starts with a "Dialogue:" string, followed by a timing information
(start and end of the event as string) and a trailing CRLF after each
line. One packet can contain several lines. We'll refer to this layout
as "SSA" or "SSA lines".

In matroska, this markup is not stored as such: it has no "Dialogue:"
prefix, it contains a ReadOrder field, the timing information is not in
the payload, and it doesn't contain the trailing CRLF. See [1] for more
info. We'll refer to this layout as "ASS".

Since we have only one common codec for both formats, the matroska
demuxer is constructing an AVPacket following the "SSA lines" format.
This causes several problems, so it was decided to change this into
clean ASS packets.

Some insight about what is changed or unchanged in this commit:

  CODECS
  ------

  - the decoding process still writes "SSA lines" markup inside the ass
    fields of the subtitles rectangles (sub->rects[n]->ass), which is
    still the current common way of representing decoded subtitles
    markup. It is meant to change later.

  - new ASS codec id: AV_CODEC_ID_ASS (which is different from the
    legacy AV_CODEC_ID_SSA)

  - lavc/assdec: the "ass" decoder is renamed into "ssa" (instead of
    "ass") for consistency with the codec id and allows to add a real
    ass decoder. This ass decoder receives clean ASS lines (so it starts
    with a ReadOrder, is followed by the Layer, etc). We make sure this
    is decoded properly in a new ass-line rectangle of the decoded
    subtitles (the ssa decoder OTOH is doing a simple straightforward
    copy). Using the packet timing instead of data string makes sure the
    ass-line now contains the appropriate timing.

  - lavc/assenc: just like the ass decoder, the "ssa" encoder is renamed
    into "ssa" (instead of "ass") for consistency with the codec id, and
    allows to add a real "ass" encoder.

    One important thing about this encoder is that it only supports one
    ass rectangle: we could have put several dialogue events in the
    AVPacket (separated by a \0 for instance) but this would have cause
    trouble for the muxer which needs not only the start time, but also
    the duration: typically, you have merged events with the same start
    time (stored in the AVPacket->pts) but a different duration. At the
    moment, only the matroska do the merge with the SSA-line codec.

    We will need to make sure all the decoders in the future can't add
    more than one rectangle (and only one Dialogue line in it
    obviously).

  FORMATS
  -------

  - lavf/assenc: the .ass/.ssa muxer can take both SSA and ASS packets.
    In the case of ASS packets as input, it adds the timing based on the
    AVPacket pts and duration, and mux it with "Dialogue:", trailing
    CRLF, etc.

  - lavf/assdec: unchanged; it currently still only outputs SSA-lines
    packets.

  - lavf/mkv: the demuxer can now output ASS packets without the need of
    any "SSA-lines" reconstruction hack. It will become the default at
    next libavformat bump, and the SSA support will be dropped from the
    demuxer. The muxer can take ASS packets since it's muxed normally,
    and still supports the old SSA packets. All the SSA support and
    hacks in Matroska code will be dropped at next lavf bump.

[1]: http://www.matroska.org/technical/specs/subtitles/ssa.html
2013-04-18 23:23:59 +02:00
Clément Bœsch 9db1c6455e lavf/gif: support only GIF codec. 2013-04-18 13:53:47 +02:00
Clément Bœsch 01367b0fca lavf/gif: merge gif_write_{packet,video}.
Avoid a pointless split.
2013-04-18 13:42:26 +02:00
Clément Bœsch b7a3f14360 lavf/gif: trim unnecessarily long netscape ext code.
Extension description comments are now placed along the avio calls, the
always defined macro removed, and the always true loop_count check as
well (loop option is bound to 0-65535).
2013-04-18 13:42:14 +02:00
Clément Bœsch 0a0e6877ff lavf/gif: remove unused fields. 2013-04-18 13:40:45 +02:00
Clément Bœsch 28f9858c91 lavf/gif: simplify streams type checking. 2013-04-18 13:40:45 +02:00
Clément Bœsch b6408ffc45 lavf/gif: fix assert in avio API after dfb3231. 2013-04-18 01:13:17 +02:00
Clément Bœsch 91a5b4d480 gif: remove outdated comments. 2013-04-18 00:43:38 +02:00
Clément Bœsch dfb323109c lavf/gif: simplify palette writing. 2013-04-18 00:24:25 +02:00
Clément Bœsch 7b972d82b6 gif: reindent after previous commits. 2013-04-18 00:24:25 +02:00
Clément Bœsch 635389ccfa Cleanse GIF muxer and encoder.
This commit removes the badly duplicated code between the encoder and
the muxer. That may sound surprising, but the encoder is now responsible
from the encoding of the picture when muxing to a .gif file. It also
does not require anymore a manual user intervention such as a -pix_fmt
rgb24 to work properly. To summarize, output gif are now easier to
generate, code is saner and simpler, and files are smaller (thanks to
the lzw encoding which was unused so far with the default .gif output).
We can certainly make things even better, but this is the first step.

FATE is updated because of the output being produced by the encoder and
not the muxer (no lzw in the muxer), and in the seek test only the size
mismatches.

Fixes Ticket #2262
2013-04-18 00:24:25 +02:00
Michael Niedermayer 161dee4321 rmdec: dont return uninitialized data
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-17 02:16:58 +02:00
Carl Eugen Hoyos fe1de12faf Remove two anonymous arrays.
Fixes compilation of pngenc.c and flvdec.c with PGC 13.4-0.
2013-04-17 00:37:05 +02:00
Michael Niedermayer 0ea97a1c5b Merge remote-tracking branch 'qatar/master'
* qatar/master:
  cmdutils: Fix build with lavfi disabled
  flvenc: do not mux more than one stream per type

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-16 23:23:16 +02:00
Rafaël Carré 5b27c307e7 flvenc: do not mux more than one stream per type
FLV does not support multiple audio or video streams.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-04-16 10:31:38 +02:00
Michael Niedermayer 1557f34b10 dfa: support decoding version=1.0
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-15 12:13:41 +02:00
Clément Bœsch e66a10689b lavf/libquvi: fix error reporting. 2013-04-15 01:18:11 +02:00
Clément Bœsch 8de9bb6e5e lavf: remove some flushing in write_packet muxers callbacks.
Since 4f112a8e3, this is not necessary anymore. Also, it allows to
actually disable the flushing.
2013-04-14 21:16:53 +02:00
Michael Niedermayer 536baf6cc5 oggenc: Fix pref_duration AVOption type
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-13 20:30:03 +02:00
Hendrik Leppkes 423089e964 lavf/mxfdec: validate month/day before date formatting
Some implementations of strftime do not like invalid values for
month/day, so ensure it doesn't happen.

Reviewed-by: Matthieu Bouron <matthieu.bouron@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-13 18:07:08 +02:00
Matthieu Bouron c8b3644494 lavf/mxf: fix parsing of timestamps
Correct bit mask for month/day/hour/min/sec values.

For reference the timestamp format specified in S377M is as follow:
  year (int16), month (uint8), day (uint8), hour (uint8), sec (uint8),
  msec (uint8).
A value of 0 for every fields means timestamp "unknown".

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-13 17:26:16 +02:00
Hendrik Leppkes 8da2a3aba3 lavf/mxfdec: use more widely supported time format string
MSVC lacks support for %T and %F, but the standard specifies them
only as shorthands to the long variants.

Reviewed-by: Matthieu Bouron <matthieu.bouron@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-13 16:45:56 +02:00
Hendrik Leppkes cac309611c lavf/mxf: fix parsing of the month from mxf timestamps
Reviewed-by: Matthieu Bouron <matthieu.bouron@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-13 16:02:52 +02:00
Michael Niedermayer 647fe2e777 Merge commit '9e6b5e61a0c91e25e298d0a21b189c4c95443795'
* commit '9e6b5e61a0c91e25e298d0a21b189c4c95443795':
  img2enc: add an option for overwriting one file with subsequent images

Conflicts:
	doc/muxers.texi
	libavformat/img2enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-11 21:50:53 +02:00
Tobias Rapp 7f09b888e8 avienc: fix overflow of audio sample count
Fixes an overflow of the sample count field within the audio stream header
chunk if audio stream data exceeds 2GB.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-11 18:33:24 +02:00
Stephen Hutchinson ff99b42e04 avformat/avisynth: Don't insert null frames or samples at the start of a stream.
This is the last remaining issue from ticket #2412

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-11 16:32:14 +02:00
Michael Niedermayer 580a0600ef Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Move misplaced file author information where it belongs

Conflicts:
	libavcodec/adpcm.c
	libavcodec/adpcmenc.c
	libavcodec/gif.c
	libavcodec/x86/dsputilenc_mmx.c
	libavcodec/x86/fmtconvert_init.c
	libavformat/au.c
	libavformat/gif.c
	libavformat/mov.c
	libavformat/nsvdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-11 15:56:18 +02:00
Marton Balint f1e606c762 mxfdec: update current edit unit when seeking in mxf files without index tables
Fixes audio packet pts values in some files generated by AVID TRMG 3.01.

Signed-off-by: Marton Balint <cus@passwd.hu>
Reviewed-by: Tomas Härdin <tomas.hardin@codemill.se>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-11 13:35:58 +02:00
Anton Khirnov 9e6b5e61a0 img2enc: add an option for overwriting one file with subsequent images
Based on a patch by Michael Niedermayer <michaelni@gmx.at>.
2013-04-11 12:30:44 +02:00
Diego Biurrun ac9362c5d9 Move misplaced file author information where it belongs 2013-04-11 02:42:11 +02:00
Clément Bœsch 2a7f885fe1 lavf: add libquvi demuxer. 2013-04-10 12:09:20 +02:00
James Almer 89388a953a Replace all occurrences of PRI in sscanf() calls with SCN
Signed-off-by: James Almer <jamrial@gmail.com>
2013-04-10 09:56:48 +02:00
d s 685617ac29 avformat/avisynth: Cosmetics
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-10 02:25:34 +02:00
d s ca3cef719e avformat/avisynth: Fix off-by-one error in avisynth demuxer.
Fixes ticket #2412.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-10 02:25:34 +02:00
Michael Niedermayer 4e0130faed Merge remote-tracking branch 'qatar/master'
* qatar/master:
  srtp: Include rtpdec.h for RTP_MAX_PACKET_LENGTH
  rtpdec: Increase max rtp packet size to 8192
  lavf: Use RTP_MAX_PACKET_LENGTH instead of 1500
  h264pred: Add a few missing const declarations for ff_cropTbl derived pointers

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-09 11:36:39 +02:00
Martin Storsjö fc792308c5 srtp: Include rtpdec.h for RTP_MAX_PACKET_LENGTH
This was missed from 350ad50b - this fixes building the fate-srtp
test.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-09 12:04:39 +03:00
Andrew Van Til 0e729b2290 rtpdec: Increase max rtp packet size to 8192
This fixes connecting to "Ceton InfiniTV4 PCIe & USB".

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-09 10:36:56 +03:00
Andrew Van Til 350ad50bf4 lavf: Use RTP_MAX_PACKET_LENGTH instead of 1500
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-09 10:36:43 +03:00
Matthieu Bouron 1f2ce32825 lavf/wavdec: skip padding byte
WAV chunks must be even aligned. This patch skip the extra padding byte
if chunk size is odd.

Fixes ticket #2417.

Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-08 20:13:40 +02:00
Michael Niedermayer 0678c388ba rtsp: add option to set the socket timeout of the lower protocol.
Fixes Ticket2294

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-08 17:45:13 +02:00
Michael Niedermayer c6ae7f64a0 avio.h: fix indention
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-08 14:15:10 +02:00
Michael Niedermayer 8a97f6acc8 Merge remote-tracking branch 'mbouron/master'
* mbouron/master:
  lavf/mxfdec: handle identification metadata

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-08 13:57:36 +02:00
Michael Niedermayer 7cfaf727a1 flvenc: dont call avio_flush() unconditional
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-08 13:31:53 +02:00
Michael Niedermayer a286940da1 mux: also call avio_flush() when flushing the muxer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-08 13:31:12 +02:00
Michael Niedermayer ad6a50c0ed avformat: add writeout_count statistic
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-08 13:30:40 +02:00
Matthieu Bouron 25b143aa7b lavf/mxfdec: handle identification metadata 2013-04-08 11:16:56 +02:00
Michael Niedermayer 38665efcc7 asfenc: convert asserts to av_assert
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-07 03:59:44 +02:00
Clément Bœsch 1fabd95035 lavf/http: use a more compatible default user agent.
Fixes Ticket 2265.
2013-04-06 21:08:32 +02:00
Paul B Mahol 9a8f1e7295 img2dec: make use of AV_OPT_TYPE_IMAGE_SIZE
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-04-05 15:42:25 +00:00
Paul B Mahol 1d5b4f9fe9 img2dec: make use of AV_OPT_TYPE_VIDEO_RATE
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-04-05 15:42:25 +00:00
Paul B Mahol d343848de2 rawvideodec: make use of AV_OPT_TYPE_IMAGE_SIZE
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-04-05 15:42:24 +00:00
Paul B Mahol 9f5bb44021 rawvideodec: make use of AV_OPT_TYPE_VIDEO_RATE
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-04-05 15:42:24 +00:00
Paul B Mahol 4c76600a8c rawdec: make use of AV_OPT_TYPE_VIDEO_RATE
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-04-05 15:42:24 +00:00
Paul B Mahol 3d9a789b0d bintext: make use of AV_OPT_TYPE_IMAGE_SIZE
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-04-05 15:42:24 +00:00
Paul B Mahol 33b6d215fa bintext: make use of AV_OPT_TYPE_VIDEO_RATE
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-04-05 15:42:24 +00:00
Paul B Mahol 8c43fd8654 tty: make use of AV_OPT_TYPE_IMAGE_SIZE
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-04-05 14:30:56 +00:00
Paul B Mahol 20343219d2 tty: make use of AV_OPT_TYPE_VIDEO_RATE
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-04-05 14:24:40 +00:00
Michael Niedermayer 8e85b69d71 Merge commit '8c65264595d5a82c56ae5043320e4b875a414229'
* commit '8c65264595d5a82c56ae5043320e4b875a414229':
  pixdesc/pixfmt: Add XYZ colorspace for XYZ 12-bit values
  img2: Add j2k file extension for JPEG 2000

Conflicts:
	libavutil/pixfmt.h
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-05 12:39:06 +02:00
Andrew Van Til 8df46c65cf rtpdec: Increase max rtp packet size to 8192
Fixes Ticket2314
Fixes connecting to "Ceton InfiniTV4 PCIe & USB"

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-05 01:48:55 +02:00
Andrew Van Til 5ed9eebc24 rtsp/rtp_read_header: Use RTP_MAX_PACKET_LENGTH instead of 1500
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-05 01:48:55 +02:00
Nicolas Bertrand 5e46f6b5b7 img2: Add j2k file extension for JPEG 2000
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-04-04 19:47:05 +02:00
Michael Niedermayer 3b93bea9e3 matroskadec: Check EBML lace sizes.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-04 15:51:04 +02:00
Michael Niedermayer 115c3bc41f matroskadec: Check for overflows in xiph lace decoding
This also detects errors earlier

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-04 15:17:57 +02:00
Michael Niedermayer 14de77d677 matroskadec: fix return code for too long xiph laces
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-04 15:13:53 +02:00
Michael Niedermayer 7ad359b394 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  xmv: do not leak memory in the error paths in xmv_read_header()

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-04 14:35:40 +02:00
Michael Niedermayer 208be6b54a Merge commit 'd1016dccdcb10486245e5d7c186cc31af54b2a9c'
* commit 'd1016dccdcb10486245e5d7c186cc31af54b2a9c':
  xmv: check audio track parameters validity.
  bmv: check for len being valid in bmv_decode_frame().

Conflicts:
	libavformat/xmv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-04 14:20:51 +02:00
Michael Niedermayer cdafcf838c Merge commit '8d617b11cfc87b2c6056fee029ac5bc760af874a'
* commit '8d617b11cfc87b2c6056fee029ac5bc760af874a':
  id3v2: pad the APIC packets as required by lavc.
  dfa: check for invalid access in decode_wdlt().

Conflicts:
	libavformat/id3v2.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-04 13:41:01 +02:00
Michael Niedermayer ab2989378f Merge commit 'dbb1425811a672eddf4acf0513237cdf20f83756'
* commit 'dbb1425811a672eddf4acf0513237cdf20f83756':
  lavf: make sure stream probe data gets freed.
  avfiltergraph: set deprecated filter_count.

Conflicts:
	libavformat/utils.c

See: 44a7a6300d

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-04 13:24:33 +02:00
Michael Niedermayer e7389ed5d0 Merge commit 'bcc94328980e6c56546792ab08b0756abdce310b'
* commit 'bcc94328980e6c56546792ab08b0756abdce310b':
  opt: check the return values of av_get_token for ENOMEM.
  doc: Fix best_nb_channells typo
  matroska: pass the lace size to the matroska_parse_rm_audio

Conflicts:
	libavformat/matroskadec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-04 13:00:59 +02:00
Michael Niedermayer 534b292102 Merge commit '8a96df7b70be509dae9ceec82d2c10a20361356d'
* commit '8a96df7b70be509dae9ceec82d2c10a20361356d':
  matroska: fix a corner case in ebml-lace parsing

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-04 12:46:47 +02:00
Anton Khirnov f8080bd13b xmv: do not leak memory in the error paths in xmv_read_header()
CC: libav-stable@libav.org
2013-04-04 07:54:45 +02:00
Anton Khirnov d1016dccdc xmv: check audio track parameters validity.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-04-04 07:54:35 +02:00
Anton Khirnov 8d617b11cf id3v2: pad the APIC packets as required by lavc.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-04-04 07:54:15 +02:00
Anton Khirnov dbb1425811 lavf: make sure stream probe data gets freed.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-04-04 07:54:00 +02:00
Michael Niedermayer e278500181 oggdec: Support byte based seeking
Fixed Ticket2317

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-04 04:04:24 +02:00
Michael Niedermayer e10f5bd05c avformat: Add a mechanism to allow demuxers to detect byte based seeking.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-04 04:04:24 +02:00
Michael Niedermayer f51ce34e5e matroskadec: fix display_width/height = 0 handling
Fixes Ticket2424

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-03 23:45:32 +02:00
Carl Eugen Hoyos db2d3a9082 Skip padding in an id3 tag in aiff files.
Fixes ticket #2430.

Reviewed-by: Matthieu Bouron
2013-04-03 15:45:46 +02:00
Paul B Mahol e3cc92a623 smacker: fix off by one error
Regression since a93b572ae4.

Fixes #2426.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-04-03 13:01:38 +00:00
Luca Barbato 25a80a931a matroska: pass the lace size to the matroska_parse_rm_audio
Each lace must be independent according to the specification.

Fix heap-buffer-overflow in matroska_parse_block for
corrupted real media in mkv files.

Stricter check than fc43c19a56

CC: libav-stable@libav.org
2013-04-03 12:34:38 +02:00
Luca Barbato 8a96df7b70 matroska: fix a corner case in ebml-lace parsing
Make sure we notice when the lace_size[n] is a negative value.

CC: libav-stable@libav.org
2013-04-03 12:33:15 +02:00
Dale Curtis fc43c19a56 matroska: Update the available size after lace parsing
Fix heap-buffer-overflow in matroska_parse_block for
corrupted real media in mkv files.

CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-04-03 12:33:01 +02:00
Michael Niedermayer 83e2217221 flvdec: fix seeking in audio only files
Fixes Seeking with the file in Ticket2283

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-03 03:57:37 +02:00
Michael Niedermayer ccc25378bd avformat: fix atomatic format selection for (s)segment
Fixes Ticket2236

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-02 21:52:40 +02:00
Michael Niedermayer 24f822c3ab Merge remote-tracking branch 'qatar/master'
* qatar/master:
  oma: Validate sample rates

Conflicts:
	libavformat/oma.c

See: a30165c4a8

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-01 12:48:04 +02:00
Luca Barbato 0933fd1533 oma: Validate sample rates
The sample rate index is 3 bits even if currently index 5, 6 and 7 are
not supported.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-03-31 16:10:52 +02:00
Stephen Hutchinson 8cd7aab1bb Use PIX_FMT_BGR24 for the AviSynth demuxer, instead of RGB24.
Partial fix for ticket #2412 in that using PIX_FMT_BGR24 fixes the
swapped channels issue when using scripts serving RGB24.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-31 01:09:33 +01:00
Carl Eugen Hoyos b448c0a68d Write broken aac frames to mov files instead of skipping them.
Fixes decoding with picky media players.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-30 14:29:15 +01:00
Carl Eugen Hoyos 4d3c5d3b65 Do not show "Estimating duration from bitrate" warning if no duration was estimated. 2013-03-30 08:24:51 +01:00
Michael Niedermayer ef7b6b489a ffmpeg/avformat: factor av_guess_frame_rate() out
This will be used in ffplay

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-29 17:40:28 +01:00
Michael Niedermayer 774a268497 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  flvdec: read audio sample size and channels metadata

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-29 11:02:25 +01:00
Michael Niedermayer 8ed9d34aa7 Merge commit 'c3d015775388882b8a122afc337ea35108f652be'
* commit 'c3d015775388882b8a122afc337ea35108f652be':
  flvdec: use the correct audio codec id when parsing metadata

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-29 10:56:36 +01:00
Michael Niedermayer 24cfe91a22 id3v2: allocate large enough buffer
Fixes array overread

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-29 05:01:38 +01:00
Michael Niedermayer 551f683861 yop: Do not keep a copy of parts of the returned packet
Fixes double free
Regression since the new buffer references, thus no FFmpeg
releases should be affected

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-29 02:11:34 +01:00
Michael Niedermayer 27b7bfc7b5 avidec: Fix demuxing of non seekable avis with multiple RIFFs
This solution uses the size of the first RIFF if its valid
to check frame size validity when the filesize could not be determined.
Feedback is welcome, other ideas and improvments as well!

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-28 17:30:42 +01:00
Michael Niedermayer fd37a7dc3c Merge commit 'cf53704c55378cc0dcfc16637cdac7d58f0b3107'
* commit 'cf53704c55378cc0dcfc16637cdac7d58f0b3107':
  AVOptions: make av_set_options_string() forward options to child objects
  win32: Use 64-bit fstat/lseek variants for MSVC as well
  win32: Make ff_win32_open more robust

Conflicts:
	libavformat/os_support.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-28 12:26:36 +01:00
Justin Ruggles e46a2a7309 flvdec: read audio sample size and channels metadata
This is needed in order for the FLV demuxer not to detect a codec change when
using the "flv_metadata" option.
2013-03-28 06:27:28 -04:00
Justin Ruggles c3d0157753 flvdec: use the correct audio codec id when parsing metadata 2013-03-28 06:27:28 -04:00
Michael Niedermayer ea9a6709a9 estimate_timings_from_bit_rate: Check timebase and bitrate
Fixes integer overflow and assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-28 01:45:01 +01:00
Michael Niedermayer 1831274ff1 electronicarts: check timebase, fix assertion failure
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-28 01:08:46 +01:00
Dale Curtis 81e85bc95c Fix heap-buffer-overflow in matroska_parse_block
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-27 23:51:44 +01:00
Michael Niedermayer 460d30406b avformat: change some seeking related assert to av_asserts
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-27 22:53:57 +01:00
Hendrik Leppkes 85a46ad685 win32: Use 64-bit fstat/lseek variants for MSVC as well
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-27 19:05:58 +02:00
Reimar Döffinger ad04025987 win32: Make ff_win32_open more robust
- Make MultiByteToWideChar fail when it encounters invalid encoding.
  Without this, invalid characters might just be skipped
- When MultiByteToWideChar fails, assume the file name is in CP_ACP
  and open it via normal open function, even when the file will be
  written
- When malloc fails return error instead of crashing

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-27 18:54:46 +02:00
Reimar Döffinger e9cc988395 win32: Allow other programs to open the same files
In order to match Linux behaviour better our Windows-specific
open() replacement should disable Windows default file locking.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-27 18:51:51 +02:00
Kostya Shishkov 472391b9a7 ape: use correct context for the bit table printed in debug 2013-03-27 16:20:08 +01:00
d s 444001bda6 Fix avisynth_context_create constructor error handling.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-27 03:47:49 +01:00
Carl Eugen Hoyos 92a9a3020d Support pcm_mulaw in Hikvision CCTV mpeg program streams.
Fixes decoding the sample from videolan trac ticket #8344.
2013-03-27 02:32:26 +01:00
Carl Eugen Hoyos 7857ddceec Fix a typo in the Monkey's Audio demuxer. 2013-03-27 01:55:11 +01:00
Carl Eugen Hoyos 1741fece70 Only test the first frame for missing aac_adtstoasc bistream filter.
Many players ignore broken aac frames, so don't abort mov or flv
muxing when encountering one, just print a warning instead.

Fixes ticket #2380.
2013-03-26 15:16:07 +01:00
Carl Eugen Hoyos 8af593dd80 mpegtsenc: Only test the first frame for missing h264_mp4toannexb filter.
Many video players accept broken frames in a transport stream, so there
is no reason to abort remuxing when encountering one, just print a
warning instead.

Fixes ticket #1758.
2013-03-26 15:15:46 +01:00
Michael Niedermayer b19604cc4b Merge commit 'f1e9398621af0bc9d166014e4ce6996bb4f141d0'
* commit 'f1e9398621af0bc9d166014e4ce6996bb4f141d0':
  lavc: Rename avpriv_mpv_find_start_code after moving out from mpegvideo

Conflicts:
	libavcodec/h264_parser.c
	libavcodec/internal.h
	libavcodec/mpeg12.c
	libavcodec/utils.c
	libavformat/mpegtsenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-26 13:44:09 +01:00
Michael Niedermayer 795b911bd8 Merge commit '613a37eca4c7b8eefceaa3e0231c23ad090ca94f'
* commit '613a37eca4c7b8eefceaa3e0231c23ad090ca94f':
  ape: 3.80-3.92 decoding support
  h264: Remove an unused variable

Conflicts:
	libavcodec/apedec.c
	libavformat/ape.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-26 13:14:16 +01:00
Martin Storsjö f1e9398621 lavc: Rename avpriv_mpv_find_start_code after moving out from mpegvideo
Also move the declaration to internal.h, and add restrict qualifiers
to the declaration (as in the implementation).

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-26 09:50:02 +02:00
Kostya Shishkov 613a37eca4 ape: 3.80-3.92 decoding support 2013-03-25 18:40:56 +01:00
Nicolas George 4f112a8e34 lavf/mux: add the flush_packets option.
Note: a lot of muxers already do the flushing explicitly.
2013-03-24 23:19:07 +01:00
Piotr Bandurski e26b066cd8 libspeex: support ZygoAudio (quality 10 mode)
Fixes "quality 10" mode from Ticket1873

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-23 15:45:58 +01:00
Michael Niedermayer ac75e0c755 matroskadec: switch to av_assert
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-22 18:04:17 +01:00
Michael Niedermayer c0ff2aaa49 img2: WebP support
Reviewed-by: Pascal Massimino <pascal.massimino@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-22 14:57:27 +01:00
d s b9ad009475 AviSynth demuxer rewrite.
Dynamically loads the library itself, rather than through VfW.
Supports AvxSynth on Linux and OS X.

Supports the new colorspaces added in AviSynth 2.6 when used
with AviSynth 2.6.
2013-03-21 04:11:22 +01:00
Michael Niedermayer 47540c8a68 avformat/avs: increase probe score to preempt conflict with avxsynth
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-21 04:05:51 +01:00
Michael Niedermayer 426ebdf923 Merge remote-tracking branch 'cigaes/master'
* cigaes/master:
  lavfi/vf_yadif: use standard options parsing.
  lavfi/vf_unsharp: use standard options parsing.
  lavfi/vf_transpose: use standard options parsing.
  lavfi/vf_pad: use standard options parsing.
  lavfi/vf_fps: use standard options parsing.
  lavfi/vf_fade: use standard options parsing.
  lavi/vf_drawbox: use standard options parsing.
  lavfi/vf_delogo: use standard options parsing.
  lavfi/vf_decimate: use standard options parsing.
  lavfi/vf_crop: use standard options parsing.
  lavfi/af_volume: use standard options parsing.
  lavfi/vf_tile: use standard options parsing.
  lavfi/avf_concat: use standard options parsing.
  lavfi: add common code to handle options parsing.
  lavf/vobsub: free index pseudo-packet.
  ffmpeg: fix freeing of sub2video frame.
  lavfi: add sine audio source.
  lavu/opt: add AV_OPT_TYPE_DURATION.
  lavfi/concat: fix silence duration computation.
  lavf/concatdec: support seeking.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-20 21:41:26 +01:00
Frank Galligan b853103fe0 matroskadec: Add support for parsing Matroska ContentEncKeyID
This patch adds the enums for the ContentEncryption elements.
This patch also adds support for parsing the ContentEncKeyID. The
ContentEncKeyID is then base64 encoded and stored in the stream's
metadata.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-20 21:29:55 +01:00
Nicolas George cdd78a65f4 lavf/vobsub: free index pseudo-packet. 2013-03-20 21:13:55 +01:00
Nicolas George de1a71595d lavf/concatdec: support seeking. 2013-03-20 20:59:24 +01:00
Michael Niedermayer 710cd0fddf avformat: Fix infinite probing that reads the whole file
Fixes: otonajoshi_avformat_tries_to_load_whole.ts
Reported-by: JEEB (on IRC)
Thanks-to: nevcairiel
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-20 17:57:00 +01:00
Michael Niedermayer 06a43baecd av_find_stream_info: change read_size to 64bit
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-20 17:23:23 +01:00
Nicolas George 0d09aa9d8e lavf: avformat_seek_file(): validate stream_index. 2013-03-20 13:35:24 +01:00
Nicolas George de1568a452 lavf/concatdec: fix possible leak in case of malloc failure.
Fix CID 747737.
2013-03-20 13:35:24 +01:00
Michael Niedermayer e7dd0365f2 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtmp: Pass the parameters to do_adobe_auth in the right order

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-20 12:03:53 +01:00
Michael Niedermayer 17ebef2fc8 Merge commit '2c328a907978b61949fd20f7c991803174337855'
* commit '2c328a907978b61949fd20f7c991803174337855':
  pixdesc: add a function for counting planes in a pixel format.
  avplay: remove the -debug option.
  Revert "asfenc: return error on negative timestamp"

Conflicts:
	doc/APIchanges
	doc/ffplay.texi
	ffplay.c
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-20 11:24:11 +01:00
Martin Storsjö a5e6080a8d rtmp: Pass the parameters to do_adobe_auth in the right order
do_adobe_auth takes the parameters in the order "opaque, challenge".

Due to the way they are treated, this didn't matter in the tested
setups though - if both are set, we only use one. In the tested
setups (Wowza and Akamai) either one of them were null or they
were both set to the same value, which is why this worked before.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-20 12:00:28 +02:00
Stefano Sabatini 608bccf470 lavf/avformat.h: fix a few typos in AVFormatContext:avoid_negative_ts doxy 2013-03-19 17:31:16 +01:00
Michael Niedermayer 4ce03a95e2 lmlm4: check packet_size against lower limit too
Fixes CID732224

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-19 16:30:44 +01:00
Michael Niedermayer 5f476cfe6e avformat/tee: add forgotten ret assignment
Fixes CID991840
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-19 15:09:10 +01:00
Michael Niedermayer fdda9b440c matroska_parse_frame: fix memleak
Fixes CID991856
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-19 14:33:47 +01:00