Commit Graph

13037 Commits

Author SHA1 Message Date
Michael Niedermayer
4cd066b69c Merge commit '21732063a346475eb22c332b27e8216b79f9ad4a'
* commit '21732063a346475eb22c332b27e8216b79f9ad4a':
  movenc: K&R formatting cosmetics

Conflicts:
	libavformat/movenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-08 04:08:07 +02:00
Michael Niedermayer
5312c319be avformat_find_stream_info: fallback to timestamps in analyzeduration check in more cases
This fixes speex in rtmp
Fixes Ticket2409

the nellymoser in flv case actually needs larger analyzeduration. The code
previously just failed to calculate the duration

If this causes any problems, like premature analyze/probe end, please report!

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-08 02:37:24 +02:00
Martin Storsjö
21732063a3 movenc: K&R formatting cosmetics
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-07 21:34:31 +03:00
Michael Niedermayer
38e9585de9 Makefile: Remove stray tabs
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-07 19:29:19 +03:00
Ronald S. Bultje
6c86a63bad yuv4mpeg: Correctly round chroma up for odd luma sizes
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-07 13:30:22 +03:00
Michael Niedermayer
d35b6cd377 rmdec: Use the AVIOContext given as parameter in rm_read_metadata()
This fixes crashes when playing back certain RealRTSP streams.

When invoked from the RTP depacketizer, the full realmedia
demuxer isn't invoked, but only certain functions from it, where
a separate AVIOContext is passed in as parameter (for the buffer
containing the data to parse). The functions called from within
those entry points should only be using that parameter, not
s->pb. In the depacketizer case, s is the RTSP context, where ->pb
is null.

Cc: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-07 13:30:12 +03:00
Michael Niedermayer
5d876be87a avio: Handle AVERROR_EOF in the same way as the return value 0
This makes sure the ffurl_read_complete function actually
returns the number of bytes read, as the documentation of the
function says, even if the underlying protocol uses AVERROR_EOF
instead of 0.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-07 13:30:01 +03:00
Luca Barbato
f5e646a00a wtv: Mark attachment with a negative stream id
A sid 0 would be mismatched to the attachment.

Prevent NULL pointer dereference.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-07 04:28:51 +02:00
Michael Niedermayer
be25614177 mmsh: reimplement seeking
Fixes Ticket2682

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-07 18:50:03 +02:00
Michael Niedermayer
c7cfd4cce9 avformat_find_stream_info: use fps_dts as last resort to determine duration
Fixes long delay with some hardware generated h264 in ts

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-07 15:25:34 +02:00
Michael Niedermayer
19d4163331 avformat/mp3dec: read TOC even if not all needed information is available
This fixes hyothetical bugs with parsing of elements after the TOC

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-07 12:50:41 +02:00
Michael Niedermayer
4cc32e5cad avformat/mp3dec: read xing toc independant of usetoc, only skip filling index if requested
Fixes hypothetical parsing bug with -usetoc 0

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-07 12:49:37 +02:00
Michael Niedermayer
a71832f826 avformat/Makefile: remove stray tab
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-07 11:56:02 +02:00
Michael Niedermayer
b9d55a07f3 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  wtv: Mark attachment with a negative stream id

Conflicts:
	libavformat/wtv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-07 11:48:05 +02:00
Michael Niedermayer
7bd417c22a Merge commit '6516632967da5e6bd7d6136e8678f826669ed26e'
* commit '6516632967da5e6bd7d6136e8678f826669ed26e':
  tests: Only run noproxy test if networking is enabled
  fifo: K&R formatting cosmetics

Conflicts:
	libavformat/Makefile
	libavutil/fifo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-07 11:26:28 +02:00
Michael Niedermayer
dc2a13aa80 avformat/mov: Fix duration of fragmented mov
Fixes Ticket2757

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-07 04:11:14 +02:00
Michael Niedermayer
9a6e814be7 oggparseskeleton: avoid header parsing failure
Based on description by James Almer and the xiph wiki

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-06 23:53:19 +02:00
Michael Niedermayer
7f25050289 nutdec: use ff_find_last_ts()
Fixes finding the duration for nut files that are truncated

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-06 22:27:35 +02:00
Michael Niedermayer
8ca5d277d8 avformat/utils: factor ff_find_last_ts() out of ff_gen_search()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-06 22:27:35 +02:00
Diego Biurrun
6516632967 tests: Only run noproxy test if networking is enabled 2013-07-06 15:36:57 +02:00
Paul B Mahol
d64f3b72e0 replace some deprecated defines
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-06 05:43:24 +00:00
James Almer
63d7684fef oggparseskeleton: Replace avpriv_report_missing_feature() with a normal av_log() call
since there should not be more than one fisbone for a given stream.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-06 13:30:51 +02:00
James Almer
3960992f0a oggparseskeleton: Fix fisbone header parsing
start_granule should be applied to the stream referenced in the fisbone packet, not to the
Skeleton stream.
This was broken in d1f05dd183 and produced bogus warnings about
multiple fisbone in the same stream on files with more than one stream.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-06 13:30:51 +02:00
Michael Niedermayer
0844630e6b avformat/mp3dec: Add usetoc option to allow dlsabling the use of the xing TOC
The toc is inexact and not using it can thus make sense.
Using it is faster though, thus the opposite can similarly makes sense

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-06 05:43:48 +02:00
Michael Niedermayer
68b7b534be tcp: Use a default timeout of 5 sec for opening a connection but not for receiving packets
This should be closer to how tcp behaved longer ago and should
fix the issue with idle connections timing out.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-06 01:33:19 +02:00
Michael Niedermayer
efa9e6b423 ff_network_wait_fd_timeout: do not break with timeout < 0
Most code treats timeout < 0 like 0 already

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-06 01:31:37 +02:00
Michael Niedermayer
390aabb2a1 tcp: Fix the default timeout
Fixes Ticket2694

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-06 00:17:31 +02:00
Nigel Touati-Evans
ef8cc06d6e avformat/avidec: Fix incorrect detection of badly interleaved avi
The method guess_ni_flag needs to divide timestamps in the index
by sample_size if it is set in order to compare different streams correctly.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-05 22:07:48 +02:00
Michael Niedermayer
b009267910 mpegts: only reopen pmt_cb filter if its different from the previous.
Fixes Ticket2632

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-05 04:02:02 +02:00
Stefano Sabatini
d06ae0d791 lavf: fix documentation for avoid_negative_ts
Prefer "non-negative" over "positive", the former is more accurate.
2013-07-05 00:58:03 +02:00
Michael Niedermayer
65abce67b5 avformat/movenc: allow negative TS for the ipod muxer
Fixes Ticket2708

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-04 23:14:31 +02:00
Matthieu Bouron
621ab4e4ef lavf/movenc: check ff_mov_init_hinting() return
Fixes a crash when the codec stream is not supported by the rtp muxer.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-04 19:51:40 +02:00
Michael Niedermayer
8a8d9a7385 mpegts: use ffio_ensure_seekback()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-04 19:13:39 +02:00
Michael Niedermayer
186ec17843 avformat/aviobuf: Add ffio_ensure_seekback()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-04 19:13:38 +02:00
Michael Niedermayer
2ca48e4666 avformat: Append data in fill_buffer() when possible
Data is appended in fill_buffer() when there is sufficient space left
and the data pointer only reset when needed.
Previously the data pointer was more often reset, loosing more seekback
space than otherwise needed.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-04 19:13:38 +02:00
Zhang Rui
4a4c93cb3f avformat/http: support relative url redirection
see also http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-17#section-9.5

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-04 16:16:03 +02:00
Michael Niedermayer
b237e6282e avformat/h261dec: use init_get_bits8()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-04 13:40:08 +02:00
Paul B Mahol
d2ce3b3857 riff: remove invalid fourcc 'exr '
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-04 11:39:58 +00:00
Matthieu Bouron
4943eff2cd lavf/movenc: fix writing of some iTunes metadata tag
Fix metadata display under iTunes for files using pgap, hdvd, stick,
tvsn and tves tags.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-03 17:18:49 +02:00
Tudor Suciu
820ffaed0f avformat/matroskaenc: Allow VP9 and Opus in webm
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-03 00:10:50 +02:00
wm4
c3316ddb83 lavf: add support for libgme
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-02 18:52:45 +02:00
Michael Niedermayer
d59ec0adbb avformat_find_stream_info: move ret init down from flush codecs.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-02 15:07:51 +02:00
Michael Niedermayer
c5ddd75354 avformat_find_stream_info: Do not consider no streams an error in flush codecs
This should have no functional effect, but allows a cleaner diff when moving it
down

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-02 15:07:51 +02:00
Michael Niedermayer
c826c5698b avformat_find_stream_info: try to preserve the error code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-02 15:07:51 +02:00
Michael Niedermayer
ccba9535dc av_find_stream_info: initialize ret
This should fix hypothetical corner cases where it might have never been initialized before use

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-02 15:07:44 +02:00
Carl Eugen Hoyos
2492f7774f avformat: Print "Consider increasing the value for analzeduration and probesize" even more often
The sample from ticket #2691 currently does not trigger "Consider increasing
the value for analzeduration and probesize" because the audio streams are
only added after calling estimate_timings(). Attached patch moves the message
below this function call.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-02 14:08:36 +02:00
Michael Niedermayer
951a365504 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  oggdec: do not fall back on binary search in the generic code.

Conflicts:
	libavformat/oggdec.c
	tests/ref/seek/lavf-ogg

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-02 11:50:30 +02:00
Anton Khirnov
8ad3267ce3 oggdec: do not fall back on binary search in the generic code.
Binary search is already attempted in the format-specific seek function,
so the fallback is only reached if binary search failed already.
2013-07-02 10:37:22 +02:00
wm4
a92fbe16f2 lavf/http: add support for reading streamcast metadata
Allow applications to request reading streamcast metadata. This uses
AVOptions as API, and requires the application to explicitly request
and read metadata. Metadata can be updated mid-stream; if an
application is interested in that, it has to poll for the data by
reading the "icy_metadata_packet" option in regular intervals.

There doesn't seem to be a nice way to transfer the metadata in a nicer
way. Converting the metadata to ID3v2 tags might be a nice idea, but
the libavformat mp3 demuxer doesn't seem to read these tags mid-stream,
and even then we couldn't guarantee that tags are not inserted in the
middle of mp3 packet data.

This commit provides the minimum to enable applications to retrieve
this information at all.

Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2013-07-02 02:00:56 +02:00
Michael Niedermayer
bf87908cd8 rmdec: Pass AVIOContext to rm_read_metadata()
Fix null pointer dereference
Fixes Ticket2588

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-02 00:45:15 +02:00