Commit Graph

1349 Commits

Author SHA1 Message Date
Paul B Mahol
d5f7f1fef1 audio frame multi-threaded decoding
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-05 22:35:31 +00:00
Michael Niedermayer
f6beb36115 Merge commit 'c330eba84cf2370ad72423aa9e410e20afdc52e2'
* commit 'c330eba84cf2370ad72423aa9e410e20afdc52e2':
  lavf: preserve side data when parsing packets.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-28 09:51:19 +02:00
Anton Khirnov
c330eba84c lavf: preserve side data when parsing packets. 2013-05-28 08:00:07 +02:00
Dale Curtis
c54a1565f5 avformat/utils: Keep internal and external av_read_frame() packets in sync.
Otherwise, during error conditions, the caller will be left with
dangling pointers to a destructed packet => boom.

BUG=242786
TEST=ffmpeg_regression_tests

Commit slightly simplified by commiter
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-23 03:29:47 +02:00
Michael Niedermayer
efc08e00cc Merge commit 'b3ea76624ad1baab0b6bcc13f3f856be2f958110'
* commit 'b3ea76624ad1baab0b6bcc13f3f856be2f958110':
  vf_aspect: use the name 's' for the pointer to the private context
  Remove commented-out debug #define cruft

Conflicts:
	libavcodec/4xm.c
	libavcodec/dvdsubdec.c
	libavcodec/ituh263dec.c
	libavcodec/mpeg12.c
	libavfilter/avfilter.c
	libavfilter/vf_aspect.c
	libavfilter/vf_fieldorder.c
	libavformat/rtmpproto.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-16 09:56:43 +02:00
Diego Biurrun
2832ea26f3 Remove commented-out debug #define cruft 2013-05-16 00:23:30 +02:00
Michael Niedermayer
f083b4c338 Merge commit 'e0f8be6413b6a8d334d6052e610af32935c310af'
* commit 'e0f8be6413b6a8d334d6052e610af32935c310af':
  avformat: Add AVPROBE_SCORE_EXTENSION define and use where appropriate

Conflicts:
	libavformat/ac3dec.c
	libavformat/avformat.h
	libavformat/avs.c
	libavformat/m4vdec.c
	libavformat/mov.c
	libavformat/mp3dec.c
	libavformat/mpeg.c
	libavformat/mpegvideodec.c
	libavformat/psxstr.c
	libavformat/pva.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-05 12:31:03 +02:00
Diego Biurrun
e0f8be6413 avformat: Add AVPROBE_SCORE_EXTENSION define and use where appropriate 2013-05-04 21:43:06 +02:00
Michael Niedermayer
30db867cb7 Merge remote-tracking branch 'cigaes/master'
* cigaes/master:
  lavf/matroskaenc: return an error for unsupported types.
  lavf/concatdec: remove invalid check for AVSEEK_FLAG_BACKWARD.
  lavf: filter out AVSEEK_FLAG_BACKWARD in new API.
  lavf: call the new seek API from the old.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-04 17:10:48 +02:00
Nicolas George
3fc66dfef2 lavf: filter out AVSEEK_FLAG_BACKWARD in new API.
Also document that it has no effect.
2013-05-04 14:11:53 +02:00
Nicolas George
cc24afb45c lavf: call the new seek API from the old.
If the demuxer implements read_seek2() and not read_seek(),
call avformat_seek_file() from av_seek_frame().
Allow to properly seek in formats that only implement the
new API from applications that use the old one.
Tested with mplayer and a concat script.
2013-05-04 14:11:53 +02:00
Michael Niedermayer
0104570fb6 Merge commit 'a5f8873620ce502d37d0cc3ef93ada2ea8fb8de7'
* commit 'a5f8873620ce502d37d0cc3ef93ada2ea8fb8de7':
  silly typo fixes

Conflicts:
	doc/protocols.texi
	libavcodec/aacpsy.c
	libavformat/utils.c
	tools/patcheck

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-04 10:17:52 +02:00
Diego Biurrun
a5f8873620 silly typo fixes 2013-05-03 18:26:12 +02:00
Paul B Mahol
ad56535dd1 avformat: fix orig_pos type to match pkt->pos
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-04-23 13:56:34 +00:00
Michael Niedermayer
833bc6678f avformat: change seeking index consistency asserts to av_asserts
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-19 17:44:07 +02:00
Michael Niedermayer
020c287f5e avformat: Dont stop probing before the whole id3 tag is read
When a file appears to start with a id3 tag and appears to
also be something else, then try to increase the probe buffer
size if its below its limit.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-18 23:48:32 +02:00
Michael Niedermayer
ab2989378f Merge commit 'dbb1425811a672eddf4acf0513237cdf20f83756'
* commit 'dbb1425811a672eddf4acf0513237cdf20f83756':
  lavf: make sure stream probe data gets freed.
  avfiltergraph: set deprecated filter_count.

Conflicts:
	libavformat/utils.c

See: 44a7a6300d

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-04 13:24:33 +02:00
Anton Khirnov
dbb1425811 lavf: make sure stream probe data gets freed.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-04-04 07:54:00 +02:00
Michael Niedermayer
e10f5bd05c avformat: Add a mechanism to allow demuxers to detect byte based seeking.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-04 04:04:24 +02:00
Michael Niedermayer
ccc25378bd avformat: fix atomatic format selection for (s)segment
Fixes Ticket2236

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-02 21:52:40 +02:00
Carl Eugen Hoyos
4d3c5d3b65 Do not show "Estimating duration from bitrate" warning if no duration was estimated. 2013-03-30 08:24:51 +01:00
Michael Niedermayer
ef7b6b489a ffmpeg/avformat: factor av_guess_frame_rate() out
This will be used in ffplay

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-29 17:40:28 +01:00
Michael Niedermayer
ea9a6709a9 estimate_timings_from_bit_rate: Check timebase and bitrate
Fixes integer overflow and assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-28 01:45:01 +01:00
Michael Niedermayer
460d30406b avformat: change some seeking related assert to av_asserts
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-27 22:53:57 +01:00
Michael Niedermayer
710cd0fddf avformat: Fix infinite probing that reads the whole file
Fixes: otonajoshi_avformat_tries_to_load_whole.ts
Reported-by: JEEB (on IRC)
Thanks-to: nevcairiel
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-20 17:57:00 +01:00
Michael Niedermayer
06a43baecd av_find_stream_info: change read_size to 64bit
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-20 17:23:23 +01:00
Nicolas George
0d09aa9d8e lavf: avformat_seek_file(): validate stream_index. 2013-03-20 13:35:24 +01:00
Michael Niedermayer
73ef12757b append_packet_chunked: remove outcommented code
our variant works fine and should be better
also remove related unused variable

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-18 17:54:01 +01:00
Michael Niedermayer
07d4f557e5 append_packet_chunked: Remove unused initialization.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-16 17:03:41 +01:00
Michael Niedermayer
e066fb54cb Merge commit 'aa3c77998404cc32233cb76e961ca27db8565459'
* commit 'aa3c77998404cc32233cb76e961ca27db8565459':
  lavf: sanity check size in av_get/append_packet().

Conflicts:
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-16 15:38:13 +01:00
Anton Khirnov
aa3c779984 lavf: sanity check size in av_get/append_packet().
To avoid allocating ridiculous amounts of memory for corrupted files,
read the input in chunks limited to filesize or an arbitrary large
amount when that is not known (chosen to be 50M).
2013-03-15 20:05:04 +01:00
Michael Niedermayer
06a8350599 Merge commit '7b486ab13bfcfa88a7cd92586de50e49966ec292'
* commit '7b486ab13bfcfa88a7cd92586de50e49966ec292':
  lavf: remove disabled FF_API_AV_GETTIME cruft
  lavf: remove disabled FF_API_INTERLEAVE_PACKET cruft

Conflicts:
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-13 12:37:03 +01:00
Michael Niedermayer
c292e340ed avformat: keep r_frame_rate
This field is used and nothing equivalent exists

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-12 15:28:23 +01:00
Anton Khirnov
85a5bc054c lavf: remove disabled FF_API_R_FRAME_RATE cruft 2013-03-11 18:23:50 +01:00
Anton Khirnov
7b486ab13b lavf: remove disabled FF_API_AV_GETTIME cruft 2013-03-11 18:23:18 +01:00
Anton Khirnov
435c2a31ad lavf: remove disabled FF_API_READ_PACKET cruft 2013-03-11 18:23:02 +01:00
Anton Khirnov
0a7c4daf46 lavf: remove disabled FF_API_CLOSE_INPUT_FILE cruft 2013-03-11 18:22:45 +01:00
Michael Niedermayer
2653e12520 Merge commit '1afddbe59e96af75f1c07605afc95615569f388f'
* commit '1afddbe59e96af75f1c07605afc95615569f388f':
  avpacket: use AVBuffer to allow refcounting the packets.

Conflicts:
	libavcodec/avpacket.c
	libavcodec/utils.c
	libavdevice/v4l2.c
	libavformat/avidec.c
	libavformat/flacdec.c
	libavformat/id3v2.c
	libavformat/matroskaenc.c
	libavformat/mux.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-08 19:12:03 +01:00
Anton Khirnov
1afddbe59e avpacket: use AVBuffer to allow refcounting the packets.
This will allow us to avoid copying the packets in many cases.

This breaks ABI.
2013-03-08 07:33:45 +01:00
Reimar Döffinger
efa7f42020 Use the avstring.h locale-independent character type functions
Make sure the behavior does not change with the locale.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-07 15:16:36 +02:00
Michael Niedermayer
cada996528 avformat: Fix apics with aac
Fixes Ticket2318

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-07 13:55:43 +01:00
Michael Niedermayer
7992bdbeb4 update_stream_timings: check bitrate for being in range.
Fixes numerical overflow
Fixes Ticket2089

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-04 18:54:00 +01:00
Michael Niedermayer
faa0068a87 avformat: Make duration estimation from pts more robust
Ignore durations which differ significantly from the previous
Fixes Ticket2018

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-04 18:01:32 +01:00
Reimar Döffinger
88d55b827d Remove incorrect use of ctype.h functions.
As far as I can tell the code should not change behaviour
depending on locale in any of these places.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2013-03-03 21:44:10 +01:00
Michael Niedermayer
f2cb993139 avformat: gather aspect ratio from rv30/40 in find_stream_info
Fixes Ticket1550

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-03 18:41:16 +01:00
Nicolas George
89f9f69e3f lavf: rescale duration for chained muxers.
Fix trac ticket #2300 because the duration of the segments
was computed using the timestamp of the last packet plus its
duration using the 1/90000 default time base instead of using
the chained muxer time base.
2013-02-28 19:20:25 +01:00
Michael Niedermayer
03678a32bc Merge remote-tracking branch 'qatar/master'
* qatar/master:
  lavf: Add a fate test for the noproxy pattern matching
  lavf: Handle the environment variable no_proxy more properly

Conflicts:
	libavformat/Makefile
	libavformat/internal.h
	libavformat/tls.c
	libavformat/utils.c
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-28 13:13:04 +01:00
Michael Niedermayer
1c6477f30f Revert "lavf/utils: add support for special characters encoding in URL"
This reverts commit 4a8fc1d83b.

The commit caused null pointer derefernces when using udp://
after i fixed that it caused ffmpeg to get stuck and remapped
arguments like ?ttl=255 -> ?ttl%3d255

I dont want to leave this broken thus temporary revert so we all
have some time to look at this without half the network protocols
being broken in the meantime
2013-02-28 01:29:12 +01:00
Senthilnathan M
4a8fc1d83b lavf/utils: add support for special characters encoding in URL
In particular, fix trac ticket #2031.

Signed-off-by: Senthilnathan M <senthilnathan.maadasamy@gmail.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2013-02-28 00:39:17 +01:00
Martin Storsjö
de9cd1b173 lavf: Handle the environment variable no_proxy more properly
The handling of the environment variable no_proxy, present since
one of the initial commits (de6d9b6404), is inconsistent with
how many other applications and libraries interpret this
variable. Its bare presence does not indicate that the use of
proxies should be skipped, but it is some sort of pattern for
hosts that does not need using a proxy (e.g. for a local network).

As investigated by Rudolf Polzer, different libraries handle this
in different ways, some supporting IP address masks, some supporting
arbitrary globbing using *, some just checking that the pattern matches
the end of the hostname without regard for whether it actually is
the right domain or a domain that ends in the same string.

This simple logic should be pretty similar to the logic used by
lynx and curl.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-02-27 21:32:13 +02:00