Commit Graph

57275 Commits

Author SHA1 Message Date
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
Michael Niedermayer
005200887b Merge commit 'eb90a2091ffb94d8c29aaa5ff50f4192520254fc'
* commit 'eb90a2091ffb94d8c29aaa5ff50f4192520254fc':
  pthread: Fix deadlock during thread initialization

Conflicts:
	libavcodec/pthread.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-14 00:04:52 +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
fe448cd28d avcodec/jpeg2000dec: prevent out of array accesses in pixel addressing
Fixes Ticket2921

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-13 21:48:36 +02:00
Michael Niedermayer
e54f4510aa avcodec/jpeg2000: zero i/f_data
Fixes uninitialized use of variables

Fixes part of Ticket2921

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-13 21:48:28 +02:00
Michael Niedermayer
ede7602cba Merge remote-tracking branch 'cus/stable'
* cus/stable:
  ffplay: add support for changing the channel by the C key
  ffplay: cycle through the streams of the current program, and not every stream
  ffplay: add null packet after attached pics packet
  ffplay: factor out putting null packet into the queue

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-13 19:37:20 +02:00
Michael Niedermayer
ac3b01a9c0 avcodec/jpeg2000dec: check transform equality in MCT
Fixes null pointer dereference
Fixes Ticket2843

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-13 19:23:24 +02: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
Luca Barbato
39185ec4fa cavs: Check for negative cbp
Sample-Id: 00000647-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-10-13 17:52:53 +02:00
Luca Barbato
1b20d0f581 cavs: Return meaningful error values 2013-10-13 17:52:53 +02:00
Luca Barbato
14ddbb477f cavs: K&R formatting cosmetics 2013-10-13 17:52:53 +02:00
Marton Balint
3130416aec ffplay: add support for changing the channel by the C key
Signed-off-by: Marton Balint <cus@passwd.hu>
2013-10-13 12:46:14 +02:00
Marton Balint
543d81a707 ffplay: cycle through the streams of the current program, and not every stream
When changing the audio, video or subtitle stream, from now on, ffplay will
cycle through the streams of the current program.

Signed-off-by: Marton Balint <cus@passwd.hu>
2013-10-13 12:31:52 +02:00
Marton Balint
0258e4dc8b ffplay: add null packet after attached pics packet
Fixes ticket #2904.

Signed-off-by: Marton Balint <cus@passwd.hu>
2013-10-13 12:31:52 +02:00
Marton Balint
b118d3e24d ffplay: factor out putting null packet into the queue
Signed-off-by: Marton Balint <cus@passwd.hu>
2013-10-13 12:31:52 +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
Derek Buitenhuis
eb90a2091f pthread: Fix deadlock during thread initialization
Sometimes, if pthread_create() failed, then pthread_cond_wait() could
accidentally be called in the worker threads after the uninit function
had already called pthread_cond_broadcast(), leading to a deadlock.

Don't call pthread_cond_wait() if c->done is set.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-13 05:50:00 -04:00
Michael Niedermayer
4b948dcadb doc/developer: Merge license related policy items
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-13 10:46:32 +02:00
Michael Niedermayer
43dec5ef9a Merge remote-tracking branch 'qatar/master'
* qatar/master:
  indeo4: Check the inherited quant_mat

Conflicts:
	libavcodec/indeo4.c

See: 884efd4e09
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-13 10:38:51 +02:00
Michael Niedermayer
d3850ac5b9 Merge commit '0cb83c563848bf8f8365e7bd30e7e6b57ef360f0'
* commit '0cb83c563848bf8f8365e7bd30e7e6b57ef360f0':
  indeo4: Check the block size if reusing the band configuration

Conflicts:
	libavcodec/indeo4.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-13 10:19:15 +02: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
40ade07141 Merge commit '16ea20c827ef2ffaf77d5e05d5cf9983689f7b2b'
* commit '16ea20c827ef2ffaf77d5e05d5cf9983689f7b2b':
  lavc doxy: extend/clarify avcodec_decode_audio4() doxy

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-13 08:17:01 +02:00
Michael Niedermayer
29d64b1d8e Merge commit '66d3f5fd5ca4cb3d09b52ad1041cd4359325a21a'
* commit '66d3f5fd5ca4cb3d09b52ad1041cd4359325a21a':
  lavc doxy: remove false statements about alignment requirements.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-13 08:09:28 +02:00
Michael Niedermayer
b35ef855a4 Merge commit '364af376f343d4706c4cdb7ab9fe0863994e6c01'
* commit '364af376f343d4706c4cdb7ab9fe0863994e6c01':
  FATE: add lavr resampling tests

The tests do not pass, and thus where disabled

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-13 08:01:56 +02:00
Michael Niedermayer
de80cebdd7 Merge commit '9ab5f7107d2f1411e9fda6c36af64524e5ed31d1'
* commit '9ab5f7107d2f1411e9fda6c36af64524e5ed31d1':
  FATE: add lavr mixing tests

The tests do not pass, and thus where disabled

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-13 07:32:11 +02:00
Michael Niedermayer
830a567e96 Merge commit 'df6737a55f5dc7c0ae5272bc5fa6182836d5481c'
* commit 'df6737a55f5dc7c0ae5272bc5fa6182836d5481c':
  audio_mix: fix channel order in mix_1_to_2_fltp_flt_c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-13 06:48:35 +02:00
Luca Barbato
c9ef6b0932 indeo4: Check the inherited quant_mat
Invalidate it if not supported.

Sample-Id: 00000262-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-10-13 01:38:21 +02:00
Luca Barbato
0cb83c5638 indeo4: Check the block size if reusing the band configuration
Sample-Id: 00000287-google

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-10-13 01:38:20 +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
Paul B Mahol
cfc9a4c732 avfilter/vsrc_testsrc: smpte(hd)bars: use yuv directly
Also set color space.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-10-12 18:40:15 +00:00
Paul B Mahol
1d8ce109e9 avfilter/vf_separatefields: do not reset pts to 0
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-10-12 15:10:19 +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
Anton Khirnov
16ea20c827 lavc doxy: extend/clarify avcodec_decode_audio4() doxy
Elaborate on flushing the decoder.
2013-10-12 15:10:21 +02:00