Commit Graph

13675 Commits

Author SHA1 Message Date
Michael Niedermayer
7f20440b4c Merge commit '7f8d41eb097e8d4223c9caf97dd332a2fdb29d52'
* commit '7f8d41eb097e8d4223c9caf97dd332a2fdb29d52':
  mov: Don't use a negative duration for setting other fields

Conflicts:
	libavformat/mov.c

See: 87d073eacc
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 16:04:41 +02:00
Michael Niedermayer
a1fb3e5127 Merge commit '19b9659f3174599e8685d329c4330b1ea8c4c6db'
* commit '19b9659f3174599e8685d329c4330b1ea8c4c6db':
  oggparseogm: Convert to use bytestream2

Conflicts:
	libavformat/oggparseogm.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 15:50:21 +02:00
Michael Niedermayer
2c8d876dea Merge commit '569d18aa9dc989c37bb4d4b968026fe5afa6fff9'
* commit '569d18aa9dc989c37bb4d4b968026fe5afa6fff9':
  matroskadec: Verify realaudio codec parameters

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 15:25:45 +02:00
Michael Niedermayer
e960b3e27e avformat/utils: Print warning if reallocating probe buffer failed
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 13:09:24 +02:00
Michael Niedermayer
01b4689d20 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtmp: rename main_channel_id to stream_id.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 13:03:50 +02:00
Michael Niedermayer
208f9dd2ef Merge commit 'd4aef997809167832ecc64e89dda8cb445e5fe10'
* commit 'd4aef997809167832ecc64e89dda8cb445e5fe10':
  rtmp: Follow Flash player numbering for channels.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 12:57:19 +02:00
Michael Niedermayer
c71541d42a Merge commit '120af23cd5fcfc539d9575d17d403247ab17109b'
* commit '120af23cd5fcfc539d9575d17d403247ab17109b':
  rtmp: Send video on a separate channel.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 12:52:25 +02:00
Michael Niedermayer
3f760214b4 Merge commit '68b467742092364f9306283f40effde2c12efe08'
* commit '68b467742092364f9306283f40effde2c12efe08':
  lavf: Make probe_codec return an error code

Conflicts:
	libavformat/utils.c

A failure to reallocate should not free the array as it is used
to probe the codec. And failure to reallocate if the following
probe succeeds isnt a fatal error for probe_codec(). Thus this
is only partially merged to ensure probing still is attempted
with the data available.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 12:44:31 +02:00
Michael Niedermayer
7b836487a9 Merge commit '73084391588b0f150737990038829cac5013dd68'
* commit '73084391588b0f150737990038829cac5013dd68':
  lavf: Don't explicitly flush after each written packet in muxers

Conflicts:
	libavformat/assenc.c
	libavformat/yuv4mpeg.c

See: 8de9bb6e5e

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 12:16:55 +02:00
Michael Niedermayer
96e6447d62 Merge commit '596e5d4783ca951258a7c580951fd161f1785ec1'
* commit '596e5d4783ca951258a7c580951fd161f1785ec1':
  lavf: Add a flag to enable/disable per-packet flushing

Conflicts:
	libavformat/avformat.h
	libavformat/mux.c
	libavformat/version.h

This adds a 2nd API to set per packet flushing
If the user application indicates through either a non default then this non default takes
precedence over the other still default value

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 12:01:35 +02:00
Michael Niedermayer
22f79a2d60 Merge commit '0a9425d7cfdf0113c3d32096c9406823efe0cd0a'
* commit '0a9425d7cfdf0113c3d32096c9406823efe0cd0a':
  flv: Do not export datastream as metadata

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 11:44:02 +02:00
Michael Niedermayer
a275ff7e01 Merge commit '92ed83e393d25b6d15920e90d56ee77de54a9728'
* commit '92ed83e393d25b6d15920e90d56ee77de54a9728':
  rtmp: Store all the notify messages

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 11:39:45 +02:00
Michael Niedermayer
9589b61904 Merge commit 'fe0337e89bbbe84b7274fbb0d9d56ed992937931'
* commit 'fe0337e89bbbe84b7274fbb0d9d56ed992937931':
  rtmp: Do not send the first field twice within the handshake

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 11:34:30 +02:00
Michael Niedermayer
c9eb2ce085 Merge commit '666ed7eda1d568638689ac7b0cef0a9e564ffbdf'
* commit '666ed7eda1d568638689ac7b0cef0a9e564ffbdf':
  rtmp: Drop an unneeded warning

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 11:28:16 +02:00
Michael Niedermayer
953a4191b8 Merge commit 'ffb7669e47343ac0caa866361965fdb2bf6ed825'
* commit 'ffb7669e47343ac0caa866361965fdb2bf6ed825':
  rtmp: Support play method in listen mode

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 11:22:54 +02:00
Michael Niedermayer
0483cfe8ca Merge commit '97d35fa89f73468d64f663bfc0686aa6cddd8b6a'
* commit '97d35fa89f73468d64f663bfc0686aa6cddd8b6a':
  rtmp: Factor out publish specific code

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 11:17:11 +02:00
Martin Storsjö
7f8d41eb09 mov: Don't use a negative duration for setting other fields
Some files have the duration set to -1 in the mdhd atom, more
or less legitimately. (We produce such files ourselves, for the
initial duration in fragmented mp4 files.)

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 11:33:37 +03:00
Martin Storsjö
19b9659f31 oggparseogm: Convert to use bytestream2
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 11:33:37 +03:00
Martin Storsjö
569d18aa9d matroskadec: Verify realaudio codec parameters
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 11:22:30 +03:00
Josh Allmann
f8d1bb6723 rtmp: rename main_channel_id to stream_id.
This more closely corresponds to the usage of the field.
Its usage here is unrelated to the channel ID.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 11:03:36 +03:00
Josh Allmann
d4aef99780 rtmp: Follow Flash player numbering for channels.
Channel 4 is typically used by the Flash player to transmit
audio, channel 6 for video, and various stream-specific invokes
get sent over channel 8, which is designated the source channel.

This more closely matches the behavior of the Flash player,
including the transmission of play requests over channel 8.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 11:03:36 +03:00
Josh Allmann
120af23cd5 rtmp: Send video on a separate channel.
Sending non-monotonic packets (e.g. when the audio and video
streams are monotonic within themselves but not muxed
monotonically) will lead to negative values the RTMP timestamp
field (where timestamps are transmitted only as deltas for each
channel), and this delta can end up being incorrectly written as
a large unsigned number.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 11:03:36 +03:00
Michael Niedermayer
7dea2eab7e Merge remote-tracking branch 'cehoyos/master'
* cehoyos/master:
  Do not suggest to increase probesize for image2 files.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 00:27:40 +02:00
Carl Eugen Hoyos
5c2be81b39 Do not suggest to increase probesize for image2 files. 2013-09-17 00:08:12 +02:00
Vignesh Venkatasubramanian
bcac6b438e lavf/oggopus: Fixing a log message
Re-wording a log message that's no longer true and changing its
severity level to debug.

Signed-off by: Vignesh Venkatasubramanian <vigneshv@google.com>

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-16 23:46:39 +02:00
Michael Niedermayer
b9e7bde6bd lavf/avienc: use av_freep() avoid stale pointers
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-16 22:49:17 +02:00
Alexandra Khirnova
68b4677420 lavf: Make probe_codec return an error code
This allows handling errors from av_realloc properly.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-16 22:28:23 +03:00
Clément Bœsch
7308439158 lavf: Don't explicitly flush after each written packet in muxers
Since 596e5d4783, this is not necessary anymore. It also allows to
actually disable the flushing, improving write performance (but
possibly giving worse latency in real-time streaming).

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-16 22:17:33 +03:00
Luca Barbato
596e5d4783 lavf: Add a flag to enable/disable per-packet flushing
This is enabled by default and can be disabled with
"-fflags -flush_packets".

Inspired by a patch from Nicolas George <nicolas.george@normalesup.org>.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-16 22:11:08 +03:00
Paul B Mahol
c051d668b5 avformat/avidec: use av_calloc() and check for allocation error
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-09-16 18:53:28 +00:00
Vignesh Venkatasubramanian
23637f98f4 lavf/ogg: Support for end trimming Opus
Adding support for end trimming Opus embedded in Ogg container.

Signed-Off By: Vignesh Venkatasubramanian <vigneshv@google.com>

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-16 21:42:41 +02:00
Luca Barbato
0a9425d7cf flv: Do not export datastream as metadata
It is used internally.
2013-09-16 19:36:37 +02:00
Luca Barbato
92ed83e393 rtmp: Store all the notify messages
The onTextData is used to implement text data streams in flv.
2013-09-16 19:36:37 +02:00
Luca Barbato
fe0337e89b rtmp: Do not send the first field twice within the handshake 2013-09-16 19:36:37 +02:00
Luca Barbato
666ed7eda1 rtmp: Drop an unneeded warning
Apparently a widely used streaming server requires that the second
field always presents a version during C1 phase.
2013-09-16 19:36:37 +02:00
Luca Barbato
ffb7669e47 rtmp: Support play method in listen mode 2013-09-16 19:36:37 +02:00
Luca Barbato
97d35fa89f rtmp: Factor out publish specific code
Will be reused for supporting play.
2013-09-16 19:36:37 +02:00
Paul B Mahol
42b8f5fba1 avformat/segafilm: remove deplanarization hack
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-09-16 13:30:20 +00:00
Paul B Mahol
ca5456db7f avformat/segafilm: use av_freep()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-09-16 13:12:45 +00:00
Michael Niedermayer
02f56bfcc3 avformat/sierravmd: use av_freep() for freeing context fields
This ensures that there are no stale pointers

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-16 14:53:56 +02:00
Michael Niedermayer
ff0a382758 Merge commit '5bbfe193a0a41bd2adb648c8c3f6901a575734a2'
* commit '5bbfe193a0a41bd2adb648c8c3f6901a575734a2':
  vocdec: Don't update codec parameters mid-stream

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-16 12:38:56 +02:00
Michael Niedermayer
cfa909ef5b Merge commit '0ef1660a6365ce60ead8858936b6f3f8ea862826'
* commit '0ef1660a6365ce60ead8858936b6f3f8ea862826':
  sierravmd: Do sanity checking of frame sizes

Conflicts:
	libavformat/sierravmd.c

See: 47c4713a23
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-16 12:32:24 +02:00
Michael Niedermayer
a444ddff03 Merge commit '342c43d154e586bc022c86b168fe8d36f69da9d3'
* commit '342c43d154e586bc022c86b168fe8d36f69da9d3':
  omadec: Properly check lengths before incrementing the position

See: f1d6f013b2
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-16 12:15:42 +02:00
Martin Storsjö
5bbfe193a0 vocdec: Don't update codec parameters mid-stream
If we really want to support parameter changes, they need to be
signalled along with the AVPackets as parameter change side data,
not just changing the AVCodecContext parameters when a packet
is demuxed (since there may be other earlier packets yet undecoded).

Something similar was already done for the sample rate in 0883109b2,
but some parameters were left changeable.

This avoids having to recheck the channel count for validity for
each decoded frame in (ad)pcm decoders, unless the decoders
explicitly say that they accept parameter changes.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-16 11:04:52 +03:00
Martin Storsjö
0ef1660a63 sierravmd: Do sanity checking of frame sizes
Limit the size to INT_MAX/2 (for simplicity) to be sure that
size + BYTES_PER_FRAME_RECORD won't overflow.

Also factorize other existing error return paths.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-16 11:04:52 +03:00
Martin Storsjö
342c43d154 omadec: Properly check lengths before incrementing the position
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-16 11:04:52 +03:00
Compn
9ea3598085 riff: g723_1 decodes vivo g723.1 in asf
works on bellair_digital_movie.asf
2013-09-15 22:03:03 -04:00
Alexander Strasser
069010ffae lavf/subtitles: Make comment less arrogant
Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
2013-09-15 22:37:13 +02:00
James Almer
5ab7b3b948 matroskadec: Mute "Unknown entry" log messages for CueRelativePosition entries
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-15 12:57:19 +02:00
James Almer
d59213b5d3 matroskaenc: Bump DocTypeVersion to 4
The muxer has been creating files with v4 elements for some time now,
and especially now that we can mux non-experimental Opus files, reporting
the DocTypeVersion as 2 is not correct.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-15 02:08:15 +02:00
Paul B Mahol
f2afe96181 avformat/nutenc: use av_reallocp_array()
Fixes memleak on allocation error.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-09-14 16:14:43 +00:00
Paul B Mahol
6a70feadb0 avformat/nutenc: use av_calloc()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-09-14 16:14:43 +00:00
Vignesh Venkatasubramanian
b7bd68853d lavf/matroska: Removing experimental suffix for Opus
Removing the /EXPERIMENTAL suffix for codec id field for Opus. Doing this
as the implementation of embedding Opus in Matroska is complete.

Signed-Off By: Vignesh Venkatasubramanian <vigneshv@google.com>

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-12 23:55:29 +02:00
Michael Niedermayer
e2774b3e3b Merge remote-tracking branch 'cehoyos/master'
* cehoyos/master:
  Set bits_per_raw_sample when reading j2k frames.
  libopenjpegdec.c: Correctly scale gray16 output if precision < 16
  Use rc_max_rate if no video bit_rate was specified when muxing mxf_d10.
  Store the video bit_rate in the context when muxing mxf.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-12 22:19:46 +02:00
Michael Niedermayer
d2d96f9e47 vformat/smacker: use av_freep() to ensure no stale pointers remain
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-12 16:17:32 +02:00
Michael Niedermayer
ba5e77814e Merge remote-tracking branch 'qatar/master'
* qatar/master:
  matroskaenc: Fix stray pointers left over from av_reallocp_array refactoring

Conflicts:
	libavformat/matroskaenc.c

Mostly not merged as the buggy code was no longer part of FFmpeg

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-12 15:26:06 +02:00
Michael Niedermayer
44fb7de8ee Merge commit 'c0779a67e85df856904ee6fab760c4233d4c2be5'
* commit 'c0779a67e85df856904ee6fab760c4233d4c2be5':
  mp3: add .mpa extension

Conflicts:
	libavformat/mp3dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-12 15:02:23 +02:00
Michael Niedermayer
83d2b7e9a2 Merge commit '17d57848fc14e82f76a65ffb25c90f2f011dc4a0'
* commit '17d57848fc14e82f76a65ffb25c90f2f011dc4a0':
  mpc8: Make sure the first stream exists before parsing the seek table

Conflicts:
	libavformat/mpc8.c

See: 69fb605ad5
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-12 14:31:07 +02:00
Michael Niedermayer
ad9a877a6d Merge commit '459f2b393a3f89ed08d10fbceb4738d1429f268e'
* commit '459f2b393a3f89ed08d10fbceb4738d1429f268e':
  mpc8: Check the seek table size parsed from the bitstream

Conflicts:
	libavformat/mpc8.c

See: b61ba262a1
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-12 14:10:17 +02:00
Michael Niedermayer
fcfbc58a1c Merge commit '183b9d843a9533774fabd3984a52f3987001acbc'
* commit '183b9d843a9533774fabd3984a52f3987001acbc':
  ape: Don't allow the seektable to be omitted

See: e7cb161515
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-12 13:51:20 +02:00
Alexandra Khirnova
00a63bfb87 matroskaenc: Fix stray pointers left over from av_reallocp_array refactoring
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-09-12 13:16:15 +02:00
Vittorio Giovara
c0779a67e8 mp3: add .mpa extension
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-09-12 13:16:15 +02:00
Michael Niedermayer
c16cd55593 Merge commit '710b0e27025948b7511821c2f888ff2d74a59e14'
* commit '710b0e27025948b7511821c2f888ff2d74a59e14':
  smacker: Avoid integer overflow when allocating packets

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-12 11:39:18 +02:00
Michael Niedermayer
33cf70a8b8 Merge commit '8d928023f953a28692ba27071a448259134b103b'
* commit '8d928023f953a28692ba27071a448259134b103b':
  smacker: Don't return packets in unallocated streams

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-12 11:26:17 +02:00
Michael Niedermayer
7e88dbe935 Merge commit '48d6556dd46d4f4fac10d0f4a819e314887cd50e'
* commit '48d6556dd46d4f4fac10d0f4a819e314887cd50e':
  dsicin: Add some basic sanity checks for fields read from the file

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-12 11:19:38 +02:00
Martin Storsjö
17d57848fc mpc8: Make sure the first stream exists before parsing the seek table
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-12 10:54:27 +03:00
Martin Storsjö
459f2b393a mpc8: Check the seek table size parsed from the bitstream
Limit the size to INT_MAX/2 (for simplicity) to be sure that
size + FF_INPUT_BUFFER_PADDING_SIZE won't overflow.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-12 10:54:05 +03:00
Martin Storsjö
183b9d843a ape: Don't allow the seektable to be omitted
The seektable is required for filling in ape->frames[i].pos
further down.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-12 10:53:25 +03:00
Carl Eugen Hoyos
d73565d5dd Use rc_max_rate if no video bit_rate was specified when muxing mxf_d10.
Fixes ticket #2945.

Reviewed-by: Matthieu Bouron
2013-09-12 08:58:27 +02:00
Carl Eugen Hoyos
52cf08b4c8 Store the video bit_rate in the context when muxing mxf.
This will allow using rc_max_rate if no bit_rate is specified (on remuxing).

Reviewed-by: Matthieu Bouron
2013-09-12 08:58:27 +02:00
Martin Storsjö
710b0e2702 smacker: Avoid integer overflow when allocating packets
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-11 20:19:43 +03:00
Martin Storsjö
8d928023f9 smacker: Don't return packets in unallocated streams
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-11 20:19:12 +03:00
Martin Storsjö
48d6556dd4 dsicin: Add some basic sanity checks for fields read from the file
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-11 20:18:55 +03:00
Paul B Mahol
269845db86 avformat/nutdec: check for allocation failures
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-09-11 15:04:08 +00:00
Michael Niedermayer
2a1c24a267 avformat/utils: use av_realloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-11 13:38:53 +02:00
Michael Niedermayer
c5714097eb avformat/mxfdec: use av_realloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-11 13:37:31 +02:00
Michael Niedermayer
9bca8e5341 avformat/matroskaenc: use av_realloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-11 13:36:11 +02:00
Michael Niedermayer
e529082369 avformat/matroskadec: use av_realloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-11 13:34:25 +02:00
Michael Niedermayer
b5b34c1983 avformat/matroskaenc: use av_freep() to avoid leaving stale pointers
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-11 13:28:41 +02:00
Michael Niedermayer
2175f76894 avformat/asfenc: use av_freep() for extra saftey
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-11 13:21:11 +02:00
Michael Niedermayer
2832a82e17 avformat/gxfenc: Clear nb_fields on array deallocation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-11 13:21:11 +02:00
Michael Niedermayer
a6ca08f1af avformat/gxfenc: Check and propagate return code from gxf_write_map_packet()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-11 13:21:11 +02:00
Paul B Mahol
9e505485f3 avformat/smacker: check avformat_new_stream() return value
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-09-11 11:12:35 +00:00
Paul B Mahol
848ad8db22 avformat/libnut: check avformat_new_stream() return value
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-09-11 11:06:45 +00:00
Paul B Mahol
f2e614e7e9 avformat/ffmetadec: return meaningful error codes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-09-11 11:06:44 +00:00
Paul B Mahol
60caa3d8bc avformat/sierravmd: check for memory allocation failures
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-09-11 11:06:44 +00:00
Paul B Mahol
00e1bf8a58 avformat/flic: check for memory allocation failures
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-09-11 11:06:44 +00:00
Michael Niedermayer
8c9d6ee4f2 avformat/utils: functions that add entries should not destroy the whole list on failure
The caller does not expect this, and in case of adding new streams would then
not even be able to deallocate them anymore.

This reverts a hunk from "avformat: Use av_reallocp_array() where suitable"

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-11 12:21:21 +02:00
Michael Niedermayer
5ca39a0b89 avformat/mxfdec: functions that add entries should not destroy the whole list on failure
The caller does not expect this and there are variables left that index to otherwise
deallocated data.

This reverts a hunk from "avformat: Use av_reallocp_array() where suitable"

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-11 12:19:17 +02:00
Michael Niedermayer
c9367c0709 avformat/matroskaenc: functions that add entries should not destroy the whole list on failure
This reverts a hunk from "avformat: Use av_reallocp_array() where suitable"

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-11 12:16:21 +02:00
Michael Niedermayer
32805f8521 avformat/matroskadec: ebml_parse_elem() should not deallocate priorly existing lists on failure
This reverts a hunk from "avformat: Use av_reallocp_array() where suitable"

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-11 12:15:08 +02:00
Michael Niedermayer
cbe47b1e84 Merge commit 'f369b9356c4606cd4d713d60f7db5de119d901fa'
* commit 'f369b9356c4606cd4d713d60f7db5de119d901fa':
  avformat: Use av_reallocp_array() where suitable

Conflicts:
	libavformat/asfenc.c
	libavformat/gxfenc.c
	libavformat/mov.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-11 11:23:40 +02:00
Vignesh Venkatasubramanian
7b0a839b0b opus/matroska: Adding support for End Trimming in demuxer/decoder
Implementing support for end trimming Opus in Matroska by making
use of the DiscardPadding value from the container and discarding
the samples accordingly.

Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-10 23:11:15 +02:00
Piotr Bandurski
5cfa51929f avformat/riff: add 0x594a TwoCC
sample:

http://samples.mplayerhq.hu/game-formats/wc4-xan/crusader-no-regret.avi

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-10 12:44:26 +02:00
Alexandra Khirnova
f369b9356c avformat: Use av_reallocp_array() where suitable
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-09-10 12:38:32 +02:00
Michael Niedermayer
46405813c3 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  movenc: Simplify setting the fragmentation flag

Conflicts:
	libavformat/movenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-10 10:20:11 +02:00
Michael Niedermayer
ada9b17e7a Merge commit '8b524ab0c43c1767919530abb79d3656113cdc47'
* commit '8b524ab0c43c1767919530abb79d3656113cdc47':
  movenc: Add a warning message if conflicting options have been specified

Conflicts:
	libavformat/movenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-10 10:08:38 +02:00
Michael Niedermayer
f7003c7a3b Merge remote-tracking branch 'cehoyos/master'
* cehoyos/master:
  Use 0x88 as stream id when muxing DTS in program streams.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-10 02:05:13 +02:00
Carl Eugen Hoyos
fe8e01361f Use 0x88 as stream id when muxing DTS in program streams.
This is what other open source software uses and what
some hardware players expect.
Tested by trac user iuqbgq9h-1 at yahoo
2013-09-10 01:48:59 +02:00
Vignesh Venkatasubramanian
d92b1b1bab lavf/matroska: Adding support for Opus CodecDelay
In order to represent the codec delay accurately in Matroska, a
new element CodecDelay has been introduced. It contains the
overall delay added by the codec in nanoseconds. This patch adds
support for muxing CodecDelay value in the container.
Matroska spec for CodecDelay element can be found here:
http://matroska.org/technical/specs/index.html#CodecDelay

Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-10 01:45:38 +02:00
Vignesh Venkatasubramanian
bb47aa5850 opus/matroska: Adding support for DiscardPadding in muxer
Support for end trimming Opus in Matroska is implemented by using
the DiscardPadding container element in the Block data. The last
chunk is stored as a Block instead of SimpleBlock and the
trimming information is stored and used to discard samples that
were padded by the Opus codec. This patch adds support for muxing
DiscardPadding element into the container with appropriate value.
Matroska spec for the DiscardPadding element can be found here:
http://matroska.org/technical/specs/index.html#DiscardPadding

Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-10 01:04:06 +02:00
Martin Storsjö
bdf990425e movenc: Simplify setting the fragmentation flag
This makes sure the faststart vs fragmentation check works as
intended when fragmentation is enabled due to using the ismv mode.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-09 23:58:33 +03:00
Martin Storsjö
8b524ab0c4 movenc: Add a warning message if conflicting options have been specified
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-09 23:57:41 +03:00
Martin Storsjö
a6a4596e12 tcp: Explicitly convert a pointer to a boolean integer
This fixes warnings about making integers from pointers without
a cast, and avoids the theoretical case where the lower 32 bits of
the pointer would all be zero where the implicit cast wouldn't give
the right result.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-09 23:57:04 +03:00
Paul B Mahol
81f231b5c7 avcodec/asfdec: check return value of av_mallocz()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-09-09 12:09:31 +00:00
Michael Niedermayer
8586d8dda2 avformat/avidec: fix signedness of pointer type in get_stream_idx()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-08 19:02:19 +02:00
Clément Bœsch
378a830e7b avformat/subtitles: support standalone CR (MacOS).
Recent .srt files with CR only were found in the wild.
2013-09-08 18:48:35 +02:00
Clément Bœsch
90fc00a623 avformat/subtitles: add a next line jumper and use it.
This fixes a bunch of possible overread in avformat with the idiom p +=
strcspn(p, "\n") + 1 (strcspn() can focus on the trailing '\0' if no
'\n' is found, so the +1 leads to an overread).

Note on lavf/matroskaenc: no extra subtitles.o Makefile dependency is
added because only the header is required for ff_subtitles_next_line().

Note on lavf/mpsubdec: code gets slightly complex to avoid an infinite
loop in the probing since there is no more forced increment.
2013-09-08 18:48:09 +02:00
Clément Bœsch
cfcd55db16 avformat/srtdec: skip initial random line breaks.
I found a bunch of (recent) SRT files in the wild with 3 to 10 line
breaks at the beginning.
2013-09-08 18:37:07 +02:00
Paul B Mahol
14851ca5f5 avformat/matroskaenc: remove bogus prores tag
Fixes: ffmpeg -i input -c:v prores output.mkv

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-09-08 13:03:08 +00:00
Clément Bœsch
b1319e14e3 avformat/subtitles: binary search seeking. 2013-09-08 12:54:49 +02:00
Clément Bœsch
1ca4bf930b avformat/subtitles: check lower bound for duration overlap seeking. 2013-09-08 12:54:49 +02:00
Clément Bœsch
f8678dcef3 avformat/vobsub: fix seeking. 2013-09-08 12:54:49 +02:00
Michael Niedermayer
53fb52ac85 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  lavf: fix the comparison in an overflow check

Conflicts:
	libavformat/utils.c

See: a5d67bc796
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-08 12:29:07 +02:00
Michael Niedermayer
13e35a25f6 Merge commit '7ee191cab0dc44700f26c5784e2adeb6a779651b'
* commit '7ee191cab0dc44700f26c5784e2adeb6a779651b':
  dv: Add a guard to not overread the ppcm array

See: 3669915e93
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-08 11:51:36 +02:00
Michael Niedermayer
c4c3a3d580 vformat/tee: fix uninitialized use of ret
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-07 22:43:32 +02:00
Anton Khirnov
26f027fba1 lavf: fix the comparison in an overflow check
CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-09-07 11:52:40 +02:00
Luca Barbato
7ee191cab0 dv: Add a guard to not overread the ppcm array
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-09-07 11:18:01 +02:00
Michael Niedermayer
86ca6a7568 Merge commit '97b052e56807fab6887e9ba210a28a622e6a4b78'
* commit '97b052e56807fab6887e9ba210a28a622e6a4b78':
  avisynth: Add missing #include for NULL_IF_CONFIG_SMALL

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-06 13:39:15 +02:00
Diego Biurrun
c16ddcc90b avisynth: K&R formatting cosmetics 2013-09-06 11:13:36 +02:00
Diego Biurrun
97b052e568 avisynth: Add missing #include for NULL_IF_CONFIG_SMALL 2013-09-06 09:09:07 +02:00
Michael Niedermayer
2230d85ceb Merge remote-tracking branch 'qatar/master'
* qatar/master:
  matroskaenc: Allow chapters to be written in trailer

Conflicts:
	libavformat/matroskaenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-05 13:34:37 +02:00
Clément Bœsch
36cd017acd avformat: make avformat_close_input() more tolerant.
The purpose of this commit is to make error management simpler and less
error prone, just like av_free() which is safe with NULL.
2013-09-04 22:06:38 +02:00
John Stebbins
26b241c079 matroskaenc: Allow chapters to be written in trailer
This allows creation of frame accurate chapter marks from sources like
DVD and BD where the precise chapter location is not known until the
chapter mark has been reached during reading.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-09-04 20:30:43 +02:00
Michael Niedermayer
9411e9cafb Merge commit 'd719981273bc779c7d1e879d88404fd867f93a0e'
* commit 'd719981273bc779c7d1e879d88404fd867f93a0e':
  4xm: Check that the read track value is non-negative

Conflicts:
	libavformat/4xm.c

See: 0838cfdc8a
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-04 12:20:53 +02:00
Michael Niedermayer
233ab0f02a Merge commit '5bcd3ae5b167fb74215520b01d5d810e0c8986ab'
* commit '5bcd3ae5b167fb74215520b01d5d810e0c8986ab':
  matroskadec: Check that .lang was allocated and set before reading it

Conflicts:
	libavformat/matroskadec.c

See: 01fd1aa0ad
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-04 12:07:06 +02:00
Michael Niedermayer
e5c338ba7a avformat/utils: assert position monotonicity in ff_find_last_ts()
This ensures that no read timestamp functions finds packets before the search window in ff_find_last_ts()
which could cause an infinite loop

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-04 01:45:13 +02:00
Michael Niedermayer
a660991921 avformat/mpegts: Ensure that mpegts_get_dts() only considers packets at or after the given position
This fixes an infinite loop
An alternative fix would be to revert d73cbc22c5
but that would worsen error resilience.

Found-by: Justin Ruggles
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-04 01:02:06 +02:00
Martin Storsjö
d719981273 4xm: Check that the read track value is non-negative
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-03 22:57:36 +03:00
Martin Storsjö
5bcd3ae5b1 matroskadec: Check that .lang was allocated and set before reading it
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-03 22:57:15 +03:00
Clément Bœsch
493ebbd7eb Update copyrights where my email appears with the new one. 2013-09-03 20:42:24 +02:00
wm4
060c6c4647 avformat/mpl2dec: handle files with CRLF linebreaks correctly
Skip the "\r" as normal text. Otherwise it will be the first character
of the string passed to sscanf(), which then fill fail to match the
timestamps.

Signed-off-by: Clément Bœsch <u@pkh.me>
2013-09-03 20:38:40 +02:00
Dirk Farin
902a5fa722 avformat: H265 demuxer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-03 19:34:04 +02:00
Michael Niedermayer
40bb950385 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  movenc: Don't flush after each written packet

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-03 15:18:57 +02:00
Michael Niedermayer
4cfe3b7405 Merge commit '7df9e693a34c84c698da60426c78140c950f95ed'
* commit '7df9e693a34c84c698da60426c78140c950f95ed':
  cosmetics: Fix ATRAC codec name spelling

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-03 15:05:18 +02:00
Michael Niedermayer
50fd98b7ac Merge commit '488b2984fece7ad0c2596826fee18e74aa904667'
* commit '488b2984fece7ad0c2596826fee18e74aa904667':
  ape demuxer: check for EOF in potentially long loops

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-03 14:58:55 +02:00
Michael Niedermayer
bdb4ed963f Merge commit 'a7c1689dedd11689edb30088d467ac03f9b8d1cf'
* commit 'a7c1689dedd11689edb30088d467ac03f9b8d1cf':
  4xm: check that bits per sample is strictly positive

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-03 14:57:14 +02:00
Michael Niedermayer
a5d67bc796 avformat/utils: Fix bitrate overflow check
The check added in df33a58e53 does not work
at all, rather it broke the summing of bitrates completely.
The comparission was wrong way around.
This commit replaces it by a simpler and hopefully clearer check

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-03 14:49:03 +02:00
Michael Niedermayer
d07d54fd56 Merge commit 'df33a58e5311ee9a64a573889b883a80e981af7b'
* commit 'df33a58e5311ee9a64a573889b883a80e981af7b':
  lavf: avoid integer overflow when estimating bitrate

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-03 14:45:53 +02:00
Michael Niedermayer
b0ba2bf8c6 Merge commit 'fab694dd3931b1c0bc3c598c3f88b1902c14a303'
* commit 'fab694dd3931b1c0bc3c598c3f88b1902c14a303':
  lavf: move a variable declaration to the block where it's used

Conflicts:
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-03 14:27:48 +02:00
Compn
8d14596bc2 riff: add 0x64 to g726 works on g726-test1.wav 2013-09-03 08:25:43 -04:00
Martin Storsjö
0fbda03e5c movenc: Don't flush after each written packet
This should improve write performance quite significantly.
---
Tested with both writing a normal mp4, by using the faststart
feature and writing a fragmented mp4 file; all turn out with the
same md5sum as before.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-03 10:36:17 +03:00
Paul B Mahol
3e36dc8626 w64dec: fix end position of summarylist guid
Noticed-by: James Almer

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-09-03 01:03:10 +00:00
Paul B Mahol
79b70e47a4 w64dec: fix skipping of unknown guids
Regression since 14d50c1.
Fixes #2932.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-09-02 22:55:46 +00:00
Diego Biurrun
7df9e693a3 cosmetics: Fix ATRAC codec name spelling 2013-09-02 21:38:57 +02:00
Anton Khirnov
488b2984fe ape demuxer: check for EOF in potentially long loops
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-09-02 19:28:55 +02:00
Anton Khirnov
a7c1689ded 4xm: check that bits per sample is strictly positive
Avoids a divide by zero.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-09-02 19:28:47 +02:00
Anton Khirnov
df33a58e53 lavf: avoid integer overflow when estimating bitrate
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-09-02 19:28:29 +02:00
Anton Khirnov
fab694dd39 lavf: move a variable declaration to the block where it's used 2013-09-02 19:28:19 +02:00
Michael Niedermayer
2501f6d3d6 avformat/movenc: Use the rate from av_timecode_init_from_string() for tmcd
Fixes Ticket2892
Reveiwed-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-02 17:16:20 +02:00