14642 Commits

Author SHA1 Message Date
Michael Niedermayer
01c4fe7ee7 avformat/tee: flip assigment direction
Found-by: CSA
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2e6fdcb7f3c86491408a3699f0aa9dc52b7c5686)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-05 04:45:56 +02:00
Michael Niedermayer
2105f046f5 avformat/dv: implement fallback in dv_extract_pack()
Fixes Ticket2340
Fixes Ticket2341

Based-on mail from Dave Rice <dave@dericed.com>
Tested-by: Dave Rice <dave@dericed.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 88f038ac97a875f25c2eceac6d2107a09314984c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-05 04:13:38 +02:00
Michael Niedermayer
f02221d651 Merge commit 'f6b3dce952d66f87883a50d90d6e98416ee397df' into release/2.2
* commit 'f6b3dce952d66f87883a50d90d6e98416ee397df':
  librtmp: Don't free the temp url at the end of rtmp_open

Conflicts:
	libavformat/librtmp.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-30 20:32:53 +02:00
Martin Storsjö
f6b3dce952 librtmp: Don't free the temp url at the end of rtmp_open
librtmp can keep pointers to this string internally, and may
use them at shutdown as well.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 865461099e062de5a3a109c2a5be98004c11d8bd)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>

Conflicts:
	libavformat/librtmp.c
2014-07-27 10:14:33 -04:00
Michael Niedermayer
9f8e3e6d12 avformat: add av_stream_get_parser() to access avformat AVParser
The AVStream.parser field is considered private and its location cannot be
preserved while preserving also ABI compatibility to libav, as libav added fields
before it.
Some tools like ffmpeg.c access this field though

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

Conflicts:

	RELEASE_NOTES
	doc/APIchanges
	libavformat/utils.c
	libavformat/version.h
2014-07-14 23:26:06 +02:00
Michael Niedermayer
9752ab6b9e avformat/utils: do not wait for packets from discarded streams for genpts
Fixes long loop
Fixes Ticket3208

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-14 23:26:06 +02:00
Michael Niedermayer
0d90143972 Merge commit '46c477c2a14b04a63ab11d31003b48fab6146a96' into release/2.2
* commit '46c477c2a14b04a63ab11d31003b48fab6146a96':
  Check mp3 header before calling avpriv_mpegaudio_decode_header().

Conflicts:
	libavformat/mp3enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-14 22:26:06 +02:00
Martin Storsjö
16f7cbef56 oggenc: Set the right AVOption size for the pref_duration option
On big endian machines, the default value set via the faulty
AVOption ended up as 2^32 times too big.

This fixes the fate-lavf-ogg test which currently is broken on
big endian machines, broken since 3831362. Since that commit,
a final zero-sized packet is written to the ogg muxer in that test,
which caused different flushing behaviour on little and big endian
depending on whether the pref_duration option was handled as it
should or not.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 103243ca649cc305129ed0352bf4d97e5ddf4d80)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-06-26 12:58:28 +02:00
Justin Ruggles
46c477c2a1 Check mp3 header before calling avpriv_mpegaudio_decode_header().
As indicated in the function documentation, the header MUST be
checked prior to calling it because no consistency check is done
there.

CC:libav-stable@libav.org
(cherry picked from commit f2f2e7627f0c878d13275af5d166ec5932665e28)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-06-26 12:37:16 +02:00
Michael Niedermayer
d07be523f5 avformat/mpc: attempt to allocate a packet that is not smaller than the data inside it
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 86a9370e2b91d67375e66a06d6eb573b5a017775)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-23 15:56:15 +02:00
Michael Niedermayer
e4cdde96b3 avformat/cavsvideodec: Fix probing when the file extension is avs
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 52e563bb2f7897d615391520c3c4acba1ee7dcb4)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-23 15:56:15 +02:00
Michael Niedermayer
e173834af8 avformat/flvenc: Do not allow creating h263/mpeg4 in flv without unofficial format extensions being enabled.
Found-by: Jean-Baptiste Kempf <jb@videolan.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 74760883fcb4443d105814ed246b3cf51d7e9dca)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-23 15:56:15 +02:00
Carl Eugen Hoyos
52572ca1b3 Show duration for large asf files as written in the file header.
Fixes ticket #3428.
(cherry picked from commit e3fd263f0b73e4425192d6dd1ab18027ecaa35db)
2014-06-21 21:52:05 +02:00
Michael Niedermayer
f378636d90 avformat/mp3enc: drop redundant and uninitialized variable
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit eccec203978e53f897a3c6105d011bbdff2a978b)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-19 21:05:12 +02:00
Carl Eugen Hoyos
d1b62a9a07 Do not limit blocksize when reading PCM from aiff.
Fixes ticket #3695.
(cherry picked from commit 763e714442e07f6430b003c8a9f4b62deaa7b3a5)
2014-06-09 23:48:10 +02:00
Michael Niedermayer
29c8fac3f7 avformat/avidec: allow rounding errors between scale/rate and timebase
Fixes Ticket3670

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 571ab8344a9a2864d22d01af41283cee9328b927)
2014-06-09 23:47:35 +02:00
Michael Niedermayer
54bec22a6e avformat/h263dec/h263_probe: Check TR
Fixes missdetection of Misdetection_345.mp3
Fixes missdetection of Misdetection_421.mp3
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit cd20b93e2f5171054d6b3dd9daee1e832c1f9090)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-02 22:59:50 +02:00
Michael Niedermayer
e1b2c93a23 avformat/h263dec/h263_probe: Check PSC bit 9 and 13 in
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3ad21c50af042ab17bedf755ff8245392425c259)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-02 22:59:50 +02:00
Michael Niedermayer
e529ff52a0 avformat/h263dec: shift data in state to make more bits available to probe
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 04b15a6055fc230a655091ce21303f9d2a996ed9)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-02 22:59:50 +02:00
Michael Niedermayer
96047b3150 avformat/utils: Call ff_rfps_add_frame() only for video
This avoids some unneeded computations

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-02 22:59:50 +02:00
Michael Niedermayer
2545defeac avformat/flvenc: fix assertion failure after 4h muxing
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2e532aa82d2b938a3cd913a363a79bf92ddf1a33)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-02 22:59:50 +02:00
Michael Niedermayer
a5a6f6fec3 avformat/mov: allow seeking back to the begin even if nothing is marked as keyframe
Fixes Ticket 3663

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 96470ca22b3b46677de0e2df64e87c5ec80d752b)
2014-05-31 12:22:20 +02:00
Carl Eugen Hoyos
bb01956d67 Use Matroska document version 2 for WebM files if possible.
Google's plugin for the Internet Explorer refuses to play
files with another document version.

Fixes ticket #3583.
(cherry picked from commit ab21acecc72a0299895583cf83347ab5e2444b71)
2014-05-12 23:20:05 +02:00
Michael Niedermayer
bc0c49b83e avformat/avidec: remove unused variables
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit cc8b45c0ce35465fd0efee7103e41bcc28251f99)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-11 18:18:31 +02:00
Michael Niedermayer
2aa6592338 Merge commit '7f954ca502a16feeca44d4e9a7d450b404dabc94' into release/2.2
* commit '7f954ca502a16feeca44d4e9a7d450b404dabc94':
  avi: Improve non-interleaved detection

Conflicts:
	Changelog
	libavformat/avidec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-11 17:59:58 +02:00
Michael Niedermayer
2b14d98086 avformat/avidec: Check required demuxing buffer sizes in guess_ni_flag()
Fixes Ticket3421

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-11 17:59:50 +02:00
Michael Niedermayer
7f954ca502 avi: Improve non-interleaved detection
Additional fixes by Nigel Touati-Evans <nigel.touatievans@gmail.com>.

Check the index for streams with a time drift of 2s or a buffer drift
of 64MB.

Bug-Id: 666
CC: libav-stable@libav.org
Sample-Id: yet-another-broken-interleaved-avi.avi

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
(cherry picked from commit 9d599e3f6e61438772d8cddd6c9b7c495251f51e)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2014-05-10 12:00:40 -04:00
Martin Storsjö
7d97cc8d87 rtmpproto: Check the buffer sizes when copying app/playpath strings
As pointed out by Reimar Döffinger.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 0bacfa8d37710b904897e7cbeb8d6f96fbf75e2e)

Conflicts:
	libavformat/rtmpproto.c
2014-05-08 20:00:47 -04:00
Michael Niedermayer
f1b5830182 avformat/h263dec: Fix h263 probe
The code was missing 1 bit in the src format

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-05 00:09:17 +02:00
Michael Niedermayer
27a3a59428 avformat/mpegts: Remove redundant check
Fixes part of Ticket3466
Found-by: Andrey_Karpov / PVS-Studio
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ff6fa0b4b980fc5b9f7653d7b159ae02c3d95210)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-05 00:09:17 +02:00
Stephan Soller
e3b08b3ad4 avformat/rtmpproto: Added handling of an initial RTMP chunk size packet.
Fixes ticket #2911.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 36b9c27dae452e10b4fff3d10f836160a5b8fbbd)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-05 00:09:17 +02:00
Michael Niedermayer
fa16440659 Merge commit '79041d92ee7421853ee8c57fc13891cb0c272e0e' into release/2.2
* commit '79041d92ee7421853ee8c57fc13891cb0c272e0e':
  matroska: add the Opus mapping

Conflicts:
	libavformat/matroska.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-04 21:25:27 +02:00
Michael Niedermayer
c36fd16aaa Merge commit '82cebc0e0544dce507749dd9b1c2983f083de836' into release/2.2
* commit '82cebc0e0544dce507749dd9b1c2983f083de836':
  matroskadec: read the CodecDelay element

Conflicts:
	libavformat/matroska.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-04 21:01:38 +02:00
Michael Niedermayer
8c5897632a Merge commit 'c4e764aa6980dd9dc7c423921b415ff7261c944a' into release/2.2
* commit 'c4e764aa6980dd9dc7c423921b415ff7261c944a':
  rtmpproto: Make sure to pass on the error code if read_connect failed

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-04 20:54:43 +02:00
Michael Niedermayer
742f9aa879 Merge commit '0f6e309b97e3da83a0fa75fbf1c4b50cd72047eb' into release/2.2
* commit '0f6e309b97e3da83a0fa75fbf1c4b50cd72047eb':
  mp3enc: Properly write bitrate value in XING header

Conflicts:
	libavformat/mp3enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-04 20:13:41 +02:00
Anton Khirnov
79041d92ee matroska: add the Opus mapping
(cherry picked from commit 141fdc763c2841b572d29a2ad78513e8d5325870)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2014-05-03 16:22:58 -04:00
Anton Khirnov
82cebc0e05 matroskadec: read the CodecDelay element
(cherry picked from commit eb3b5501e8b85bfea09d533314cb6920efc42639)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>

Conflicts:
	libavformat/matroskadec.c
2014-05-03 13:50:26 -04:00
Michael Niedermayer
4f41717d01 avformat/mux: Check for and remove invalid packet durations
Fixes assertion failure
Fixes Ticket3575

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit dc6a17cf74a90e41d70ea1753cdb70c0a5b2ced8)
2014-04-24 08:56:58 +02:00
Michael Niedermayer
6896dcbf5f avformat/avidec: Speed up keyframe detection code
Fixes Ticket3531

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 57fb570908df2e84b11635f12b5be1fb27f053eb)
2014-04-23 17:11:23 +02:00
Michael Niedermayer
e9e42beed2 avformat/asfenc: dont allow non interleaved packets
The muxer does not support this currently

Fixes ticket #3547.
Fixes ticket #3555.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 369cdf917aaa5d7fbc61d57f87e638772e806716)
(cherry picked from commit 514ec9bece86fed440ac829c10e82c4a0569c3a5)
2014-04-23 17:10:26 +02:00
Michael Niedermayer
abd6decd55 avformat/pmpdec: remove cur_dts timestamp hack
It appears the demuxer works fine without it

Fixes Ticket3534

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5b19fc7aae986d6fa3d689f581b37e4bfba4f2d0)
2014-04-23 17:01:36 +02:00
Michael Niedermayer
0385c824f1 avformat: Fix decoder search in find stream info
Fixes Ticket3548

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f3743901d7df906342f99b179382b19d8a4d9716)
2014-04-23 16:58:23 +02:00
Martin Storsjö
c4e764aa69 rtmpproto: Make sure to pass on the error code if read_connect failed
Previously, if read_connect failed, the ret variable was unmodified
and had the value 0, indicating success, which then was returned from
the rtmp_open function, even though it actually failed.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 6477139721f559b26eafd415e23e13ea2b0c27e1)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2014-04-19 22:03:57 -04:00
Peter Ross
30cf47c6f0 ff_id3v2_read: add option to limit ID3 magic number search
Several chunked formats (AIFF, IFF,DSF) store ID3 metadata within an 'ID3 '
chunk tag. If such chunks are stored sequentially, it is possible for the
ID3v2 parser to confuse the chunk tag for the ID3 magic number. e.g.

[1st chunk tag ('ID3 ') | chunk size] [ID3 magic number | metadata ...]
[2nd chunk tag ('ID3 ') | chunk size] [ID3 magic number | metadata ...]

Fixes ticket #3530.

Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5331773cc33ba26b9e26ace643d926219e46a17b)

Conflicts:
	libavformat/dsfdec.c
2014-04-19 13:00:57 +02:00
Peter Ross
b45cd17d29 ff_id3v2_free_extra_meta: set the pointer pointing to extra_meta to NULL
Fixes ticket #3530.

Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c94305ae23318c8956a30485cd5642829f4f16a9)
2014-04-19 12:59:18 +02:00
Anh
32919db4fb Fix compilation with --disable-everything --enable-muxer=avi --disable-network.
Fixes ticket #3568.
(cherry picked from commit c150e2cf324ce0572bb8b9b3501c45465cfbf360)
2014-04-16 20:07:51 +02:00
Michael Niedermayer
0f6e309b97 mp3enc: Properly write bitrate value in XING header
Instead of using a fixed bitrate_idx, calculate a matching bitrate for
the XING header.

Using a fixed bitrate_idx causes tools such as file(1) and mediainfo(1)
to report wrong bitrate and bitrate mode when using CBR.

Bug-Id: https://bugs.debian.org/736088

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit 617a1a98a6be3e59db6fbfc21afab2fb9a049c03)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2014-04-12 10:49:30 -04:00
Michael Niedermayer
544accc895 avformat/omadec: fix probetest failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a84f9c75bc3f55fed4f68d2503a08ab70c76ecbe)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-10 04:53:00 +02:00
Michael Niedermayer
8caaf260a6 avformat/utils: detect MPEG streams with faulty DTS and discard affected DTS
Fixes issue2.ts

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-23 20:31:05 +01:00
Michael Niedermayer
e8919d6522 Revert "mpegts: do not set pts for missing dts in video streams"
This reverts commit f65afef1df49f53e14c8d4173ff960fff8d44ecb.

If only pts is coded then dts must be equal pts
See Rec. ITU-T H.222.0 (06/2012) / ISO/IEC 13818-1:2013 (E) 2.7.5

Found-by: Baptiste Coudurier
(cherry picked from commit 0bf882864ecd228d53555c57595eeca048662991)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-23 20:31:05 +01:00