10196 Commits

Author SHA1 Message Date
Carl Eugen Hoyos
72791e41d4 Fix muxing mjpeg in swf.
(cherry picked from commit 7680d99b4302e476076cc1b8f2567f47c2aaef4d)
2012-09-13 09:21:26 +02:00
Reimar Döffinger
fb52da522c oggdec: Initialize stream index to -1 in ogg_packet.
The previous method of having to initialize it outside lead
to incorrect code: even if it was initialized, it usually was
only initialized once, thus a packet that could not be matched
to any stream would just be processed with the return values
from the previous call.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
(cherry picked from commit 69aeba1396d5a13e79cbc3cc9f49fd6896addb82)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-06 16:52:18 +02:00
Reimar Döffinger
5231a35559 oggdec: simplify start time calculation code.
Also slightly more correct behaviour in case streams_left for
some reason is 0 from the start.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
(cherry picked from commit a4163b2d6583396845e06b1b976c3a981eb8cb1c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-06 16:52:09 +02:00
Michael Niedermayer
606538df6c oggdec: check stream index before using it in ogg_get_length()
Fixes crash based on a uninitialized array index read.
If the read does not crash then out of array writes based
on the same index might have been triggered afterwards.

Found-by: inferno@chromium.org
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 9e1c55cfdec1e1e46fa39b92ea5c425ba9499c68)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-06 16:51:59 +02:00
Carl Eugen Hoyos
af3f7c88f2 Add missing CRLFs to avisynth error messages.
(cherry picked from commit 1faf0d6a7a70cb0bcfbbff0421fb00bb6da658f9)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-07 00:55:26 +02:00
Carl Eugen Hoyos
b4294e2319 Fix MP2 muxer Makefile dependencies.
Found, analysed and tested by trac user Jamal.

Fixes ticket #1411
(cherry picked from commit 757d5b9bfda45e45d9ab28ad4d5a9205119fe549)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-07 00:55:26 +02:00
Michael Niedermayer
e863d3306f oggdec: fix regression that caused reading the whole file during open
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e0eaf1004910e451cbb8dbcb5c54ac63721adb61)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-07 00:55:25 +02:00
Michael Niedermayer
d0cb4dc471 lavf: use input keyframe flag when muxer does not provide keyframe flags.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5665674b55a45df757ed4fcd076a5cdf9ab484b6)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-07 00:55:25 +02:00
Michael Niedermayer
f1150e0c7d dv-demux: dont mess with codec values
Fixes part of Ticket1369

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-07 00:55:24 +02:00
Clément Bœsch
f46b57657b jacosub_probe: slightly increase the score to limit misdetection.
(cherry picked from commit 303619d3ca9efa0031f6fede7dedeb27fcfb1756)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-07 00:55:24 +02:00
Clément Bœsch
662ab44c2d jacosub_probe: speedup by making only one call to sscanf
(cherry picked from commit 908293d1bcaa0e059561bec8ae0b3ad1fde2d196)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-07 00:55:24 +02:00
Michael Niedermayer
7f0f6602cb oggparsevorbis: fix null ptr dereference
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 18b46a494ef3592d69f4638dac1ebb613c0f548d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-07 00:55:24 +02:00
Michael Niedermayer
0a311df6d9 ipmovie_probe: speedup by avoiding memcmp() call
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit cc4d80c99ff3169b71c62691d5c7602ef673c3dc)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-07 00:55:24 +02:00
Michael Niedermayer
48094cb23a ac3_probe: speedup by checking for header earlier
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ebfe0c6eb800222955d480b943b646e7a6ee2a1c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-07 00:55:24 +02:00
Michael Niedermayer
eecbd9a78f avidec: fix odd extradata size case.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 57778f61d0ae2059ed95567f8e5b568fa817d33e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-07 00:55:24 +02:00
Michael Niedermayer
a441a96eb2 libavformat: ff_get_bmp_header: return esize too
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 76853a3e0ce4d4ef09ffcca7307991b8db832cd4)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-07 00:55:24 +02:00
Michael Niedermayer
3768afd5a5 ape: Fix null ptr dereference with files missing a seekatable.
Such files are currently not supported as the table is used at several points

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e7cb161515fc9fb6d30d1681d64d9ba7ad737a4e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-07 00:55:23 +02:00
Michael Niedermayer
e0f0486c7f movdec: Check count of stts/ctts elements instead of just the pointer.
Fixes overreading the array

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5880d788734d9c4e2dc53c6cdec343ee978d3a3f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-07 00:55:23 +02:00
Michael Niedermayer
56e987d2cd 4xm: fix division by zero caused by bps<8
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 1b8741a6843f3f4667c81c2d63d3182858aa534f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-07 00:55:23 +02:00
Michael Niedermayer
88a145738b avienc: create xsub in avi files that are closer to whats in the wild
Fixes ticket1332

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-27 23:25:29 +02:00
Michael Niedermayer
65e63072f8 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtmp: Return a proper error code instead of -1
  rtmp: Check malloc calls
  rtmp: Check ff_rtmp_packet_create calls
  lavfi: add audio mix filter
  flvdec: Make sure sample_rate is set to the updated value
  tqi: Pass errors from the MB decoder

Conflicts:
	Changelog
	doc/filters.texi
	libavcodec/eatqi.c
	libavfilter/Makefile
	libavfilter/allfilters.c
	libavfilter/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-25 00:38:16 +02:00
Samuel Pitoiset
a4d3f3580b rtmp: Return a proper error code instead of -1
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-24 00:25:36 +03:00
Samuel Pitoiset
08e93f5b46 rtmp: Check malloc calls
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-24 00:25:35 +03:00
Samuel Pitoiset
f645f1d6ea rtmp: Check ff_rtmp_packet_create calls
Check malloc calls used by ff_rtmp_packet_create, unify error
handling and pass on error codes.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-24 00:25:35 +03:00
Michael Niedermayer
d0ad91c258 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  os_support: Define SHUT_RD, SHUT_WR and SHUT_RDWR on OS/2
  http: Add support for reading http POST reply headers
  http: Add http_shutdown() for ending writing of posts
  tcp: Allow signalling end of reading/writing
  avio: Add a function for signalling end of reading/writing
  lavfi: fix comment, audio is supported now.
  lavfi: fix incorrect comment.
  lavfi: remove avfilter_null_* from public API on next bump.
  lavfi: remove avfilter_default_* from public API on next bump.
  lavfi: deprecate default config_props() callback and refactor avfilter_config_links()
  avfiltergraph: smarter sample format selection.
  avconv: rename transcode_audio/video to decode_audio/video.
  asyncts: reset delta to 0 when it's not used.
  x86: lavc: use %if HAVE_AVX guards around AVX functions in yasm code.
  dwt: return errors from ff_slice_buffer_init()

Conflicts:
	ffmpeg.c
	libavfilter/avfilter.c
	libavfilter/avfilter.h
	libavfilter/formats.c
	libavfilter/version.h
	libavfilter/vf_blackframe.c
	libavfilter/vf_drawtext.c
	libavfilter/vf_fade.c
	libavfilter/vf_format.c
	libavfilter/vf_showinfo.c
	libavfilter/video.c
	libavfilter/video.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-23 21:48:31 +02:00
Martin Storsjö
1e8561e369 flvdec: Make sure sample_rate is set to the updated value
The sample_rate variable is used for checks for audio format
changes at the end of the function.

This fixes cases where the sample rate was set from the codec
id by flv_set_audio_codec (as for nellymoser 8 kHz/16 kHz),
so the value set to last_sample_rate wasn't equal to sample_rate
at this point. This caused the demuxer otherwise reports a spurious
change to 5512 Hz and back to the correct one.

Updating channels in the same way is only done for consistency.
Currently, flv_set_audio_codec doesn't update that value.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-23 22:23:43 +03:00
Michael Niedermayer
d0f78e77e1 avidec: simplify avi_read_idx1()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-23 19:49:25 +02:00
Michael Niedermayer
212f129fb8 avidec: discard 0 packets even for sample_size==0 NI
Fixes Ticket1332

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-23 19:04:23 +02:00
Michael Niedermayer
121d3875b6 lavf: print the invalid tb in avpriv_set_pts_info()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-23 19:04:23 +02:00
Dave Yeo
3f9d6e4239 os_support: Define SHUT_RD, SHUT_WR and SHUT_RDWR on OS/2
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-23 10:38:14 +03:00
Samuel Pitoiset
e5773d8bc3 http: Add support for reading http POST reply headers
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-22 23:16:46 +03:00
Samuel Pitoiset
ba354a8cc0 http: Add http_shutdown() for ending writing of posts
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-22 23:16:44 +03:00
Samuel Pitoiset
4a9ca93556 tcp: Allow signalling end of reading/writing
tcp_shutdown() isn't needed at the moment, but is added for
consistency to explain how the function is supposed to be used.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-22 23:16:42 +03:00
Samuel Pitoiset
32d545e0a4 avio: Add a function for signalling end of reading/writing
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-22 23:16:41 +03:00
Matthieu Bouron
f452d6c34d mxfdec: fix frame height computation for mixed fields layout
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-22 15:04:59 +02:00
Michael Niedermayer
1dd71e1cd5 rawdec: force timestamps from codec to be used
This fixes playback timing with at least m4v files

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-22 14:59:02 +02:00
Michael Niedermayer
a6b3471c44 avformat: add needs_parsing type to enable codec TS use.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-22 14:59:02 +02:00
Michael Niedermayer
938adb7abc Merge remote-tracking branch 'qatar/master'
* qatar/master:
  dwt: K&R prettyprinting cosmetics
  Remove libnut wrapper
  fate: change name of FATE samples location environment variable
  avformat: Add a flag to mark muxers that allow (non strict) monotone timestamps.
  http: Factorize the code by adding http_read_header()

Conflicts:
	configure
	doc/APIchanges
	doc/fate.texi
	libavcodec/dwt.c
	libavcodec/dwt.h
	libavformat/Makefile
	libavformat/avformat.h
	libavformat/libnut.c
	libavformat/matroskaenc.c
	libavformat/utils.c
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-21 23:53:39 +02:00
Michael Niedermayer
faa2930f19 flvdec: reenable extradata passing code
This fixes passing junk in stream.
It should not have any user vissible effect.
We are discarding the new data in the decoder as no case is known
where it is needed but it causes problems if used.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-21 21:19:43 +02:00
Diego Biurrun
db9e00f469 Remove libnut wrapper
libnut is unmaintained and known to be buggy; native NUT code exists.
2012-05-21 08:51:50 +02:00
James Zern
e9cef89702 avformat: Add a flag to mark muxers that allow (non strict) monotone timestamps.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-05-20 19:50:32 -04:00
Michael Niedermayer
349c62410b Merge remote-tracking branch 'qatar/master'
* qatar/master:
  indeo: Make ivi_calc_band_checksum() static, it is only used in one file.
  indeo: Drop unused debug function ivi_check_band().
  avcodec/utils: cast a function argument to shut up a compiler warning
  truemotion1: remove disabled code
  fix typo in comment
  fate: fix dependencies for non-SAMPLES avconv tests
  indeo: check for invalid motion vectors
  indeo: check that band output buffer exists
  indeo: clear allocated band buffers
  indeo: track tile macroblock size
  indeo: check custom Huffman tables for errors
  factor out common decoding code for Indeo 4 and Indeo 5
  mp3: fix start band index for block type 2 in 8kHz audio
  lavf: change some (de)muxer names to lowercase
  lavf: make output format matching case insensitive

Conflicts:
	libavcodec/indeo4.c
	libavcodec/indeo5.c
	libavcodec/ivi_common.c
	libavcodec/utils.c
	tests/fate/video.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-20 22:58:04 +02:00
Marton Balint
b36a0a80fc lavf: also use codec aspect ratio in av_guess_sample_aspect_ratio
Use codec aspect ratio for frame aspect ratio if AVFrame is NULL.

Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-20 19:36:00 +02:00
Samuel Pitoiset
5d603f1b65 http: Factorize the code by adding http_read_header()
This function is used for reading http reply headers.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-20 20:20:50 +03:00
Piotr Bandurski
4d18f4c15b id3v2: reject APICs with size of 0
fixes ticket #1324

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-20 16:29:08 +02:00
Mans Rullgard
68aef0b481 lavf: change some (de)muxer names to lowercase
This is consistent with other format names.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-05-19 19:44:16 +01:00
Mans Rullgard
81ad97eeda lavf: make output format matching case insensitive
This is consistent with how input formats are matched.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-05-19 19:44:15 +01:00
Michael Niedermayer
040a796dab Merge commit '755cd4197d53946208e042f095b930dca18d9430'
* commit '755cd4197d53946208e042f095b930dca18d9430':
  mov: enable parsing for VC-1.
  lavfi: Add fps filter.
  lavfi: initialize pts to AV_NOPTS_VALUE when creating new buffer refs.
  avconv: add support for audio in complex filtergraphs.

Conflicts:
	ffmpeg.c
	libavfilter/version.h
	libavformat/mov.c
	tests/ref/fate/vc1-ism

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-19 20:31:24 +02:00
Clément Bœsch
e5fcf3646a lavf/id3v2: always strdup the value.
This simplifies the code but also fix a warning: ff_id3v1_genre_str
array contains const strings so do the string dup now instead of in
av_dict_set().
2012-05-19 12:29:30 +02:00
Clément Bœsch
6ad974ae1c lavf/id3v2: do not export empty fields.
This also avoids a memleak.
2012-05-19 12:29:30 +02:00