1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

13997 Commits

Author SHA1 Message Date
Dirk Farin
56cf6151ae avformat/hevcdec: add more irap cases to hevc_probe()
This fixes fate-hevc-conformance-RAP_A_docomo_4

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-17 10:18:28 +02:00
Dirk Farin
2ac31773f3 avformat/hevcdec: cosmetics, whitespaces
This reduces the difference to the latest hevc demuxer

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-17 10:14:11 +02:00
Carl Eugen Hoyos
a0d13d84a9 Add some necessary casts in the wtv demuxer.
This reverts e8023dba, fixes ticket #3049.
2013-10-17 09:54:03 +02:00
Carl Eugen Hoyos
d0b7d24b80 Support HEVC in transport streams. 2013-10-16 17:54:37 +02:00
Michael Niedermayer
f58cb772d9 avformat/mov: fix "correctly" typo
Found-by: Timothy Gu
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-16 00:26:10 +02:00
Yusuke Nakamura
16b6839de6 lavf/matroskadec: Support HEVC demuxing.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-16 00:17:28 +02:00
Yusuke Nakamura
53f903b7c5 lavf/mov: Support HEVC demuxing.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-16 00:17:28 +02:00
Mickaël Raulet
93c1fe4de3 hevc: add ts demux support
cherry picked from commit 925ee44364a7bce58e2ac5bac91077ce0a75d883

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-15 23:48:00 +02:00
Michael Niedermayer
12cc3bf29a avformat: rename a few more h.265 to HEVC
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-15 21:23:57 +02:00
Stefano Sabatini
1120fd7852 lavf/segment: simplify logic and fix !=0 check on segment_end return value
A successfull return value can be > 0.
2013-10-15 15:17:22 +02:00
Billy Shambrook
67e507e10e lavf/segment: log segments as they end to AV_LOG_VERBOSE
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2013-10-15 14:57:49 +02:00
Stefano Sabatini
3b9f8e7cd9 lavf/segment: simplify segment_count update
Now segment_count mark the segment_count of the current segment.
2013-10-15 14:55:48 +02:00
Michael Niedermayer
0a6ce255ab Merge remote-tracking branch 'qatar/master'
* qatar/master:
  http: Check the auth string contents and not only the pointer

Conflicts:
	libavformat/http.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-15 09:34:27 +02:00
Vignesh Venkatasubramanian
d6f86d74ed matroskadec: Demux support for SeekPreRoll and CodecDelay
Adds support for demuxing SeekPreRoll and CodecDelay container
elements.

Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-14 21:06:59 +02:00
Michael Niedermayer
708b32b6f7 http: Check the auth string contents and not only the pointer
This makes sure we don't send the Except: 100-continue header
if no authentication credentials have been provided.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-10-14 21:57:15 +03:00
Paul B Mahol
42a8d8aee8 avformat/rpl: use avpriv_report_missing_feature/avpriv_request_sample
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-10-14 18:18:25 +00:00
Carl Eugen Hoyos
f7ed044eea Support H.264 fourcc UMSV.
Fixes ticket #3046.
2013-10-14 16:29:58 +02:00
Michael Niedermayer
953dd72321 Merge commit '84a125c4c28f3e3e215d2e6c32f7f0ec43bbc04c'
* commit '84a125c4c28f3e3e215d2e6c32f7f0ec43bbc04c':
  rtmp: Allocate the prev_pkt arrays dynamically

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-14 15:31:11 +02:00
Martin Storsjö
84a125c4c2 rtmp: Allocate the prev_pkt arrays dynamically
Normally, all channel ids are between 0 and 10, while they in
uncommon cases can have values up to 64k.

This avoids allocating two arrays for up to 64k entries (at a total
of over 6 MB in size) each when most of them aren't used at all.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-10-14 14:27:35 +03:00
James Almer
1d4476d5da movenc: use ff_alloc_extradata()
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-14 13:02:18 +02:00
James Almer
00408f95e7 oggparsecelt: use ff_alloc_extradata()
Signed-off-by: James Almer <jamrial@gmail.com>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-14 13:01:42 +02:00
James Almer
aae8975ffb oggparseopus: use ff_alloc_extradata()
Signed-off-by: James Almer <jamrial@gmail.com>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-14 12:59:59 +02:00
Michael Niedermayer
5970f4bb02 avformat/http: check the auth string contents not the pointer which cannot be NULL
It appears this bug originates from a "work in progress" patch from
ffmpeg-devel that was heavily redesigned by and integrated in libav

And that patch even had a reply and review on the mailing list pointing
out that it had a bug.

This fixes a deadlock with ffserver

See: [FFmpeg-devel] [PATCH] Fix HTTP authentication problem for POST actions.
     [FFmpeg-devel] [PATCH 1/3] Introduce auth_phase flag, which will be true if authorization needs to be sent, but the type of authorization is not known yet Partial fix #3036
     [FFmpeg-devel] [PATCH 2/3] Only add Transfer-Encoding header when not in authorization phase, because server will wait (indefinitely) for data when receiving this header Partial fix #3036
     [FFmpeg-devel] [PATCH 3/3] Only allow posting data and/or forcing a 200 code, enabling posting isml chunks, -after- we did a possible first request to get a 403 from the server telling us which type of authentication to apply Final part fix #3036
See: 71549a857b
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-14 01:35:28 +02:00
Michael Niedermayer
6b1b63df85 Merge commit '71549a857b13edf4c4f95037de6ed5bb4c4bd4af'
* commit '71549a857b13edf4c4f95037de6ed5bb4c4bd4af':
  http: Support auth method detection for POST

Conflicts:
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-14 00:37:01 +02:00
Michael Niedermayer
5dee3e8bb4 Merge commit 'eb8b05a3824a9fa85e20d603595ac8a3b83505d4'
* commit 'eb8b05a3824a9fa85e20d603595ac8a3b83505d4':
  http: Add an option for forcing basic authentication

Conflicts:
	libavformat/http.c
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-14 00:17:49 +02:00
Paul B Mahol
5340c3dd8d avformat/westwood_vqa: s/unsigned char/uint8_t & s/unsigned int/uint32_t
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-10-13 20:21:03 +00:00
Paul B Mahol
a807c68253 avformat: use ff_alloc_extradata()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-10-13 20:13:38 +00:00
Paul B Mahol
3fd79833e2 avformat: add ff_alloc_extradata() helper
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-10-13 20:13:38 +00:00
Michael Niedermayer
522f78f8ea avformat/oggparseopus: fix nb_headers
Line comes from ecab1c7741
and was not merged previously

Thanks-to: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-13 18:25:42 +02:00
Martin Storsjö
71549a857b http: Support auth method detection for POST
Inspired by a patch by Jakob van Bethlehem. But instead of doing
an empty POST first to trigger the WWW-Authenticate header (which
would succeed if no auth actually was required), add an Expect:
100-continue header, which is meant to be used exactly for
cases like this.

The header is added if doing a post, and the user has specified
authentication but we don't know the auth method yet.

Not all common HTTP servers support the Expect: 100-continue header,
though, so we only try to use it when it really is needed. The user
can request it to be added for other POST requests as well via
an option - which would allow the caller to know immediately that
the POST has failed (e.g. if no auth was provided but the server
required it, or if the target URL simply doesn't exist).

This is only done for write mode posts (e.g. posts without pre-set
post_data) - for posts with pre-set data, we can just redo the post
if it failed due to 401.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-10-13 12:59:03 +03:00
Martin Storsjö
eb8b05a382 http: Add an option for forcing basic authentication
The default is to autodetect the auth method. This does require one
extra request (and also closing and reopening the http connection).
For some cases such as HTTP POST, the autodetection is not handled
properly (yet).

No option is added for digest, since this method requires getting
nonce parameters from the server first and can't be used straight
away like Basic.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-10-13 12:59:03 +03:00
Paul B Mahol
fa7e9f9401 avformat/vocdec: return AVERROR_EOF when EOF is reached
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-10-13 09:50:38 +00:00
Michael Niedermayer
0c7bd34023 Merge commit 'fd2384f02b905a106fba9222ece4ddbe2ec61937'
* commit 'fd2384f02b905a106fba9222ece4ddbe2ec61937':
  oggparsevorbis: fail on memory allocation error

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-13 10:06:42 +02:00
Michael Niedermayer
77caa31f71 Merge commit 'c18375ec8040a9fe0f186b2033dc975883143758'
* commit 'c18375ec8040a9fe0f186b2033dc975883143758':
  oggvorbisdec: add support for embedded cover art

Conflicts:
	libavformat/oggparsevorbis.c

See: 193782216f
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-13 09:51:00 +02:00
Michael Niedermayer
92b03cf926 Merge commit '601d6228c4811d8971a2412a759e1a4ab775ebe8'
* commit '601d6228c4811d8971a2412a759e1a4ab775ebe8':
  flac: move picture parsing code in a separate file

Conflicts:
	libavformat/Makefile
	libavformat/flacdec.c

See: 1e5bbbfcf3
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-13 09:37:21 +02:00
Michael Niedermayer
8dbf98e68a Merge commit 'ecab1c77410f023b437c6ed3a3281be8f039e574'
* commit 'ecab1c77410f023b437c6ed3a3281be8f039e574':
  oggdec: add support for Opus in Ogg demuxing

Conflicts:
	Changelog
	libavformat/oggparseopus.c
	libavformat/version.h

See: e62fd6619f
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-13 09:09:43 +02:00
Michael Niedermayer
3ce0eddeab Merge commit 'ed9245dba83f9add60f55718b537b0af2105c60e'
* commit 'ed9245dba83f9add60f55718b537b0af2105c60e':
  oggparsevorbis: check allocations

Conflicts:
	libavformat/oggparsevorbis.c

See: 033f1644b5
See: 84aea80f78
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-13 08:53:47 +02:00
Michael Niedermayer
b6ffe8afd9 Merge commit '9c15ef35d404fca2adc31276c1eedb11cf485461'
* commit '9c15ef35d404fca2adc31276c1eedb11cf485461':
  oggparsevorbis: support official chapter extension

Conflicts:
	libavformat/oggparsevorbis.c

See: 04b9836274
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-13 08:28:05 +02:00
Michael Niedermayer
87fe0bbd69 lavc: rename h265 to hevc, add AV_CODEC_ID_H265 with identical value for backward compatibility
Somehow 2 different identifiers have come into existence which makes supporting
both until the next major version bump required
I did not investigate how exactly that did happen.

wm4, j-b and smarter prefer hevc.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-13 00:26:27 +02:00
Paul B Mahol
fd54f70072 avformat/avr: use ff_get_pcm_codec_id()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-10-12 20:21:38 +00:00
Vittorio Giovara
fd2384f02b oggparsevorbis: fail on memory allocation error 2013-10-12 15:37:56 +02:00
James Almer
c18375ec80 oggvorbisdec: add support for embedded cover art
Signed-off-by: James Almer <jamrial@gmail.com>
2013-10-12 15:34:10 +02:00
James Almer
601d6228c4 flac: move picture parsing code in a separate file
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-10-12 15:30:39 +02:00
Nicolas George
ecab1c7741 oggdec: add support for Opus in Ogg demuxing 2013-10-12 15:25:18 +02:00
Vittorio Giovara
ed9245dba8 oggparsevorbis: check allocations
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-10-12 15:24:26 +02:00
James Almer
9c15ef35d4 oggparsevorbis: support official chapter extension
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-10-12 15:24:08 +02:00
Michael Niedermayer
8de021fabe Merge remote-tracking branch 'lukaszmluki/master'
* lukaszmluki/master:
  avformat/ftp: add log regarding passive mode failure
  avformat/ftp: fix possible deadlock
  avdevice/pulse_audio_enc: fix stream index

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-12 14:14:54 +02:00
Michael Niedermayer
23c8a3353b Merge remote-tracking branch 'qatar/master'
* qatar/master:
  riff: Add a mapping for VP6A

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-12 14:03:54 +02:00
Lukasz Marek
3a92ee5953 avformat/ftp: add log regarding passive mode failure
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2013-10-12 13:52:33 +02:00
Lukasz Marek
e1fb3143bb avformat/ftp: fix possible deadlock
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2013-10-12 13:52:33 +02:00
Martin Storsjö
a52b5a5a07 riff: Add a mapping for VP6A
This allows demuxing VP6A from F4V files.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-10-12 13:02:45 +03:00
Michael Niedermayer
e4d45673ca avformat/movenc: set XDCAM codec tag correctly
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-12 01:42:53 +02:00
Michael Niedermayer
713dcdbfcb avformat/movenc: set pretty compressor name for XDCAM
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-12 01:42:53 +02:00
Michael Niedermayer
ce994a03f5 avformat/movenc: make AVStream easier to access
This adds a AVStream pointer to Track

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-12 01:42:53 +02:00
Carl Eugen Hoyos
a12ab37d1f lavf/riff.c: Fix GeoVision H.264 fourcc.
Fixes d24da748
2013-10-11 16:23:09 +02:00
Carl Eugen Hoyos
d24da748c3 Add H.264 fourcc GAVC for GeoVision cameras. 2013-10-11 10:02:00 +02:00
Matthieu Bouron
054454c63a mxf: Add jpeg2000 codec to intra only codecs
Conform with SMPTE RP 224 and SMPTE s422.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-10-10 18:22:46 +02:00
Michael Niedermayer
7acb464f0e Merge commit 'e6ed8668597cfea25dfb350a9b4df7fb2efc1d90'
* commit 'e6ed8668597cfea25dfb350a9b4df7fb2efc1d90':
  flvenc: Write proper cropping for VP6 even if there's no extradata

Conflicts:
	libavformat/flvenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-10 12:06:17 +02:00
Michael Niedermayer
c2555bcbd1 Merge commit 'be1e1373d267bae2af8a62d79eef736736f24565'
* commit 'be1e1373d267bae2af8a62d79eef736736f24565':
  flvenc: Support muxing VP6A as well

Conflicts:
	libavformat/flvenc.c

See: 42ae83c196
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-10 11:58:58 +02:00
Michael Niedermayer
0efbd98e23 Merge commit '4d7aeff9a1080e64125f3374d993b2c9c4c2751b'
* commit '4d7aeff9a1080e64125f3374d993b2c9c4c2751b':
  flvenc: Don't pretend to support muxing "plain" VP6

Conflicts:
	libavformat/flvenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-10 11:45:45 +02:00
Michael Niedermayer
5fcd0a80a2 Merge commit 'ceec6e792e4b5baaa23b220f4fd33417631f5288'
* commit 'ceec6e792e4b5baaa23b220f4fd33417631f5288':
  avi: directly resync on DV in AVI read failure

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-10 11:31:40 +02:00
Michael Niedermayer
dd0429e1de Merge commit '756547ce7f4d67a18663503e2157aebed3531703'
* commit '756547ce7f4d67a18663503e2157aebed3531703':
  avi: DV in AVI must be considered single stream

Conflicts:
	libavformat/avidec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-10 11:22:28 +02:00
Michael Niedermayer
c589c4c52d Merge commit '1cac9accbd1f9b8596122d0735e37b97a844c514'
* commit '1cac9accbd1f9b8596122d0735e37b97a844c514':
  avi: properly fail if the dv demuxer is missing

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-10 10:40:33 +02:00
Martin Storsjö
e6ed866859 flvenc: Write proper cropping for VP6 even if there's no extradata
This keeps cropping when remuxing from F4V to FLV.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-10-10 10:42:28 +03:00
Martin Storsjö
be1e1373d2 flvenc: Support muxing VP6A as well
Handle it in the same way as VP6F, except for the codec tag.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-10-10 10:42:10 +03:00
Martin Storsjö
4d7aeff9a1 flvenc: Don't pretend to support muxing "plain" VP6
The plain VP6 format is vertically flipped compared to VP6F/VP6A.
Support for the plain VP6 format was added in 09d8c0ae83 (which
also introduced support for muxing VP6F properly in general).

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-10-10 10:41:44 +03:00
Luca Barbato
ceec6e792e avi: directly resync on DV in AVI read failure
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-10-10 07:28:17 +02:00
Luca Barbato
756547ce7f avi: DV in AVI must be considered single stream
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-10-10 07:28:03 +02:00
Luca Barbato
1cac9accbd avi: properly fail if the dv demuxer is missing
CC: libav-stable@libav.org
2013-10-10 07:27:50 +02:00
Michael Niedermayer
83fc6c822b avformat/wavdec: Dont trust the fact chunk for PCM
Fixes Ticket3033

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-09 22:18:19 +02:00
Michael Niedermayer
8c0f565ee3 avformat/movenc: factor out find_fps()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-08 14:18:43 +02:00
Michael Niedermayer
8f2386b589 avformat/oggparseflac: fix handling of old flac in ogg
Improves handling of the file in Ticket1617

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-07 01:36:05 +02:00
Diego Biurrun
9adbc3f3a1 bmv: Remove unused variable 2013-10-06 19:36:53 +02:00
Michael Niedermayer
4634871b51 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  oggparsevorbis: return meaningful errors

Conflicts:
	libavformat/oggparsevorbis.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-06 12:24:13 +02:00
Michael Niedermayer
6853e40106 avformat/matroskadec: only set r_frame_rate if the value is within reasonable limits
Fixes Ticket2451

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-06 00:22:08 +02:00
Vittorio Giovara
90e15e340d oggparsevorbis: return meaningful errors
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-10-05 23:16:48 +02:00
Michael Niedermayer
a7630e3755 Merge commit 'b698542ad83284fbb8c22404e3cafeb2dd739d38'
* commit 'b698542ad83284fbb8c22404e3cafeb2dd739d38':
  mov: Don't allocate arrays with av_malloc that will be realloced

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-05 10:50:47 +02:00
Michael Niedermayer
e1f8184a1a avformat/gifdec: make GIF_APP_EXT_LABEL parsing more robust
Fixes Ticket3021

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-04 23:26:40 +02:00
Martin Storsjö
b698542ad8 mov: Don't allocate arrays with av_malloc that will be realloced
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-10-05 00:00:43 +03:00
Michael Niedermayer
e41ea866fc avformat/mov: force parsing of headers if stts is absent
Fixes Ticket2991

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-04 17:47:26 +02:00
Michael Niedermayer
74b2b0ed9f Merge commit 'cd818b3a5709b9b08bd5901cb8863a8b61be265e'
* commit 'cd818b3a5709b9b08bd5901cb8863a8b61be265e':
  rtmpproto: Validate the embedded flv packet size before copying

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-04 14:30:05 +02:00
Michael Niedermayer
5bb3ef3b36 Merge commit '8921e32f730c191543b84e61338bc9d549aa05a3'
* commit '8921e32f730c191543b84e61338bc9d549aa05a3':
  rtmpproto: Readjust the end of the flv buffer if handle_metadata exited early

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-04 14:25:03 +02:00
Michael Niedermayer
b8e44118b1 Merge commit '24fee95321c1463360ba7042d026dae021854360'
* commit '24fee95321c1463360ba7042d026dae021854360':
  rtmpproto: Move the flv header/trailer addition to append_flv_data

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-04 14:18:32 +02:00
Michael Niedermayer
205b602135 Merge commit '72540e514ceaaed8ecb97ed63637b2a2a4447ab8'
* commit '72540e514ceaaed8ecb97ed63637b2a2a4447ab8':
  rtmpproto: Clear the flv allocation size on reallocp failures

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-04 14:17:53 +02:00
Michael Niedermayer
d32eec3359 Merge commit '4d6d70292e91a7ef027824d731b6b6570ceabf2f'
* commit '4d6d70292e91a7ef027824d731b6b6570ceabf2f':
  rtmpproto: Pass the 'live' parameter in the right unit

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-04 13:53:17 +02:00
Michael Niedermayer
373d15525d Merge commit 'a6b361325f2bfc8d9d4e5f761d6c1a07b209c4fb'
* commit 'a6b361325f2bfc8d9d4e5f761d6c1a07b209c4fb':
  rtmpproto: Print the error code string if there's no description

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-04 13:47:06 +02:00
Michael Niedermayer
f3968ab47c Merge commit '49fe9c05f97bc2cfafd8fdcfea2f313d7c8e2c48'
* commit '49fe9c05f97bc2cfafd8fdcfea2f313d7c8e2c48':
  oggparsevorbis: K&R formatting cosmetics

Conflicts:
	libavformat/oggparsevorbis.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-04 12:01:17 +02:00
Clément Bœsch
d4dc673455 avformat/vobsub: raise packet even if apparently incomplete.
This restore the latest packet which was dropped from the FATE test in
dbfe61100.
2013-10-04 09:25:11 +00:00
Martin Storsjö
cd818b3a57 rtmpproto: Validate the embedded flv packet size before copying
This wasn't an issue prior to 58404738, when the whole RTMP packet
was copied at once and the length of the individual embedded flv
packets only were validated by the flv demuxer.

Prior to this patch, this could lead to reads and writes out of bound.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-10-04 09:25:10 +03:00
Martin Storsjö
8921e32f73 rtmpproto: Readjust the end of the flv buffer if handle_metadata exited early
If the embedded flv packets were incomplete and we aborted the
copying loop early, make sure the flv buffer is trimmed to
only contain full packets.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-10-04 09:25:08 +03:00
Martin Storsjö
24fee95321 rtmpproto: Move the flv header/trailer addition to append_flv_data
update_offset is also called from handle_metadata, where the
packet header sizes is already included in the size.

Previously this lead to flv_data/flv_size including 15 uninitialized
bytes at the end after each call to handle_metadata, making the
flv demuxer lose sync with the stream.

Also remove leftover copying in handle_metadata. This is a leftover
from the refactoring in 5840473. (Previously this final mempcy was
the one that copied all the packets at once, while this is done
within the loop right now.) After making sure flv_size is set to
the right size, this write was out of bounds.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-10-04 09:25:07 +03:00
Martin Storsjö
72540e514c rtmpproto: Clear the flv allocation size on reallocp failures
This was overlooked in d872fb0f7 since I assumed all the realloc
issues in the rtmp code was fixed already.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-10-04 09:25:06 +03:00
Martin Storsjö
4d6d70292e rtmpproto: Pass the 'live' parameter in the right unit
The current magic numbers passed are values in seconds, while the
parameter itself should be passed over the wire in milliseconds.

This makes (some/all?) live streams from Red5 work correctly, that
previously returned StreamNotFound even with "-rtmp_live live". After
this commit, the default 'any' also works on these streams.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-10-04 09:25:05 +03:00
Martin Storsjö
a6b361325f rtmpproto: Print the error code string if there's no description
On (certain streams/setups at least on) Red5, the description string
actually is present, but empty. Therefore, first try loading the
description, but if not found or empty, load the code string instead.
The code string is quite understandable in most cases anyway (like
"NetStream.Play.StreamNotFound").

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-10-04 09:25:04 +03:00
Clément Bœsch
dbfe61100b avformat/vobsub: fix several issues.
Here is an extract of fate-samples/sub/vobsub.idx, with an additional
text at the end of each line to better identify each bitmap:

    timestamp: 00:04:55:445, filepos: 00001b000 Ace!
    timestamp: 00:05:00:049, filepos: 00001b800 Wake up, honey!
    timestamp: 00:05:02:018, filepos: 00001c800 I gotta go to work.
    timestamp: 00:05:02:035, filepos: 00001d000 <???>
    timestamp: 00:05:04:203, filepos: 00001d800 Look after Clayton, okay?
    timestamp: 00:05:05:947, filepos: 00001e800 I'll be back tonight.
    timestamp: 00:05:07:957, filepos: 00001f800 Bye! Love you.
    timestamp: 00:05:21:295, filepos: 000020800 Hey, Ace! What's up?
    timestamp: 00:05:23:356, filepos: 000021800 Hey, how's it going?
    timestamp: 00:05:24:640, filepos: 000022800 Remember what today is? The 3rd!
    timestamp: 00:05:27:193, filepos: 000023800 Look over there!
    timestamp: 00:05:28:369, filepos: 000024800 Where are they going?
    timestamp: 00:05:28:361, filepos: 000025000 <???>
    timestamp: 00:05:29:946, filepos: 000025800 Let's go see.
    timestamp: 00:05:31:230, filepos: 000026000 I can't, man. I got Clayton.

Note the two "<???>": they are basically split subtitles (with the
previous one), which the dvdsub decoder is now supposed to reconstruct
with a previous commit. But also note that while the first chunk has
increasing timestamps,

    timestamp: 00:05:02:018, filepos: 00001c800
    timestamp: 00:05:02:035, filepos: 00001d000

...it's not the case of the second one (and this is not an exception in the
original file):

    timestamp: 00:05:28:369, filepos: 000024800
    timestamp: 00:05:28:361, filepos: 000025000

For the dvdsub decoder, they need to be "filepos'ed" ordered, but the
FFDemuxSubtitlesQueue is timestamps ordered, which is the reason of the
introduction of a sub sort method in the context, to allow giving
priority to the position, and then the timestamps. With that change, the
dvdsub decoder get fed with ordered packets.

Now the packet size estimation was also broken: the filepos differences
in the vobsub index defines the full data read between two subtitles
chunks, and it is necessary to take into account what is read by the
mpegps_read_pes_header() function since the length returned by that
function doesn't count the size of the data it reads. This is fixed with
the introduction of total_read, and {old,new}_pos. By doing this change,
we can drop the unreliable len16 heuristic and simplify the whole loop.
Note that mpegps_read_pes_header() often read more than one PES packet
(typically in one call it can read 0x1ba and 0x1be chunk along with the
relevant 0x1bd packet), which triggers the "total_read + pkt_size >
psize" check. This is an expected behaviour, which could be avoided by
having a more chunked version of mpegps_read_pes_header().

The latest change is the extraction of each stream into its own
subtitles queue. If we don't do this, the maximum size for a subtitle
chunk is broken, and the previous changes can not work. Having each
stream in a different queue requires some little adjustments in the
seek code of the demuxer.

This commit is only meaningful as a whole change and can not be easily
split. The FATE test changes because it uses the vobsub demuxer.
2013-10-04 07:59:49 +02:00
Vittorio Giovara
49fe9c05f9 oggparsevorbis: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-10-03 23:26:09 +02:00
Diego Biurrun
47b6cfc2a0 avformat/output-example: Declare link dependency on libswscale in the Makefile 2013-10-03 23:23:04 +02:00
Michael Niedermayer
5082fcc0e2 avformat: add support to force specific AVCodecs
previously only codec_ids could be forced, which did not allow
forcing a specific implementation like libopenjpeg vs jpeg2000.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-02 22:56:03 +02:00
Michael Niedermayer
f4aec34805 avformat/utils: pass AVFormatContext to find_decoder()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-02 22:56:03 +02:00
Michael Niedermayer
ebb8dd437b mov: fix trun / pseudo_stream_id handling
This fixes simple concatenated h264

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-02 19:59:10 +02:00
Michael Niedermayer
5e253fdfc1 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtmp: alias rtmp_listen to listen

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-02 14:59:42 +02:00
Michael Niedermayer
c28bca2bde Merge commit 'ad0560fe7491a85c3e71d5a3d6a0443f10b33ab1'
* commit 'ad0560fe7491a85c3e71d5a3d6a0443f10b33ab1':
  mxf: Remove a typo

Conflicts:
	libavformat/mxfdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-02 14:55:18 +02:00
Michael Niedermayer
8aa6ffd8fa Merge commit 'cc41167aede4c101ad17eeffa8f39bb6c23d3dad'
* commit 'cc41167aede4c101ad17eeffa8f39bb6c23d3dad':
  asfdec: Check the return value of asf_read_stream_properties

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-02 14:53:00 +02:00
Luca Barbato
628a17d78a rtmp: alias rtmp_listen to listen
Make it uniform with the other protocols.
2013-10-01 15:42:06 +02:00
Luca Barbato
ad0560fe74 mxf: Remove a typo
Introduced in 93370d1216
2013-10-01 13:43:48 +02:00
Martin Storsjö
cc41167aed asfdec: Check the return value of asf_read_stream_properties
This makes sure errors in setting stream parameters are passed
on to the caller. This avoids successfully opening files while
some parameters aren't filled in properly.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-30 10:48:58 +03:00
Carl Eugen Hoyos
e34ba4723e Avoid img_segment_size == 0 in mtv demuxer.
Fixes ticket #3011.
2013-09-30 07:55:23 +02:00
Michael Niedermayer
5c7d86cbde Merge remote-tracking branch 'qatar/master'
* qatar/master:
  omadec: fix bitrate for ATRAC3+ streams

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-30 02:21:41 +02:00
Michael Niedermayer
7a28a9f68e Merge commit '23d0fdcf6f30843fc3f14084d80581f1ca10f1f3'
* commit '23d0fdcf6f30843fc3f14084d80581f1ca10f1f3':
  Add support for multichannel ATRAC3+ streams.

Conflicts:
	libavformat/oma.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-30 02:15:36 +02:00
Michael Niedermayer
c7fae9081d Merge commit '93370d12164236d59645314871a1d6808b2a8ddb'
* commit '93370d12164236d59645314871a1d6808b2a8ddb':
  mxfdec: set audio timebase to 1/samplerate

Conflicts:
	libavformat/mxfdec.c
	tests/ref/fate/mxf-demux
	tests/ref/seek/lavf-mxf
	tests/ref/seek/lavf-mxf_d10

See: 83cab07a4c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-30 02:12:42 +02:00
Michael Niedermayer
143a19f5c7 Merge commit 'c231987662194d009dd91bfc57c678e0e70ca161'
* commit 'c231987662194d009dd91bfc57c678e0e70ca161':
  mov: Make sure the read sample count is nonnegative

Conflicts:
	libavformat/mov.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-30 00:32:01 +02:00
Michael Niedermayer
ccb6b056df Merge commit '640a2427aafa774b83316b7a8c5c2bdc28bfd269'
* commit '640a2427aafa774b83316b7a8c5c2bdc28bfd269':
  bfi: Add some very basic sanity checks for input packet sizes

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-30 00:13:36 +02:00
Michael Niedermayer
a6b79bb2b1 Merge commit '9fc7184d1a9af8d97b3fc5c2ef9d0a647d6617ea'
* commit '9fc7184d1a9af8d97b3fc5c2ef9d0a647d6617ea':
  bfi: Avoid divisions by zero

See: 99a8552dae
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-30 00:12:33 +02:00
Michael Niedermayer
7057cc861d Merge commit 'a9221e39600a31ee13e736e9e47743cde23f0280'
* commit 'a9221e39600a31ee13e736e9e47743cde23f0280':
  electronicarts: Add more sanity checking for the number of channels

Note: This check is probably unnecessary
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-29 23:52:07 +02:00
Michael Niedermayer
5badcfe220 Merge commit 'd07aa3f02b73ab1371c13ac7898338380ca0932b'
* commit 'd07aa3f02b73ab1371c13ac7898338380ca0932b':
  riffdec: Add sanity checks for the sample rate

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-29 23:41:16 +02:00
Michael Niedermayer
2f8418b584 Merge commit '28ff439efd2362fb21e1a78610737f2e26a72d8f'
* commit '28ff439efd2362fb21e1a78610737f2e26a72d8f':
  mvi: Add sanity checking for the audio frame size

Conflicts:
	libavformat/mvi.c

See: ea1d8465e6
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-29 23:24:27 +02:00
Michael Niedermayer
17049bff64 Merge commit 'adc09136a4a63b152630abeacb22c56541eacf60'
* commit 'adc09136a4a63b152630abeacb22c56541eacf60':
  xwma: Avoid division by zero

Conflicts:
	libavformat/xwma.c

See: a3cb7f992f
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-29 22:59:49 +02:00
Michael Niedermayer
3a3ebc7c7d Merge commit '8d07258bb6063d0780ce2d39443d6dc6d8eedc5a'
* commit '8d07258bb6063d0780ce2d39443d6dc6d8eedc5a':
  avidec: Make sure a packet is large enough before reading its data

Conflicts:
	libavformat/avidec.c

See: 028cc42a16
Note: data!=NULL implies that the allocated array is at least FF_INPUT_BUFFER_PADDING_SIZE large
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-29 22:56:15 +02:00
Michael Niedermayer
b24f7cf950 Merge commit '68ff9981283a56c731f00c2ee7901103665092fc'
* commit '68ff9981283a56c731f00c2ee7901103665092fc':
  vqf: Make sure the bitrate is in the valid range

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-29 22:42:31 +02:00
Michael Niedermayer
554c22c710 Merge commit '9277050e2918e0a0df9689721a188a604d886616'
* commit '9277050e2918e0a0df9689721a188a604d886616':
  vqf: Make sure sample_rate is set to a valid value

See: e481ba2ed7
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-29 22:35:06 +02:00
Maxim Poliakovski
487b54104a omadec: fix bitrate for ATRAC3+ streams
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-09-29 21:54:51 +02:00
Maxim Poliakovski
23d0fdcf6f Add support for multichannel ATRAC3+ streams.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-09-29 21:52:57 +02:00
Anton Khirnov
93370d1216 mxfdec: set audio timebase to 1/samplerate
Fixes sync in some samples (e.g. bugs 7581 and 8374 in VLC).
Based on a commit by Matthieu Bouron <matthieu.bouron@gmail.com>

Reported-by: Jean-Baptiste Kempf <jb@videolan.org>
CC: libav-stable@libav.org
2013-09-29 21:50:30 +02:00
Martin Storsjö
c231987662 mov: Make sure the read sample count is nonnegative
This avoids setting a negative number of frames, ending up with a
negative average frame rate.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 20:00:45 +03:00
Martin Storsjö
640a2427aa bfi: Add some very basic sanity checks for input packet sizes
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 19:59:32 +03:00
Martin Storsjö
9fc7184d1a bfi: Avoid divisions by zero
If a zero-length video packet is to be returned, just return
AVERROR(EAGAIN) and switch back to the audio stream.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 19:58:56 +03:00
Martin Storsjö
a9221e3960 electronicarts: Add more sanity checking for the number of channels
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 19:58:41 +03:00
Martin Storsjö
d07aa3f02b riffdec: Add sanity checks for the sample rate
This avoids a division by zero for G726.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 19:58:18 +03:00
Martin Storsjö
28ff439efd mvi: Add sanity checking for the audio frame size
This avoids a division by zero.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 19:57:43 +03:00
Martin Storsjö
adc09136a4 xwma: Avoid division by zero
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 19:56:44 +03:00
Martin Storsjö
8d07258bb6 avidec: Make sure a packet is large enough before reading its data
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 19:56:22 +03:00
Martin Storsjö
68ff998128 vqf: Make sure the bitrate is in the valid range
Even if the sample rate is valid, an invalid bitrate could
pass the mode combination test below.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 18:46:39 +03:00
Martin Storsjö
9277050e29 vqf: Make sure sample_rate is set to a valid value
This avoids divisions by zero later (and possibly assertions in
time base scaling), since an invalid rate_flag combined with an
invalid bitrate below could pass the mode combination test.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 18:46:21 +03:00
Michael Niedermayer
f2eb474a5a avformat/mpegenc: check, warn and clip muxrate to syntactical possible values
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-29 17:02:57 +02:00
Michael Niedermayer
8c1253c934 avformat/mpegenc: check, warn and clip VBV value to within syntactically possible values
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-29 17:02:06 +02:00
Michael Niedermayer
28d35dbe9f avformat/mpegenc: fix muxrates AVOption maximum value
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-29 17:00:54 +02:00
Michael Niedermayer
a0fec71ebd avformat/mxfenc: instance number is just 24 bits
Fixes assertion failure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-29 14:33:40 +02:00
Carl Eugen Hoyos
d87ff55502 Remove an incorrect and unneeded assert in the amr demuxer.
Asserting a specific codec is not correct since libavformat
allows forcing a codec, an equivalent check is in the
following line.

Fixes ticket #3001.
2013-09-29 07:11:56 +02:00
Matthieu Bouron
c461265a76 lavf/mxfdec: add j2k codec to intra only codecs
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-28 22:57:52 +02:00
Michael Niedermayer
a63b479d11 avformat/utils: factor find_decoder() out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-28 18:11:13 +02:00
Paul B Mahol
07da0854fe avformat/vfq: fix deadlock in vqf_read_header()
Fixes #3010.
Reported-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-09-28 15:36:54 +00:00
Michael Niedermayer
9790a03e67 avformat/mxfdec: check sample size more completely
Fixes division by zero
Fixes Ticket2992

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-27 19:09:15 +02:00
Michael Niedermayer
df21537dfb avformat/tls: fix {} error for the GNUTLS case
Found-by:" Geek.Song" <ffmpeg@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-27 15:59:19 +02:00
Michael Niedermayer
d8d235ffe9 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  lxf: check the nb_streams instead of relying on padding

Conflicts:
	libavformat/lxfdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-27 13:27:31 +02:00
Michael Niedermayer
e82071e727 Merge commit '839df90c718dcab9b9e91ca3c7e73479b3e8103c'
* commit '839df90c718dcab9b9e91ca3c7e73479b3e8103c':
  lxf: Support 16-channel files
  lxf: Support version 1 files

Conflicts:
	libavformat/lxfdec.c

See: e701b0cf75
See: 1a06d6dd86
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-27 12:31:15 +02:00
Michael Niedermayer
72eddc10fa Merge commit 'd872fb0f7ff2ff0ba87f5ccf6a1a55ca2be472c9'
* commit 'd872fb0f7ff2ff0ba87f5ccf6a1a55ca2be472c9':
  lavf: Reset the entry count and allocation size variables on av_reallocp failures

Conflicts:
	libavformat/avienc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-27 12:13:41 +02:00
Michael Niedermayer
328a5b93d3 Merge commit '06ebc0bf9a6401733a4ce1310325de19f631819a'
* commit '06ebc0bf9a6401733a4ce1310325de19f631819a':
  lavf: Allocate arrays with av_realloc if they will be realloced later

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-27 11:45:37 +02:00
Michael Niedermayer
47c5c942f8 Merge commit '1af78b865b66acb8020c54262f12aa41ad47e05c'
* commit '1af78b865b66acb8020c54262f12aa41ad47e05c':
  rtpdec_qt: Add an accidentally removed allocation return value check

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-27 11:38:49 +02:00
Michael Niedermayer
f31c36e552 Merge commit '705b748e8d8612385c96428ae36ed0d42a170d93'
* commit '705b748e8d8612385c96428ae36ed0d42a170d93':
  tls: Add support for listen mode

Conflicts:
	doc/protocols.texi
	libavformat/tls.c
	libavformat/version.h

See: 4f4eb380f0
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-27 11:33:19 +02:00
Michael Niedermayer
689a1bd917 Merge commit '5c53bf7aaf03748464cbf978bffe7ffdb71112b1'
* commit '5c53bf7aaf03748464cbf978bffe7ffdb71112b1':
  http: Pass options through to the nested protocol

Conflicts:
	libavformat/http.c

See: b6f435fbc8
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-27 10:38:04 +02:00
Michael Niedermayer
e6e71fd7b5 Merge commit '8b09d917e7dc7d7f2ace31419f802d4ff518236c'
* commit '8b09d917e7dc7d7f2ace31419f802d4ff518236c':
  tls: Add options for verifying the peer certificate

Conflicts:
	doc/protocols.texi
	libavformat/tls.c
	libavformat/version.h

See: b2460858f6
See: 973a758f52
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-27 09:33:28 +02:00
Luca Barbato
5c349ad08a lxf: check the nb_streams instead of relying on padding
Remove the now unneeded stream pointer while at it.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-09-27 01:33:46 +02:00
Paul B Mahol
a529fa2f4d lxf: remove deplanarization hack
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-09-27 01:33:46 +02:00
Carl Eugen Hoyos
839df90c71 lxf: Support 16-channel files
Reported, analyzed and tested by Gabriel Gerard.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-09-27 01:33:45 +02:00
Paul B Mahol
7e52080cb1 pcm: support 24-bit/32-bit little-endian planar
Used by LXF.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-09-27 01:33:45 +02:00
Reimar Döffinger
779951cd2c lxf: Support version 1 files
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-09-27 01:33:45 +02:00
Martin Storsjö
d872fb0f7f lavf: Reset the entry count and allocation size variables on av_reallocp failures
When av_reallocp fails, the associated variables that keep track of
the number of elements in the array (and in some cases, the
separate number of allocated elements) need to be reset.

Not all of these might technically be needed, but it's better to
reset them if in doubt, to make sure variables don't end up
conflicting.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-26 23:14:03 +03:00
Martin Storsjö
06ebc0bf9a lavf: Allocate arrays with av_realloc if they will be realloced later
Pointers returned from av_malloc can't in general be passed
to av_realloc.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-26 23:13:53 +03:00
Martin Storsjö
1af78b865b rtpdec_qt: Add an accidentally removed allocation return value check
This check was mistakenly removed in 5626f994f.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-26 23:13:50 +03:00
Martin Storsjö
705b748e8d tls: Add support for listen mode
Also add options for specifying a certificate and key, which can
be used both when operating as client and as server.

Partially based on a patch by Peter Ross.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-26 23:13:35 +03:00
Martin Storsjö
5c53bf7aaf http: Pass options through to the nested protocol
When passing a dict to the nested protocol, it will consume
the used options from it, so a separate copy needs to be used
when reopening the connection multiple times.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-26 23:13:16 +03:00
Martin Storsjö
8b09d917e7 tls: Add options for verifying the peer certificate
A file containing the trusted CA certificates needs to be
supplied via the ca_file AVOption, unless the TLS library
has got a system default file/database set up.

This doesn't check the hostname of the peer certificate with
openssl, which requires a non-trivial piece of code for
manually matching the desired hostname to the string provided
by the certificate, not provided as a library function.

That is, with openssl, this only validates that the received
certificate is signed with the right CA, but not that it is
the actual server we think we're talking to.

Verification is still disabled by default since we can't count
on a proper CA database existing at all times.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-26 23:13:06 +03:00
Michael Niedermayer
5dc6c0ea9e avformat/mpegts: check avio_tell() return code before using it
Fixes Ticket2962

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-26 16:43:55 +02:00
Michael Niedermayer
e024953722 avformat/wavdec: check smv_frames_per_jpeg
Values outside would not be possible due to limitations of jpeg itself

Fixes very long running loop
Fixes Ticket2977

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-26 14:56:32 +02:00
Michael Niedermayer
cd05c4060a avformat/mpegenc: minor simplification / use AV_WB16()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-26 13:36:45 +02:00
Michael Niedermayer
32cde96296 avformat/mpegenc: Better heuristic for ordering packets
This prevents underflows in quite constrained cases

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-26 03:13:38 +02:00
Michael Niedermayer
930406325c avformat/mpegenc: Better default for max_delay
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-26 03:12:20 +02:00
Michael Niedermayer
b637118086 avformat/mpegenc: change assert to av_assert0
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-26 02:16:12 +02:00
Michael Niedermayer
ddd0e23d58 avformat/mpegenc: improve field names in underflow error message
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-26 01:07:24 +02:00
Michael Niedermayer
57070d9892 Merge commit '668643b9239c70b777aea322eab411ebc960d9a0'
* commit '668643b9239c70b777aea322eab411ebc960d9a0':
  matroskadec: check av_strdup() when setting defaults

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-25 09:39:24 +02:00
Anton Khirnov
668643b923 matroskadec: check av_strdup() when setting defaults 2013-09-24 17:11:50 +02:00
Michael Niedermayer
fb45de779c avformat/omadec: simplify checks in nprobe()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-24 00:29:02 +02:00
Michael Niedermayer
8c766228c1 Merge commit 'f2b00a5372bfa1d82a8ab99cb8eafac8a9473494'
* commit 'f2b00a5372bfa1d82a8ab99cb8eafac8a9473494':
  movenc: Return a proper error code for invalid combinations

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-23 14:40:18 +02:00
Michael Niedermayer
eeeb3c8fa3 Merge commit 'f7e616959aff8706edccdae763c24c897c449f6f'
* commit 'f7e616959aff8706edccdae763c24c897c449f6f':
  electronicarts: Check packet sizes before reading

Conflicts:
	libavformat/electronicarts.c

See: fb1ea777b3
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-23 14:27:09 +02:00
Michael Niedermayer
ef7e8efc6b Merge commit 'ce67f442be0f6c4a8794272873852e256b5b8ee4'
* commit 'ce67f442be0f6c4a8794272873852e256b5b8ee4':
  lavf: Avoid setting avg_frame_rate if delta_dts is negative

Conflicts:
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-23 14:19:13 +02:00
Michael Niedermayer
341dc59053 Merge commit 'f1eac2b8a0370b908cd691086d11f51342054730'
* commit 'f1eac2b8a0370b908cd691086d11f51342054730':
  movenc: Use keyframes as default fragmentation point in ismv

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-23 13:09:53 +02:00
Michael Niedermayer
d4574b7608 Merge commit 'a9553bbb336a7186c62b3b14a0499c1b6ba61ebd'
* commit 'a9553bbb336a7186c62b3b14a0499c1b6ba61ebd':
  movenc: Set all implicit flags immediately in mov_write_header

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-23 12:24:19 +02:00
Michael Niedermayer
b189c699b9 Merge commit '187023f6b2b43966acb2449a379b4ededdc4b22e'
* commit '187023f6b2b43966acb2449a379b4ededdc4b22e':
  movenc: Set mov->mode earlier in mov_write_header

Conflicts:
	libavformat/movenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-23 12:17:10 +02:00
Michael Niedermayer
03e9506aae Merge commit '5055035670bd1a1eaca64bd3bc71fb07de9df2c3'
* commit '5055035670bd1a1eaca64bd3bc71fb07de9df2c3':
  tls: Do not abort on non-fatal TLS alerts with gnutls

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-23 12:01:53 +02:00
Michael Niedermayer
09e06cd90f Merge commit 'c951e4b442df9dde6051634a85359eb809bf2142'
* commit 'c951e4b442df9dde6051634a85359eb809bf2142':
  flv: Make onTextData parsing robust

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-23 11:56:29 +02:00
Michael Niedermayer
eaa20afa76 Merge commit 'ba77757a7efafe38924b6b423acfca8c1e1c62d6'
* commit 'ba77757a7efafe38924b6b423acfca8c1e1c62d6':
  rtmp: Replace a magic number with a macro

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-23 11:45:38 +02:00
Michael Niedermayer
c70e647a15 Merge commit '5840473890440dbe0bd2cce530ebb3d93e187ae6'
* commit '5840473890440dbe0bd2cce530ebb3d93e187ae6':
  rtmp: Rewrite embedded flv handling

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-23 11:40:15 +02:00
Michael Niedermayer
eee8cb42d0 Merge commit 'e40a0e822801d2485e4e555909d7a82713fa86a5'
* commit 'e40a0e822801d2485e4e555909d7a82713fa86a5':
  rtmp: Refactor get_packet

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-23 11:36:06 +02:00
Michael Niedermayer
f3a02f4bc1 Merge commit '32a414f316c7f0eea877370e3f9d9f25afbf5da2'
* commit '32a414f316c7f0eea877370e3f9d9f25afbf5da2':
  rtmp: Support AMF_DATA_TYPE_MIXEDARRAY

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-23 11:31:13 +02:00
Martin Storsjö
b6c7bd53f4 movenchint: Clear size and len if the realloc failed
Previously these were left in an inconsistent state.

Pointed out by Michael Niedermayer.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-22 21:02:52 +03:00
Martin Storsjö
f2b00a5372 movenc: Return a proper error code for invalid combinations
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-22 21:02:52 +03:00
Martin Storsjö
f7e616959a electronicarts: Check packet sizes before reading
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-22 21:02:52 +03:00
Martin Storsjö
ce67f442be lavf: Avoid setting avg_frame_rate if delta_dts is negative
This avoids setting avg_frame_rate to invalid (negative)
values.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-22 21:02:52 +03:00
Michael Niedermayer
a5cbf1991c avformat/mov: reset extradata size when extradata gets deallocated due to realloc failure
This prevents the fields from becoming inconsistent

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-22 16:11:02 +02:00
Martin Storsjö
f1eac2b8a0 movenc: Use keyframes as default fragmentation point in ismv
Fragmenting blindly to a certain duration isn't a good choice
if one should be able to switch between different qualities,
therefore default to keyframes instead.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-22 16:10:21 +03:00
Martin Storsjö
a9553bbb33 movenc: Set all implicit flags immediately in mov_write_header
This makes sure other sanity checks for conflicting options
can work properly, e.g. for the conflict between the faststart
flag when using the ismv mode.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-22 16:10:21 +03:00
Martin Storsjö
187023f6b2 movenc: Set mov->mode earlier in mov_write_header
This allows simplifying some early checks that depend on the
muxer mode.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-22 16:10:21 +03:00
Martin Storsjö
5055035670 tls: Do not abort on non-fatal TLS alerts with gnutls
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-22 16:10:21 +03:00
Michael Niedermayer
05b7a635dc avformat/movenchint: use realloc_array() to protect against integer overflow
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-22 15:06:22 +02:00
Michael Niedermayer
63621762ec avformat/movenchint: only change queue size if reallocation succeeded
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-22 15:05:35 +02:00
Michael Niedermayer
091ba02cc8 avformat/movenchint: revert "Use av_reallocp() where suitable"
reverts movenchin part of 5626f994f2
The change left the fields in an inconsistent state

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-22 15:00:08 +02:00
Luca Barbato
c951e4b442 flv: Make onTextData parsing robust
Certain streaming servers do not preserve the order of the fields.
2013-09-22 01:10:17 +02:00
Luca Barbato
ba77757a7e rtmp: Replace a magic number with a macro
11 is the RTMP header size.
2013-09-22 01:09:33 +02:00
Luca Barbato
5840473890 rtmp: Rewrite embedded flv handling
Use update_offset() as done for rtmp audio, video and notifications and
read update and write the fields instead of replacing them in the rtmp
packet and then memcpying it to the output buffer.
2013-09-22 01:09:33 +02:00
Luca Barbato
e40a0e8228 rtmp: Refactor get_packet 2013-09-22 01:09:33 +02:00