Commit Graph

9105 Commits

Author SHA1 Message Date
Michael Niedermayer
ad9e0ed170 avio: fix handling of , in urls
Fixes Ticket805

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-23 23:59:10 +01:00
Michael Niedermayer
8ff4fff774 flvdec: disable new midstream param change code not only for h264 but all cases.
It breaks some samples and iam not aware of one that it fixes.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-23 23:06:56 +01:00
Michael Niedermayer
d1c28e3530 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  build: fix standalone compilation of OMA muxer
  build: fix standalone compilation of Microsoft XMV demuxer
  build: fix standalone compilation of Core Audio Format demuxer
  kvmc: fix invalid reads
  4xm: Add a check in decode_i_frame to prevent buffer overreads
  adpcm: fix IMA SMJPEG decoding
  options: set minimum for "threads" to zero
  bsd: use number of logical CPUs as automatic thread count
  windows: use number of CPUs as automatic thread count
  linux: use number of CPUs as automatic thread count
  pthreads: reset active_thread_type when slice thread_init returrns early
  v410dec: include correct headers
  Drop ALT_ prefix from BITSTREAM_READER_LE name.
  lavfi: always build vsrc_buffer.
  ra144enc: zero the reflection coeffs if the filter is unstable
  sws: readd PAL8 to isPacked()
  mov: Don't stick the QuickTime field ordering atom in extradata.
  truespeech: fix invalid reads in truespeech_apply_twopoint_filter()

Conflicts:
	configure
	libavcodec/4xm.c
	libavcodec/avcodec.h
	libavfilter/Makefile
	libavfilter/allfilters.c
	libavformat/Makefile
	libswscale/swscale_internal.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-23 03:25:51 +01:00
Michael Niedermayer
9f50dafe90 udp: support non blocking reads with fifo
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-23 01:51:47 +01:00
Michael Niedermayer
bc900501e0 udp: Replace double select() by select+mutex+cond.
When no data was available both the buffer thread as well as
the main thread would block in select(), when data becomes
available both should move forward and as data is read in the
buffer thread the main thread would block in select() later
the read data was put in the fifo but the main thread still
would be blocked in select() until either the timeout or
another packet would come in.

This is solved in this commit by using a mutex and a condition
variable

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-23 01:42:42 +01:00
Michael Niedermayer
3dcbafc777 udp: return circular buffer error if such error happened.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-23 01:41:15 +01:00
Diego Biurrun
4e8d6218c3 build: fix standalone compilation of OMA muxer
The muxer depends on the id3v2 writing code, so link against it.
2011-12-23 00:45:11 +01:00
Diego Biurrun
e2c97aee39 build: fix standalone compilation of Microsoft XMV demuxer
The demuxer depends on the RIFF codec tags code, so link against it.
2011-12-23 00:45:10 +01:00
Diego Biurrun
408dbbd0a7 build: fix standalone compilation of Core Audio Format demuxer
The demuxer depends on code from mov.c, which in turn depends on
code from mov_chan.c, so link against it.
2011-12-23 00:45:08 +01:00
Michael Niedermayer
dd1fb65287 Merge remote-tracking branch 'tjoppen/fuzz_fixes'
* tjoppen/fuzz_fixes:
  mxfdec: Don't crash in mxf_packet_timestamps() if current_edit_unit overflows
  mxfdec: Zero nb_ptses in mxf_compute_ptses_fake_index()
  mxfdec: Sanity check PreviousPartition
  mxfdec: Never seek back in local sets and KLVs
  mxfdec: Move the current_partition check inside mxf_read_header()
  mxfdec: Fix infinite loop in mxf_packet_timestamps()
  mxfdec: Check url_feof() in mxf_read_local_tags()
  mxfdec: Check for NULL component

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-22 14:04:49 +01:00
Alex Converse
4bf3c8f226 mov: Don't stick the QuickTime field ordering atom in extradata.
The 'fiel' atoms can be found in H.264 tracks clobbering the extradata.
MJPEG supports non field based extradata, and this data should be
preserved when copying.
2011-12-21 22:04:37 -08:00
Paul B Mahol
a4209ad631 lavf: Add SMJPEG demuxer.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-22 04:12:45 +01:00
Michael Niedermayer
2a85358d4f libavformat: increase LIBAVFORMAT_VERSION_MICRO to 100
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-22 03:06:06 +01:00
Michael Niedermayer
52c522c720 Merge remote-tracking branch 'qatar/master'
* qatar/master: (27 commits)
  asfdec: add side data to ASFStream packet instead of output packet.
  idroqdec: set AVFMTCTX_NOHEADER and create streams as they occur.
  nellymoserdec: Indicate that the decoder can handle changed parameters
  libavcodec: Apply parameter change side data when decoding audio
  flvdec: Add param change side data if the sample rate or channels have changed
  libavformat: Add a utility function for adding parameter change side data
  libavcodec: Define a side data type for parameter changes
  aacdec: Handle new extradata passed as side data
  flvdec: Export new AAC/H.264 extradata as side data on the next packet
  libavcodec: Define a side data type for new extradata
  flacdec: skip all track indices at once instead of looping.
  mxf: Add PictureEssenceCoding UL for V210.
  mxfdec: consider QuantizationBits between 17 and 24 to be pcm_s24*
  mxfenc: Add support for MPEG-2 MP@HL-14 in mxf container.
  mxf: H.264/MPEG-4 AVC Intra support
  configure: Show whether the safe bitstream reader is enabled
  x86: Tighten register constraints for decode_significance*_x86.
  Replace Subversion revisions in comments by Git hashes.
  h264_cabac: synchronize decode_significance_*_x86 conditionals
  w32threads: wait for the waked thread in pthread_cond_signal.
  ...

Conflicts:
	libavcodec/avcodec.h
	libavcodec/version.h
	libavformat/flvdec.c
	libavformat/utils.c
	tests/ref/lavfi/pixdesc
	tests/ref/lavfi/pixfmts_copy
	tests/ref/lavfi/pixfmts_null
	tests/ref/lavfi/pixfmts_scale
	tests/ref/lavfi/pixfmts_vflip

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-22 01:51:53 +01:00
Michael Niedermayer
8d960fbc70 ipmovie: fix FPE
Fixed Ticket807
Bug found by: Oana Stratulat

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-22 00:25:47 +01:00
Justin Ruggles
e9dc920127 asfdec: add side data to ASFStream packet instead of output packet.
fixes memleak of side data
2011-12-21 17:52:31 -05:00
Justin Ruggles
3f9257c5a5 idroqdec: set AVFMTCTX_NOHEADER and create streams as they occur.
This fixes demuxing of file where the first packet is not audio. Such files
are generated by our idroq muxer. It also fixes demuxing of audio only
idroq files.
2011-12-21 16:51:12 -05:00
Martin Storsjö
2215c39e94 flvdec: Add param change side data if the sample rate or channels have changed
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-12-21 22:52:41 +02:00
Martin Storsjö
3e79c2adb1 libavformat: Add a utility function for adding parameter change side data
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-12-21 22:52:40 +02:00
Martin Storsjö
251f320f7d flvdec: Export new AAC/H.264 extradata as side data on the next packet
Compared to just overwriting the old extradata, this has the
advantage of letting the decoder know exactly when the
extradata changed (otherwise it is changed immediately when the
new extradata packet is demuxed, even if there's old queued packets
awaiting to be decoded). This makes it easier for decoders to
actually react to the change, so they won't have to inspect
the extradata for each packet to see if it might have changed.

This works when sequentially playing a file with sample rate
changes, but if seeking past a new extradata packet in the
file, it obviously doesn't work properly. That case doesn't
work in flash player either, so it's probably ok not to handle
it.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-12-21 22:52:38 +02:00
Nicolas George
20af3af575 mov: replace AVERROR(EOF) with AVERROR_EOF. 2011-12-21 19:23:03 +01:00
Paul B Mahol
17c84f4ed2 flacdec: skip all track indices at once instead of looping.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2011-12-21 10:44:57 -05:00
Tomas Härdin
c15da5941d mxf: Add PictureEssenceCoding UL for V210.
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-12-21 16:28:45 +01:00
Tomas Härdin
6547fd9264 mxfdec: consider QuantizationBits between 17 and 24 to be pcm_s24*
This fixes playback of BRD38772509.mxf.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-12-21 16:28:42 +01:00
Daniel Kristjansson
adff77f28c mxfenc: Add support for MPEG-2 MP@HL-14 in mxf container.
Support Main Profile at High 1440 Level in MXF container,
using essence coding label from SMPTE RDD 9, table 6.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-12-21 16:28:41 +01:00
Baptiste Coudurier
4ee04247f0 mxf: H.264/MPEG-4 AVC Intra support
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-12-21 16:28:26 +01:00
Michael Niedermayer
1fbb859cdf Merge remote-tracking branch 'tjoppen/mxf_fixes_20111220'
* tjoppen/mxf_fixes_20111220:
  mxfdec: Sanity-check SampleRate
  mxfdec: Make sure mxf->nb_index_tables > 0 in mxf_packet_timestamps()
  mxfdec: Remove unused variables
  mxfdec: Make sure x < index_table->nb_ptses
  mxfdec: Ignore the last entry in Avid's index table segments

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-21 15:51:51 +01:00
Tomas Härdin
cc1dda851b mxfdec: Don't crash in mxf_packet_timestamps() if current_edit_unit overflows 2011-12-21 14:18:08 +01:00
Tomas Härdin
0cd21ddaed mxfdec: Zero nb_ptses in mxf_compute_ptses_fake_index()
This fixes SIGSEGV on files with both CBR and VBR index segments (zzuf6.mxf).
2011-12-21 14:18:08 +01:00
Tomas Härdin
46d65fb8a5 mxfdec: Sanity check PreviousPartition
Without this certain files could get the demuxer stuck in a loop
2011-12-21 14:17:44 +01:00
Tomas Härdin
e7839602f4 mxfdec: Never seek back in local sets and KLVs
Specially crafted files can lead the parsing code to take too long.
We fix a lot of these problems by not allowing local tags to extend past the
end of the set and not allowing other KLVs to be read past the end of
themselves.
2011-12-21 14:17:29 +01:00
Tomas Härdin
184f479096 mxfdec: Move the current_partition check inside mxf_read_header()
This fixes SIGSEGV on files where this is actually the case, such as zzuf4.mxf
2011-12-21 14:16:03 +01:00
Tomas Härdin
4ae7d45170 mxfdec: Fix infinite loop in mxf_packet_timestamps()
This can happen if an index table segment has a very large IndexStartPosition.
zzuf3.mxf is an example of such a file.
2011-12-21 14:16:03 +01:00
Tomas Härdin
2116e4ba91 mxfdec: Check url_feof() in mxf_read_local_tags()
This fixes the infinite loop with zzuf2.mxf
2011-12-21 14:15:51 +01:00
Tomas Härdin
5e5e69d078 mxfdec: Check for NULL component
This fixes SIGSEGV with zzuf1.mxf
2011-12-21 13:48:39 +01:00
Michael Niedermayer
077b086dea avio: remove ENOTSUP mention in doxy as its not available on all supported platforms
and thus cannot be used

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-21 04:52:34 +01:00
Michael Niedermayer
3be1a4ba9a Merge remote-tracking branch 'qatar/master'
* qatar/master:
  lavc: always align height by 32 pixel
  raw: add 10bit YUV definitions
  nut: support 10bit YUV
  mpegvideo_enc: separate declarations and statements
  oma: make header compile standalone
  vp3: Reorder some functions to fix VP3 build with Theora disabled.
  build: fix standalone compilation of ADX encoder
  build: fix standalone compilation of ADPCM decoders
  build: fix standalone compilation of mpc7/mpc8 decoders
  4xm: Use bytestream2 functions to prevent overreads
  bytestream: add a new set of bytestream functions with overread checking
  mpegts: Suppress invalid timebase warnings on DMB streams.
  mpegts: Fix typo in handling sections in the PMT.
  vc1dec: Use the right pointer type for the tmp pointer

Conflicts:
	libavcodec/4xm.c
	libavcodec/utils.c
	libavcodec/vc1dec.c
	libavcodec/vp3.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-21 03:40:53 +01:00
Sergey Radionov
139cef8e29 network: properly declare WSADATA in windows
Fixed "ISO C90 forbids mixed declarations and code" in ff_network_init

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-12-21 03:27:19 +01:00
Tomas Härdin
7feb7f16a8 mxfdec: Make sure mxf->nb_index_tables > 0 in mxf_packet_timestamps()
Only the OPAtom demuxing logic is guaranteed to have index tables, meaning OP1a
files that lack an index would cause SIGSEGV.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-21 00:03:43 +01:00
Luca Barbato
432f0e5b7d nut: support 10bit YUV
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-12-21 00:00:03 +01:00
Diego Biurrun
a55eb1586c oma: make header compile standalone 2011-12-20 22:38:53 +01:00
Nicolas George
b0aaf304a7 Replace PATCHWELCOME by relevant error codes.
This supersedes commit 154c0a8.
The bug was also reported by Rafaël Carré.
2011-12-20 19:08:04 +01:00
Alex Converse
41bdd4adc4 mpegts: Suppress invalid timebase warnings on DMB streams.
timestamp_len and timestamp_res intialize to zero.
2011-12-20 09:52:05 -08:00
Alex Converse
d9b89b23df mpegts: Fix typo in handling sections in the PMT.
This was an error rebasing 4682a1dc3a for
commit. The "pes" variable guaranteed to be NULL in that block.
2011-12-20 09:52:04 -08:00
Michael Niedermayer
154c0a8c98 replace ENOTSUP by AVERROR_PATCHWELCOME
This unbreaks compilation
Found by: jb

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-20 18:34:44 +01:00
Michael Niedermayer
c1acd58198 roq: fix excessive memory alloc
Fixes Ticket802
Bug found by: Oana Stratulat

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-20 18:07:14 +01:00
Michael Niedermayer
3c7f75bd84 avidec: move eof check before continue.
Fixes a infinite loop
Fixes half of Ticket800
Bug found by Oana Stratulat

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-20 16:52:42 +01:00
Tomas Härdin
5b718009b2 mxfdec: Sanity-check SampleRate
This avoids a SIGFPE if SampleRate is missing or set to naughty values.
2011-12-20 11:34:48 +01:00
Tomas Härdin
1888bd1b6d mxfdec: Make sure mxf->nb_index_tables > 0 in mxf_packet_timestamps()
Only the OPAtom demuxing logic is guaranteed to have index tables, meaning OP1a
files that lack an index would cause SIGSEGV.
2011-12-20 11:32:59 +01:00
Tomas Härdin
54cbbdd25a mxfdec: Remove unused variables 2011-12-20 09:59:29 +01:00