Commit Graph

8610 Commits

Author SHA1 Message Date
Mashiat Sarker Shakkhar f57d2f587b image2: Add "start_number" private option to the demuxer
Currently if a pattern is given we look for up to the fifth file name in
the sequence. This option sets that limit to an arbitrary number.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-06-24 07:37:38 +02:00
Mashiat Sarker Shakkhar b5bce20cc3 image2: Add "start_number" private option to the muxer
This adds the capability to start counting file number from an arbitrary
integer.

This includes a few lines of trivial code from FFmpeg codebase.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-06-24 07:35:54 +02:00
Mans Rullgard 896bb0d742 Replace usleep() calls with av_usleep()
This reduces the dependency on unistd.h which is not available
on all systems.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-06-22 17:15:36 +01:00
Mans Rullgard c19e0ebe53 lavf: include libavutil/time.h instead of redeclaring av_gettime()
This avoids some warnings about redundant declarations.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-06-21 22:53:05 +01:00
Ronald S. Bultje 67ffcb9613 lavf: Make codec_tag arrays constant
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-21 16:11:29 +03:00
Mans Rullgard dc7e336cae lavf, lavu: version bumps and APIchanges for av_gettime() move
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-06-21 11:45:28 +01:00
Kostya Shishkov 005c80b645 MS Screen 1 decoder 2012-06-20 19:08:10 +02:00
Mans Rullgard ae0a301668 Move av_gettime() to libavutil
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-06-20 17:09:03 +01:00
Ronald S. Bultje f1f37c7011 mov: fix operator precedence bug 2012-06-20 15:37:01 +01:00
Mans Rullgard 6501dcfb5e Remove unnecessary inclusions of [sys/]time.h
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-06-20 11:46:46 +01:00
Mans Rullgard 4e5a514813 lavf: remove unnecessary inclusions of unistd.h
These files do not use anything provided by unistd.h.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-06-20 11:46:30 +01:00
Martin Storsjö 042b272a4a udp: Properly check for invalid sockets
If stdin has been closed, 0 is a valid socket descriptor.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-19 20:25:09 +03:00
Martin Storsjö bb6c1abb0e tcp: Check the return value from getsockopt
Make sure we actually have an error code in ret, in case
getsockopt failed.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-19 20:25:07 +03:00
Martin Storsjö a840cdda6c network: Use av_strerror for getting error messages
Also use ff_neterrno() instead of errno directly (which doesn't work
on windows), for getting the error code.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-19 20:24:55 +03:00
Martin Storsjö 860b40f1f2 udp: Properly print error from getnameinfo
getnameinfo doesn't set errno on failure, it returns an error code,
which should be handled by gai_strerror instead of the normal
strerror.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-19 20:24:33 +03:00
Martin Storsjö 6aa4e88106 mmst: Use AVUNERROR() to convert error codes to the right range for strerror
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-19 20:23:19 +03:00
Martin Storsjö 561687696f network: Pass pointers of the right type to get/setsockopt/ioctlsocket on windows
This avoids warnings.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-19 20:22:47 +03:00
Samuel Pitoiset 9d811fd80f rtmp: Reduce the number of idle posts sent by sleeping 50ms
Rtmpt is effectively half duplex - the server can't return any
data unless we send a request (to which the server responds). If
we don't have any data to send currently, and the server didn't
return any data either, wait a little before doing the next request.

This avoids busy looping with idle posts with empty replies, while
waiting for more data from the server.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-19 20:21:21 +03:00
Ronald S. Bultje 8703f0140f flvdec: remove incomplete, disabled seeking code 2012-06-19 01:02:10 +01:00
Ronald S. Bultje 51a2b5546b http: replace atoll() with strtoll() 2012-06-19 01:00:13 +01:00
Ronald S. Bultje ae2bb52cd2 mpegts: remove unused/incomplete/broken seeking code 2012-06-19 00:56:43 +01:00
Martin Storsjö 579fd87b46 rtpenc: Support packetizing iLBC
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-18 22:01:04 +03:00
Martin Storsjö 89c3960544 rtpdec: Add a depacketizer for iLBC
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-18 22:01:04 +03:00
Martin Storsjö a2b251a05e Implement the iLBC storage file format
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-18 22:01:02 +03:00
Martin Storsjö 9e74db6850 mov: Support muxing/demuxing iLBC
The packet size, signalled via block_align, has to be passed via
the container.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-18 22:00:35 +03:00
Samuel Pitoiset 46743a859c rtmp: Don't send every flv packet in a separate HTTP request in RTMPT
Add a new option 'rtmp_flush_interval' that allows specifying the
number of packets to write before sending it off as a HTTP request.

This is mostly relevant for RTMPT - for plain RTMP, it only controls
how often we check the socket for incoming packets, which shouldn't
affect the performance in any noticeable way.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-18 22:00:31 +03:00
Martin Storsjö bbc8038614 rtsp: Send mode=record instead of mode=receive
This seems to be the correct mode to send, according to the
original RTSP RFC, and matches the method RECORD which is
sent later when starting to send data.

Darwin Streaming Server works fine with either of them.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-18 21:35:28 +03:00
Martin Storsjö d77f4afa98 rtpenc: Allow requesting H264 RTP packetization mode 0
This requires all NAL units to fit within single RTP packets. It
doesn't change the actual packetization for packets that fit, but
errors out and gives a helpful hint if the NAL units would have to
be split, and signals the right packetization mode in the SDP.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-18 12:27:56 +03:00
Samuel Pitoiset 8e50c57dcb RTMPT protocol support
This adds two protocols, but one of them is an internal implementation
detail just used as an abstraction layer/generalization in the code. The
RTMPT protocol implementation uses rtmphttp:// as an alternative to the
tcp:// protocol. This allows moving most of the lower level logic out
from the higher level generic rtmp code.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-17 22:56:56 +03:00
Martin Storsjö 35127bf156 http: Properly handle chunked transfer-encoding for replies to post data
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-17 22:56:56 +03:00
Martin Storsjö eb564b23a3 http: Fail reading if the connection has gone away
This can happen if doing a new request using the same socket,
but the new request failed, which clears the urlcontext.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-17 22:56:51 +03:00
Martin Storsjö eb3918c1fd amr: Mark an array const
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-17 22:50:06 +03:00
Martin Storsjö 634e874de5 amr: More space cleanup
This was missed in the previous cleanup patch.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-17 22:50:04 +03:00
Martin Storsjö e9ef88fbd2 rtpenc: Fix memory leaks in the muxer open function
Also return a proper error code in these cases.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-17 22:49:25 +03:00
Martin Storsjö 5f26d4d448 amr: Cosmetic cleanup
Add spaces around operators, fix brace placement and whitespace to
match K&R style, vertically align code, remove redundant != 0 and
convert x == 0 into !x, drop useless braces.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-17 19:04:46 +03:00
Martin Storsjö 44fdf37c94 mov_chan: Fix operator precedence by adding parentheses
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-17 17:51:50 +03:00
Jordi Ortiz a7cc78cb11 tcp: Check the listen call
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-17 13:22:36 +03:00
Anton Khirnov ae702edf43 flacdec: read attached pictures. 2012-06-16 17:10:23 +02:00
Anton Khirnov a5db8e4a1a lavf: don't segfault when a NULL filename is passed to avformat_open_input()
This can easily happen when the caller is using a custom AVIOContext.

Behave as if the filename was an empty string in this case.

CC: libav-stable@libav.org
2012-06-16 17:09:33 +02:00
Janne Grunau 1cdcf043ca segment: remove unnecessary <strings.h> include 2012-06-15 19:10:58 +02:00
Samuel Pitoiset 7dc747f50b rtmp: Read and handle incoming packets while writing data
This makes sure all incoming packets are read and handled (and reacted
to) while sending an FLV stream over RTMP to a server. If there were
enough incoming data to fill the TCP buffers, this could potentially
make things block at unexpected places. For the upcoming RTMPT support,
we need to consume all incoming data before we can send the next
request.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-14 22:22:58 +03:00
Martin Storsjö d1beee0701 rtpdec: Don't require frames to start with a Mode A packet
While there is no reason for starting a frame with anything else
than a Mode A packet, some senders seem to consistently use Mode B
packets for everything. This fixes depacketization of such streams.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-14 22:11:43 +03:00
Samuel Pitoiset 8517e9c476 rtmp: Add a new option 'rtmp_buffer', for setting the client buffer time
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-13 17:04:39 +03:00
Samuel Pitoiset 9477c035a7 rtmp: Set the client buffer time to 3s instead of 0.26s
This factorizes existing code into a new function gen_buffer_time(),
which generates the client buffer time message and sends it to the
server.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-13 16:53:32 +03:00
Samuel Pitoiset c2d38beab2 rtmp: Handle server bandwidth packets
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-13 16:52:52 +03:00
Samuel Pitoiset 9ff930aace rtmp: Display a verbose message when an unknown packet type is received
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-13 16:52:31 +03:00
Martin Storsjö 0533868642 rtmp: Tokenize the AMF connection parameters manually instead of using strtok_r
This fixes builds on platforms without strtok_r (windows).

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-13 11:36:47 +03:00
Samuel Pitoiset 0a9a225733 rtmp: Fix a possible access to invalid memory location when the playpath is too short.
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-12 14:33:57 +03:00
Samuel Pitoiset f862537de8 rtmp: Do not send extension for flv files
This fixes bugzilla bug #304.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-11 13:48:39 +03:00
Samuel Pitoiset 8ee3e1874e rtmp: support connection parameters
Allow using connection parameters in order to append arbitrary
AMF data like "B:1 S:authMe O:1 NN:code:1.23 NS:flag:ok O:0" to the
Connect message. You can pass these parameters through the -rtmp_conn
option.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-11 13:46:50 +03:00
Mans Rullgard 8aa93e9004 mov: set AVCodecContext.width/height for h264
This is required for correct cropping of files from Canon
cameras.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-06-09 15:08:51 +01:00
Alex Converse a8656cd425 mpegts: Remove disabled extension matching probe. 2012-06-07 12:27:04 -07:00
Alex Converse f0ff9eb493 avformat: Probe codecs at score 0 on buffer exhaustion conditions. 2012-06-05 09:51:51 -07:00
Alex Converse 62bebf6edb avformat: Factorize codec probing. 2012-06-05 09:51:51 -07:00
Kostya Shishkov c6061443f7 Indeo Audio decoder 2012-06-05 18:30:54 +02:00
Alex Converse 41e9682af2 movenc: Write chan atom for all audio tracks in mov mode movies. 2012-06-04 10:08:31 -07:00
Jindřich Makovička 84e430dd7b mpegtsenc: use avio_open_dyn_buf(), zero pointers after freeing
Per suggestion by Michael Niedermayer.

Signed-off-by: Jindřich Makovička <makovick@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-04 15:41:09 +03:00
Anton Khirnov a982e5a031 avidec: make scale and rate unsigned.
The specs say they are unsigned 32bit integers.
2012-06-04 14:18:49 +02:00
Anton Khirnov 19dfbf1915 librtmp: return AVERROR_UNKNOWN instead of -1. 2012-06-03 15:46:27 +02:00
Anton Khirnov a91943bcef librtmp: don't abuse a variable for two unrelated things. 2012-06-03 15:46:16 +02:00
Anton Khirnov 007aedeebf librtmp: add rtmp_app and rtmp_playpath private options.
This makes it easier to switch between native rtmp and librtmp.
2012-06-03 15:45:55 +02:00
Luca Barbato 21e2dc9fb7 flv: support stream text data as onTextData
Adobe specifies onTextData as the standard message to use to deliver
text information.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-06-03 03:36:01 +02:00
Jindrich Makovicka 2439bd8681 mpegtsenc: Support LATM packetization for AAC
This adds the avoption mpegts_flags and converts the existing
resend_headers option into a flag, keeping the old option as
fallback for now.

Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-03 01:20:41 +03:00
Jindrich Makovicka 485d3ea064 adtsenc: Don't expose the muxer internals to the rest of lavf
This isn't required any longer, when the mpegts muxer uses it
as a proper chained muxer.

Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-03 01:18:11 +03:00
Jindrich Makovicka b1c56eabe8 mpegtsenc: use AVFormatContext for AAC packetization
This removes the dependency on adts.c internals, and simplifies
adding other packetization formats.

Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-03 01:17:48 +03:00
Jindrich Makovicka d1a3a3d4b2 mpegtsenc: use AVERROR() for return codes
Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-03 01:13:35 +03:00
Martin Storsjö dbaf79c9d7 http: Add the url_shutdown function for https, too
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-01 18:38:31 +03:00
Martin Storsjö 5952564185 http: Simplify code by removing a local variable
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-01 18:38:29 +03:00
Martin Storsjö 3cbcfa2dec http: Clear the old URLContext pointer when closed
This fixes issues with opening http urls that have authentication
or redirects, introduced in commit e999b641.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-01 18:38:28 +03:00
Martin Storsjö b7c3772be8 tcp: Try enabling SO_REUSEADDR when listening
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-01 01:56:22 +03:00
Martin Storsjö 641f4a885f tcp: Check the return values from bind and accept
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-01 01:56:21 +03:00
Oka Motofumi 5c742005fb avisynth: Make sure the filename passed to avisynth is in the right code page
avisynth is a non-unicode application and cannot accept UTF-8
characters. Therefore, the input filename should be converted to
the correct code page that it expects.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-31 22:39:08 +03:00
Samuel Pitoiset 9613240f72 http: Pass the proper return code of net IO operations
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-30 23:46:51 +03:00
Samuel Pitoiset 1876e7c0c2 http: Add 'post_data', a new option which sets custom HTTP post data
This allows doing http posts with a content-length header sent
in advance, avoiding chunked encoding.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-30 23:41:05 +03:00
Ronald S. Bultje 64bde80563 mp3/ac3 probe: search for PES headers to prevent probing MPEG-PS as MP3. 2012-05-30 09:08:29 -07:00
Samuel Pitoiset e999b641df http: Add support for reusing the http socket for subsequent requests
Introduce ff_http_do_new_request(), a new function which sends a new
HTTP request, reusing the existing connection to the server.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-28 16:42:40 +03:00
Samuel Pitoiset 3bdb438e65 http: Add support for using persistent connections
Add a new AVOption 'multiple_requests', which indicates if we want
to use persistent connections (ie. Connection: keep-alive).

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-28 16:42:14 +03:00
Martin Storsjö 6099543ad4 rtsp: Check for dynamic payload handlers if no static payload mapping was found
Some systems abuse the static payload types 35 or 36 (which
according to IANA are unassigned) for H264.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-26 21:58:18 +03:00
Martin Storsjö 68c813081b rtpenc_chain: Return an error code instead of just a plain pointer
Also check the return value in sapenc.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-26 13:35:44 +03:00
Martin Storsjö 93cef6f923 rtpenc_chain: Free the URLContext on failure
If an URLContext is passed in, its ownership is given to this
function, and is either owned by the returned AVFormatContext
on a successful return, or freed on failure.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-26 13:35:44 +03:00
Martin Storsjö 2dcb21a95d rtpenc: Expose the ssrc as an avoption
This allows the caller to set it, and allows the caller to query
what it was set to.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-26 13:35:39 +03:00
Martin Storsjö 39e29aa019 cosmetics: Fix indentation
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-26 00:34:20 +03:00
Luca Barbato c6eeb9b7b6 rtmp: fix url parsing
The application component can have a subcomponent to specify the
application instance even if it doesn't have a ":" in the playpath.
2012-05-25 14:20:34 -07:00
Alex Converse ed7bdd8647 movenc: Don't write the 'wave' atom or its child 'enda' for lpcm audio.
It's left over from stsd v0. QuickTime 7 no longer writes 'wave' or 'enda'
when 'lpcm' is the audio tag.
2012-05-25 11:24:43 -07:00
Samuel Pitoiset 177bcc9593 rtmp: Pass the proper return code in rtmp_handshake
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-24 22:16:46 +03:00
Samuel Pitoiset bba287fdac rtmp: Check return codes of net IO operations
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-24 22:16:46 +03: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
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
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
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
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
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
Anton Khirnov 755cd4197d mov: enable parsing for VC-1.
This makes lavf discard broken timestamps for non-B frames in
samples/isom/vc1-wmapro.ism.
2012-05-18 19:38:21 +02:00
Martin Storsjö 4b7304e80d rtmp: Don't assume path points to a string of nonzero length
If using the new -rtmp_app and -rtmp_playpath parameters,
one can in many cases set the main url to just rtmp://server/.
If the trailing slash is omitted, path is a string of zero length,
and using path+1 will end up reading uninitialized data.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-17 21:16:52 +03:00
Mans Rullgard db465be45d lavf: add mdec to is_intra_only() list
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-05-15 15:49:56 +01:00
Mans Rullgard 7c6d240665 mtv: do not byteswap raw video in demuxer
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-05-14 20:26:39 +01:00
Diego Biurrun 70be4dddc8 gxfenc: remove disabled half-implemented MJPEG tag 2012-05-14 15:38:42 +02:00
Samuel Pitoiset d55961fa82 rtmp: Implement check bandwidth notification.
According to the behaviour of librtmp, it is recommended to send this
message to the server after receiving the 'onBWDone' callback in order
to do bandwidth checking and improve compatibility with some servers.
2012-05-10 13:55:32 +03:00
Samuel Pitoiset 05945db9ce rtmp: Support 'rtmp_swfurl', an option which specifies the URL of the SWF player. 2012-05-10 13:55:31 +03:00
Samuel Pitoiset e64673e4f4 rtmp: Support 'rtmp_flashver', an option which overrides the version of the Flash plugin. 2012-05-10 13:55:30 +03:00
Samuel Pitoiset 55c9320e06 rtmp: Support 'rtmp_tcurl', an option which overrides the URL of the target stream.
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-10 13:55:26 +03:00
Sean McGovern ded69c5e21 sctp: be consistent with socket option level
Replace SOL_SCTP by the more portable IPPROTO_SCTP.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-05-10 00:01:45 +02:00
Diego Biurrun 59cbc4eee2 mov: make one comment slightly more specific 2012-05-09 23:12:37 +02:00
Luca Barbato 5699884c2e sctp: Initial tcp-alike sctp support with streams
Signed-off-by: Jordi Ortiz <nenjordi@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-05-08 16:06:49 -07:00
Alex Converse 40f81769ae options_table: Add some missing #includes to fix "make checkheaders".
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-05-08 20:05:20 +02:00
Jordi Ortiz fcd0298c05 rtsp: Add content-type message header parsing
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-05-08 10:18:35 -07:00
Samuel Pitoiset b2e495afa8 rtmp: Support 'rtmp_live', an option which specifies if the media is a live stream.
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-08 13:21:35 +03:00
Diego Biurrun 520c1ec699 dv: Split profile handling code into a separate file. 2012-05-07 23:59:49 +02:00
Anton Khirnov 0a3ad7ff80 flvenc: use AVFormatContext, not AVCodecContext for logging.
Encoder tag being used for muxer messages is confusing.
2012-05-07 21:28:40 +02:00
Diego Biurrun 455245ca8a mov: Remove write-only variable in mov_read_chan().
libavformat/mov.c:597:25: warning: variable ‘cflags’ set but not used
2012-05-07 20:31:23 +02:00
Anton Khirnov 1432c1c429 lavf: add missing '*' in a doxy. 2012-05-07 14:22:42 +02:00
Diego Biurrun 9eb83a56aa build: cosmetics: Split HEADERS/OBJS/PROGS lists into one entry per line. 2012-05-07 14:01:32 +02:00
Diego Biurrun 30b1961c66 Mark a number of variables only used in av_dlog() calls as av_unused.
This fixes a number of unused-but-set gcc warnings.
2012-05-06 18:01:31 +02:00
Janne Grunau 29d27b5425 mpegmux: add stuffing to avoid incomplete PCM frames
Fixes https://bugzilla.libav.org/show_bug.cgi?id=244
2012-05-06 13:18:38 +02:00
Mans Rullgard ddce7dabd2 rtsp: avoid const warnings from strtol() call
The strtol() interface makes it difficult to use with
const-qualified pointers.  With this change, although
the const is still lost, the compiler does not warn
about it.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-05-06 12:04:25 +01:00
Martin Storsjö 2ed503af9f rtpdec_h264: Add missing newlines to av_log calls
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-05 22:11:49 +03:00
Martin Storsjö b97d21e4d6 rtpdec_h264: Free old extradata before clearing the pointer
This avoids memory leaks if there actually was some extradata
set before.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-05 22:11:45 +03:00
Martin Storsjö 3c148703f6 rtpdec_h264: Reorder code blocks
This removes one level of indentation.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-05 20:41:37 +03:00
Martin Storsjö b368861747 rtpdec_h264: Make start_sequence a static const array
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-05 20:35:33 +03:00
Martin Storsjö 48666c2bd6 rtpdec_h264: Cleanup debug packet type counting
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-05 20:35:05 +03:00
Martin Storsjö 0b3ac9fe05 rtpdec_h264: Cosmetic cleanup
Add/fix spacing, split long lines, align assignments where suitable.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-05 20:33:00 +03:00
Martin Storsjö f3d471f45f rtpdec_h264: Clean up comments
Split long comments, move long comments at the end of lines to
separate lines above, fix vertical alignment, fix up comment style
(unify trailing dots - comments had a mix of 2, 3 or 4 dots, where
it would be just as good without them at all).

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-05 20:32:29 +03:00
Martin Storsjö dee48d095d rtpdec_h264: Convert commented out code into setting an unused variable
It is worth keeping instead of removing, in case reading this
bit becomes necessary at some later point.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-05 20:32:09 +03:00
Martin Storsjö 44f99fe0f5 rtpdec_h264: Remove a useless ifdef
assert is a no-op if DEBUG isn't defined.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-05 03:10:25 +03:00
Martin Storsjö 8d43b8b8e8 rtpdec_h264: Remove outdated/useless/incorrect comments
RTCP is handled elsewhere, not in the depacketizer for an
individual format.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-05 03:10:15 +03:00
Martin Storsjö 5a571d3241 rtpdec_h264: Remove useless memory corruption checks
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-05 03:09:53 +03:00
Martin Storsjö b7b7354c33 rtpdec_h264: Return proper error codes
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-05 03:09:44 +03:00
Martin Storsjö 5245adb963 rtpdec_h264: Check the available data length before reading
This makes sure the length is checked for STAP-A type packets.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-05 03:09:10 +03:00
Ivan Kovtunov de26a4b699 rtpdec_h264: Add input size checks
This fixes crashes if given too short data packets.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-05 03:09:07 +03:00
Ronald S. Bultje 273e6af47b ea: check chunk_size for validity.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-05-04 16:06:26 -07:00
Justin Ruggles e5356ebf22 cosmetics: indentation 2012-05-03 16:28:08 -04:00
Justin Ruggles 8916f1fbcb avformat: only fill-in interpolated timestamps if duration is non-zero
This avoids returning duplicate timestamps for multiple packets when the
demuxer does not provide all timestamps and packet duration is not known.
2012-05-03 16:28:08 -04:00
Justin Ruggles ff499157a1 avformat: remove a workaround for broken timestamps
This modifies pts in situations other than what was intended, leading to
invalid timestamps.

Reverts commit 90bb394dcc
2012-05-03 16:28:08 -04:00
Joakim Plate 68b9ed8391 mpegts: Some additional HDMV types and reg descriptors for mpegts
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2012-05-03 12:13:28 -04:00
Luca Barbato 0ca4642ec5 mkv: mark corrupted packets and return them
Do return error if memory allocation or I/O fails.
2012-04-29 20:22:09 -07:00
Luca Barbato 721af294d9 mkv: forward EMBL block data error
Do not return 0 on error.
2012-04-29 20:22:09 -07:00
Luca Barbato 3b52e9da10 segment: reorder seg_write_header allocation
As pointed by Paul B Mahol <onemda@gmail.com> the previous code could
lead to null pointer dereference.
2012-04-27 14:03:43 -07:00
Luca Barbato e1e146a2d1 avio: make avio_close(NULL) a no-op
Its behaviour in line with ffurl_close(NULL).
2012-04-27 14:03:43 -07:00
Yusuke Nakamura 546adc1fee mov: Parse EC3SpecificBox (dec3 atom).
Skip to parse fields for additional independent substreams and its
associated dependent substreams since libavcodec's E-AC-3 decoder does not
support them yet.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-04-27 16:11:46 -04:00
Martin Storsjö df8aa4598c mpegts: Make sure we don't return uninitialized packets
This fixes crashes, where the demuxer could return 0 even
if the returned AVPacket isn't initialized at all. This
could happen if running into EOF or running out of probesize
with non-seekable sources.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-27 20:05:37 +03:00
Hendrik Leppkes 949d942eef mov: support eac3 audio
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2012-04-25 15:24:14 -04:00
Luca Barbato 8b97ae6484 avf: fix faulty check in has_duration
An invalid duration is AV_NOPTS_VALUE not 0.
2012-04-25 11:40:22 -07:00