Commit Graph

7313 Commits

Author SHA1 Message Date
Nicolas George
c76374c6db Use AVERROR_EXIT with url_interrupt_cb.
Functions interrupted by url_interrupt_cb should not be restarted.
Therefore using AVERROR(EINTR) was wrong, as it did not allow to distinguish
when the underlying system call was interrupted and actually needed to be
restarted.

This fixes roundup issues 2657 and 2659 (ffplay not exiting for streamed
content).

Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-15 08:09:19 -04:00
Anton Khirnov
3e68b3ba7b avio: deprecate url_ferror
AVIOContext.error should be used directly instead.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-15 08:04:28 -04:00
Anton Khirnov
75b9ed04b9 lavf/utils: dont't explicitly check AVIOContext.error
The error should be caught in write_packet()/write_trailer()

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-15 08:04:10 -04:00
Peter Ross
7f05c164d8 jv demuxer: prevent video packet size overflow
In the event of overflow, the JV_PADDING state will avio_skip over
any overflow bytes (using JVFrame.total_size).

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-14 08:06:19 -04:00
Peter Ross
772cb06281 jv demuxer: define JV_PREAMBLE_SIZE instead of hard coding the number
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-14 08:05:54 -04:00
Peter Ross
20c1281fe3 jv demuxer: calculate palette_size for each frame in read_header
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-14 08:05:34 -04:00
Peter Ross
bfaefd87dc Bitmap Brothers JV demuxer
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-14 08:05:02 -04:00
Benjamin Larsson
35d7d6f748 Add one more avc intra fourcc and extend the description
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-10 20:32:32 -05:00
Anton Khirnov
fb61a7c534 id3v2: fix typo in error message
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-09 10:57:44 +00:00
Anton Khirnov
66e5b1df36 avio: deprecate url_feof
AVIOContext.eof_reached should be used directly instead.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 17:20:31 -05:00
Anssi Hannula
6a7e074eb9 mpegts: add all stream languages into metadata
This is used at least on some older DVB broadcasts for dual-mono audio
tracks.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 15:00:53 -05:00
Baptiste Coudurier
688c22e033 In retry_transfer_wrapper, do not check url_interrupt_cb, causes problems
when writing and pressing q during encoding. Instead, check url_interrupt_cb
at the end.

Note that when a protocol is interrupted by url_interrupt_cb, some data may
be silently discarded: the protocol context is not suitable for anything
anymore.

Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 14:56:25 -05:00
Hendrik Leppkes
789936dbbd Flag DVB subtitles for the hard hearing appropriately using their component_type id.
This is based on the component_type definition in the DVB SI spec [1].

[1]: http://www.dvb.org/technology/standards/a038_DVB-SI_dEN300468v1.12.1.pdf

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 14:44:29 -05:00
Anssi Hannula
435cebd015 mpegtsenc: handle multiple language tags per stream
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 14:43:03 -05:00
Anssi Hannula
89e568feec lavf: update documentation of AVOutputFormat.flags
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 14:34:32 -05:00
Anton Khirnov
f1ef2cd9ed avio: move ff_rewind_with_probe_data from avio.h to avio_internal.h
also change its prefix to ffio

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 12:25:36 -05:00
Anton Khirnov
e8bb2e2439 avio: deprecate url_fget_max_packet_size
AVIOContext.max_packet_size should be used directly instead.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 12:25:36 -05:00
Anssi Hannula
c92562467e lavf: document the use of multiple entries in language metadata tag
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 12:25:36 -05:00
Peter Ross
d34ca1cfe3 Add audio codec 0x1600 (ADTS AAC)
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 11:11:01 -05:00
Anton Khirnov
76aa876e69 avio: avio_ prefix for url_fsize
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 11:03:39 -05:00
Anton Khirnov
e51975392d avio: deprecate url_fgetc and remove all it uses
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 10:51:21 -05:00
Anton Khirnov
655e45e7df avio: deprecate url_fgets
It's not used anywhere and doesn't look ver useful to be public.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 10:19:46 -05:00
Peter Ross
2af07d36fc avio: add avio_skip macro
This is a substitute for the url_fskip function that was deprecated by
commit 0300db8ad7. avio_fskip is provided to
improve demuxer code readability. It distinguishes the act of skipping over
unknown or irrelevant bytes from the standard avio_seek operation.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 10:19:46 -05:00
Martin Storsjö
f4f4e12c0d Add Apple HTTP Live Streaming protocol handler
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-03-06 23:29:39 +01:00
Martin Storsjö
8f73c06077 URLProtocol: Add URL_PROTOCOL_FLAG_NESTED_SCHEME
If this flag is set, the protocol can handle URLs where the
scheme is a nested scheme such as applehttp+file: - the protocol
can handle any URL where the first segment of the nested scheme
belongs to this protocol.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-03-06 23:29:39 +01:00
Martin Storsjö
f3bea9915f URLProtocol: Add a flags field
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-03-06 23:29:39 +01:00
Anton Khirnov
a2704c9712 avio: add avio_tell macro as a replacement for url_ftell
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-04 11:26:57 -05:00
Anton Khirnov
e16ead0716 lavf: deprecate get_strz() in favor of avio_get_str
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-04 11:26:02 -05:00
Reimar Döffinger
41d8555f72 avio: add avio_get_str()
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-04 11:24:58 -05:00
Ronald S. Bultje
fd085bc082 avio: fix fourcc if any character is >=0x80.
Fixes issue 2638.
2011-03-04 08:33:49 -05:00
Martin Storsjö
863c471638 libavformat: Add av_pkt_dump{, _log}2, taking an AVStream parameter
This removes a fixme issue, by allowing the av_pkt_dump functions
to use the correct time base.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-03-02 11:29:38 +01:00
Martin Storsjö
e360ada2d1 aviobuf: Write new data at s->buf_end in fill_buffer
In most cases, s->buf_ptr will be equal to s->buf_end when
fill_buffer is called, but this may not always be the case, if
we're seeking forward by reading (permitted by the short seek
threshold).

If fill_buffer is writing to s->buf_ptr instead of s->buf_end (when
they aren't equal and s->buf_ptr is ahead of s->buffer), the data
between s->buf_ptr and s->buf_end is overwritten, leading to
inconsistent buffer content. This could return incorrect data if
later seeking back into the area before the current s->buf_ptr.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-03-02 11:16:17 +01:00
Baptiste Coudurier
06ed4873e6 movenc: use correct tag for dvcpro hd
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-02 00:23:08 +00:00
Baptiste Coudurier
fffdee89cc movenc: fix tkhd height for imx
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-01 23:45:03 +00:00
Anton Khirnov
0300db8ad7 avio: deprecate url_fskip
avio_seek should be used instead

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-01 12:27:08 -05:00
Anton Khirnov
e356fc57a2 lavf: replace all uses of url_fskip with avio_seek
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-01 12:22:16 -05:00
Anton Khirnov
6b4aa5dac8 avio: avio_ prefix for url_fseek
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-01 12:12:33 -05:00
Ronald S. Bultje
13ff92d197 movenc: remove uses of deprecated API.
Replace put_tag() with ffio_wfourcc() and ByteIOContext with AVIOContext.
2011-02-25 17:41:00 -05:00
Maksym Veremeyenko
d184c86cd3 store pasp atom for all types of quicktime movie
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-02-25 22:31:16 +01:00
Maksym Veremeyenko
77d207cbe6 reindent after tapt patch
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-02-25 22:31:16 +01:00
Maksym Veremeyenko
ea1afa124c use tapt atom for sample aspect ratio
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-02-25 22:31:16 +01:00
Peter Ross
588a3ffd96 bink: decode audio track identifiers into AVStream.id
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-25 15:24:35 -05:00
Peter Ross
f0ca29eb5f bink: set audio stream codec_tag such that binkaudio decoder can identify bitstream version
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-25 15:24:35 -05:00
Anton Khirnov
61840b4360 avio: deprecate put_tag
it's not used internally anymore and shouldn't be public.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-25 14:38:57 -05:00
Anton Khirnov
bbc413f943 lavf: replace remaining uses of put_tag with avio_write
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-25 14:38:56 -05:00
Anton Khirnov
99f42c27ab avienc: replace &tag[0] with tag.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-25 14:38:55 -05:00
Anton Khirnov
0abdb29317 lavf: use a new ffio_wfourcc macro instead of put_tag() where possible
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-25 14:38:22 -05:00
longstone
4acc94e97a avienc: fix AVI stream index for files with >10 streams
Fixes issue 2563.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 10:44:26 -05:00
Anton Khirnov
22a3212e32 avio: rename url_fopen/fclose -> avio_open/close.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 10:18:55 -05:00
Martin Storsjö
28c4741a66 libavformat: Remove FF_NETERRNO()
Map EAGAIN and EINTR from ff_neterrno to the normal AVERROR()
error codes. Provide fallback definitions of other errno.h network
errors, mapping them to the corresponding winsock errors.

This eases catching these error codes in common code, without having
to distinguish between FF_NETERRNO(EAGAIN) and AVERROR(EAGAIN).

This fixes roundup issue 2614, unbreaking blocking network IO on
windows.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 07:21:31 -05:00
Benjamin Larsson
8f935b9271 Add more AVC Intra FOURCCs
Also change the comments a bit since the FOURCCs aren't specific to Flip4Mac
and different ones are used for 720 versus 1080 lines.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-22 07:21:33 -05:00
Tony Strauss
6c065f0acd mpegtsenc: use correct PES stream_id for AAC
This adds the AAC codec to the list of audio codecs that results
in a PES stream_id of 0xc0 (audio stream).

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-21 23:57:07 +00:00
Ronald S. Bultje
0f86fcabdf spdifenc.c: fix compile because of missing include avio_internal.h. 2011-02-21 15:49:24 -05:00
Anton Khirnov
0ac8e2bf2b avio: make put_nbyte internal.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-21 14:25:17 -05:00
Anton Khirnov
77eb5504d3 avio: avio: avio_ prefixes for put_* functions
In the name of consistency:
put_byte           -> avio_w8
put_<type>         -> avio_w<type>
put_buffer         -> avio_write

put_nbyte will be made private
put_tag will be merged with avio_put_str

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-21 14:25:15 -05:00
Anton Khirnov
b3db9ceef1 avio: make get_partial_buffer internal.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-21 13:40:28 -05:00
Anton Khirnov
b7effd4e83 avio: avio_ prefixes for get_* functions
In the name of consistency:
get_byte           -> avio_r8
get_<type>         -> avio_r<type>
get_buffer         -> avio_read

get_partial_buffer will be made private later

get_strz is left out becase I want to change it later to return
something useful.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-21 11:23:22 -05:00
Anton Khirnov
8d9ac969cb avio: rename av_alloc_put_byte -> avio_alloc_context for consistency
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-21 10:23:44 -05:00
Ronald S. Bultje
d2bbf82e65 Update version and APIchanges.
Update libavformat/version.h and doc/APIChanges after renaming
init_put_byte() and ByteIOContext to ffio_init_context() (private)
and AVIOContext, (public), and deprecating the originals.
2011-02-20 08:46:22 -05:00
Anton Khirnov
e731b8d872 avio: move init_put_byte() to a new private header and rename it
init_put_byte should never be used outside of lavf, since
sizeof(AVIOContext) isn't part of public ABI.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-20 08:37:31 -05:00
Anton Khirnov
ae628ec1fd avio: rename ByteIOContext to AVIOContext.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-20 08:37:15 -05:00
Marton Balint
74d6871d62 MMS: also discover streams in extended stream properties object
Allows playback of nonprimary audio streams in multiple bitrate sources,
such as mmsh://wmscr1.dr.dk/e02ch03m

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-19 17:51:55 -05:00
Anton Khirnov
09d171b988 lavf, lavu: bump minor versions and add an APIChanges entry for av_ prefixes
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-02-17 15:40:17 +01:00
Anton Khirnov
ab0287fcbd Move find_info_tag to lavu and add av_ prefix to it
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-02-17 15:35:18 +01:00
Anton Khirnov
9fcae9735e Replace remaining uses of parse_date with av_parse_time.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-16 23:39:57 +00:00
Stefano Sabatini
f6c7375a17 Deprecate parse_date() in favor of av_parse_time().
The new av_parse_time() is created in libavutil/parseutils.h, all the
internal functions used by parse_date are moved to
libavutil/parseutils.c and made static.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-16 23:39:56 +00:00
Anton Khirnov
610219a598 lavf: add av_ prefix to dump_format()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-16 23:39:56 +00:00
Martin Storsjö
2c35a6bde9 rtsp: udp_read_packet returning 0 doesn't mean success
If udp_read_packet returns 0, rtsp_st isn't set and we shouldn't
treat it as a successfully received packet (which is counted and
possibly triggers a RTCP receiver report).

This fixes issue 2612.
2011-02-17 00:37:00 +01:00
Anssi Hannula
6c60fcf89a spdifenc: set flag AVFMT_NOTIMESTAMPS
There are no timestamps in IEC 61937.

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-02-16 23:59:38 +01:00
Maksym Veremeyenko
41cdc1ff1e fix nsvdec.c compilation if DEBUG macro defined
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-16 07:33:25 -05:00
Balint Marton
22ec6b738f Fix av_find_best_stream when using a program
The current implementation has a bug, it is returning the stream index
in the found program, and not the stream index in the list of all
streams. The attached patch fixes this issue.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-16 11:47:42 +00:00
Reimar Döffinger
5d820db2f9 Document that av_write_header sets stream time_base to a value of it chosing.
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-02-16 10:33:40 +01:00
Janne Grunau
ec25f83bd9 spdifenc: update 482d98f69b to the latest patch
"spdifenc: IEC 61937 encapsulation of DTS-HD for HDMI"
2011-02-16 09:51:27 +01:00
Max Shakhmetov
9ac2085dbf os_support: fix poll() implementation
Our poll implementation does not iterate over the pollfd array properly
while setting the revents.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-02-15 18:11:50 +01:00
Reinhard Tartler
737eb5976f Merge libavcore into libavutil
It is pretty hopeless that other considerable projects will adopt
libavutil alone in other projects. Projects that need small footprint
are better off with more specialized libraries such as gnulib or rather
just copy the necessary parts that they need. With this in mind, nobody
is helped by having libavutil and libavcore split. In order to ease
maintenance inside and around FFmpeg and to reduce confusion where to
put common code, avcore's functionality is merged (back) to avutil.

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-02-15 16:18:21 +01:00
Maksym Veremeyenko
d06497f316 fix nsvdec.c compilation if DEBUG defined
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-15 09:15:43 -05:00
Mans Rullgard
2dd1ee4bfe mpegtsenc: whitespace cosmetics
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-14 23:18:26 +00:00
Anssi Hannula
3f2d3a1904 mpegtsenc: set audio_type according to st->disposition
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-14 23:18:26 +00:00
Anssi Hannula
60e7306643 mpegts: set st->disposition according to ISO 639 language descriptor
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-14 23:18:26 +00:00
Anssi Hannula
24a83bd10a lavf: add AV_DISPOSITION_CLEAN_EFFECTS flag
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-14 23:16:32 +00:00
Ronald S. Bultje
275189a2bd mmst: fix reading uninitialized data for ping packets.
Fixes errors after a few minutes (first ping) when playing back
mmst://wm.bbc.co.uk/wms/bbc7coyopa/bbc7_-_friday_0430.wma
2011-02-14 09:55:14 -05:00
Mans Rullgard
aabc2682fc asfdec: fix build for big endian targets
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-13 22:10:45 +00:00
Peter Ross
1a973feb45 wtv: ignore empty data_guid chunks
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-13 16:49:39 -05:00
Anton Khirnov
5cbd3b5d91 asfdec: don't export empty metadata
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-13 16:49:39 -05:00
Anton Khirnov
8bf6db1b29 asfdec: split reading stream properties out of asf_read_header()
This contains a rename from gsize->size

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-13 16:49:39 -05:00
Francesco Cosoleto
70630e35a4 mmst: print packet type with error status code message
Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-13 16:49:39 -05:00
Anssi Hannula
3c33c0e263 lavf: print stream disposition in dump_stream_format
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-02-13 15:21:11 +01:00
Anssi Hannula
57f2c9aed9 spdifenc: fix byte order on big-endian systems
There is a check for HAVE_BIGENDIAN when outputting the IEC 61937
stream. On big-endian systems the payload data is not byteswapped,
causing in effect the outputted payload data to be in a different byte
order on big-endian than on little-endian systems.

However, the IEC 61937 preamble (and the final odd byte if present) is
always outputted in the same byte order. This means that on big-endian
systems the headers have a different byte order than the payload,
preventing useful use of the output.

Fix that by outputting the data in a format suitable for sending to an
audio device in S16LE format by default. Output as big-endian (S16BE)
is added as an AVOption. This makes the muxer output the same on all
archs by default.

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-02-13 15:16:55 +01:00
Anssi Hannula
482d98f69b spdifenc: IEC 61937 encapsulation of DTS-HD for HDMI
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-02-13 15:16:39 +01:00
Takashi Mochizuki
44b1120724 movenc: Force first sample as SYNC
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-13 01:16:30 +00:00
Martin Storsjö
b2dd842d21 rtsp/rdt: Assign the RTSPStream index to AVStream->id
This is used for mapping AVStreams back to their corresponding
RTSPStream. Since d9c0510, the RTSPStream pointer isn't stored in
AVStream->priv_data any longer, breaking this mapping from AVStreams
to RTSPStreams.

Also, we don't need to clear the priv_data in rdt cleanup any longer,
since it isn't set to duplicate pointers.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-11 16:58:19 -05:00
Anton Khirnov
b0294c80d3 lavf: deprecate AVFormatContext.index_built
it's not touched anywhere in ffmpeg, the code setting it was removed
over two years ago (e9b78eeba2).

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-10 21:34:29 -05:00
Anton Khirnov
0b1d291a71 asfdec: deobfuscate reading video properties size
This code will be later split out into a function which takes a 'size'
argument, so I'm keeping the name 'sizeX' here.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-10 18:05:01 -05:00
Anton Khirnov
c1fea23070 asfdec: split asf_read_header()
Only trivial splits are done here -- i.e. copy/paste + reindent +
missing variable declarations.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-10 18:03:32 -05:00
Peter Ross
68137ba386 wtv: mark streams intended for hearing or visual impaired persons
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-02-10 22:55:17 +01:00
Peter Ross
5209149157 make av_find_best_stream() ignore streams marked with AV_DISPOSITION_*_IMPAIRED
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-02-10 22:55:17 +01:00
Peter Ross
12c14cd4a8 add AV_DISPOSITION_HEARING_IMPAIRED and AV_DISPOSITION_VISUAL_IMPAIRED
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-02-10 22:55:17 +01:00
Mans Rullgard
44adbebe17 Remove final semicolon from some macros
This avoids double semicolons after macro expansion.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-10 21:45:17 +00:00
Mans Rullgard
628b16f45f mov: remove stray semicolon
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-10 14:17:24 +00:00
Anton Khirnov
d7a5106eb2 asfdec: skip the stream bitrate list
Its contents aren't used for anything.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-10 07:03:49 -05:00
Anton Khirnov
7c7253802b asfdec: use an ASFContext array for storing stream bitrates
This will be useful for splitting asf_read_header()

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-09 22:26:03 -05:00
Anton Khirnov
d42b09723e asfdec: move DAR list to ASFContext
This will be useful for splitting asf_read_header()

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-09 22:26:00 -05:00
David Fries
00952be424 udp: Enable address reuse by default for multicast
Keep the original corner case behaviour, where reuse is enabled
for the case where no argument is given to the reuse url option.

Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-09 22:03:59 -05:00
Anton Khirnov
569ff02168 asfdec: remove some write-only values from the context
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-09 22:41:30 +00:00
Anton Khirnov
4bc328a2bd asf: split ASFContext into muxer and demuxer parts.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-09 15:31:09 -05:00
Vladimir Pantelic
f4c79d1e0b mpegts: remove unused macro MAX_SCAN_PACKETS
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-09 16:56:51 +00:00
Alexander Strange
37b00b47cb Frame-based multithreading framework using pthreads
See doc/multithreading.txt for details on use in codecs.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-09 09:17:28 -05:00
Anton Khirnov
e4e234fad7 asf: make ff_guidcmp inline and move it to asf.h
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-09 12:33:05 +00:00
Anssi Hannula
3940caad02 lavf: rename ff_probe_input_buffer to make it public
It is useful for applications that hand input data directly to lavf via
a ByteIOContext.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-08 18:25:12 -05:00
Anssi Hannula
aad216fd7e lavf: simplify pb parameter of ff_probe_input_buffer
There is no need to pass the ByteIOContext via a pointer to a pointer
anymore.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-08 18:25:11 -05:00
Anssi Hannula
4d016dd4e5 lavf: update ff_probe_input_buffer documentation
It never reopens the bytestream anymore.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-08 18:25:11 -05:00
Reimar Döffinger
6bd69e6ada oggdec: Fix incorrect assumption about header/data interleaving
Currently (since the data_offset fix) the ogg demuxer assumes that
after the first non-header packets in any stream no more header packets
will follow.
This is not guaranteed, so change the code back again to wait until it
has finished the headers for all streams before returning from ogg_get_headers.

This fixes issue 2428.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-08 21:40:03 +00:00
Reimar Döffinger
95ec3d4cac matroskadec: add generic element length validation.
This validate the length of a mkv element directly after reading
it.
This has the advantage that it is easy to add new limits and makes
it less likely to forget to add checks and also avoids issues like
bits of the length value above the first 32 being ignored because
the parsing functions only takes an int.
Previously discussed in the "mkv 0-byte integer parsing" thread.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-06 21:36:53 -05:00
Ronald S. Bultje
69ff149204 Fix compile warning.
Change int64_t into a int, which caused this compiler warning:
libavformat/oggparseskeleton.c:64: warning: passing argument 2 of ‘av_reduce’ from incompatible pointer type
2011-02-06 20:33:53 -05:00
Anton Khirnov
47fdf00a77 avidec: simplify read_gab2_sub
Use avio functions instead of bytestream ones (also drops dependency on
lavc and removes a bunch of warnings).
Drop custom version of avio_get_str16 and use that instead.

Tested on mewmew-ssa.avi sample.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-06 20:30:28 -05:00
Anton Khirnov
19711af5cd lavf: move internal functions from avformat.h to internal.h
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-06 16:35:00 -05:00
Reimar Döffinger
b3190529df Make av_set_pts_info keep previous time base if new one is invalid.
Fixes issue 2475.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-06 16:12:15 -05:00
Reimar Döffinger
a351110eea Always use av_set_pts_info to set the stream time base.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-06 16:08:59 -05:00
Sascha Sommer
ed19fafd48 pass QDMC extradata to the decoder
Makes playing QDMC files in MPlayer work when using the libavformat demuxer.
Problem was that the extradata was not passed from demuxer to decoder.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-06 16:05:55 -05:00
Ronald S. Bultje
efdd67cb00 Update MINOR and set git rev for non-blocking flag API addition. 2011-02-06 09:19:34 -05:00
Anton Khirnov
c2fcd0a7a4 Replace remaining occurrences of deprecated CH_* with AV_CH_*
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-06 08:26:12 -05:00
Nicolas George
ad3cffb68f Non-blocking protocol: TCP
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-05 20:31:38 -05:00
Nicolas George
90441276e4 Non-blocking protocol: core wrapper functions
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-05 20:29:59 -05:00
Nicolas George
fe174fc8fc Non-blocking protocols: flag and documentation
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-05 20:28:04 -05:00
Anton Khirnov
5a6de4e7e8 mp3enc: write ISO8859-1 instead of UTF-16 when possible
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-05 20:13:48 -05:00
Peter Ross
74571e333c reindent after last commit
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-05 20:10:32 -05:00
Peter Ross
e4f85b8499 wtv: do not use flag in stream_guid chunk to determine if stream is valid, as this method is unreliable
This fixes roundup issue 2556.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-05 20:09:56 -05:00
Martin Storsjö
185a155e57 applehttp: Handle absolute paths relative to the current server
This fixes roundup issue 2583.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-04 12:23:04 -05:00
Martin Storsjö
5306bf41a6 movenchint: Use rtpenc_chain for setting up the chained RTP muxer
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-04 11:42:54 -05:00
Martin Storsjö
397ffde115 rtpenc_chain: Don't copy the time_base back to the caller
If required, the caller can do this itself. ff_write_chained rescales
timestamps as necessary, and all current callers of rtpenc_chain
use ff_write_chained, making this timebase copy unnecessary.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-04 11:41:10 -05:00
Martin Storsjö
b22dbb291d Use avformat_free_context for cleaning up muxers
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-04 11:39:55 -05:00
Martin Storsjö
f124b087ee libavformat: Add a function for freeing an AVFormatContext
This function is useful for freeing data structures allocated by
muxers, which currently have to be freed manually by the caller.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-04 11:29:41 -05:00
Martin Storsjö
1338dc0823 libavformat: Use avcodec_copy_context for chained muxers
This avoids having the chained AVStream->codec point to the same
AVCodecContext owned by the outer AVStream. The downside is that
changes to the AVCodecContext made after calling av_write_header
cannot be detected automatically within the chained muxer.

This avoids having to manually unlink the chained AVStream->codec
by setting it to null before freeing the chained muxer via generic
freeing functions.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-04 11:28:07 -05:00
Clément Bœsch
290849e2a4 Remove forgotten if (p) av_free(p) forms
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-04 10:00:52 +00:00
Peter Ross
e6fb5a4f78 add ff_index_search_timestamp and ff_add_index_entry
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-03 21:50:54 -05:00
Nicolas George
51b317d2e9 TCP: factor the poll() call
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-03 20:58:32 -05:00
Peter Ross
f61dee2fe4 wtv: filesystem implementation
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-03 20:55:42 -05:00
Anton Khirnov
a9d921cbad tty.c: rename PKT_FLAG_KEY to AV_PKT_FLAG_KEY.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-03 13:41:08 +00:00
Anton Khirnov
b2ed95ec48 Replace remaining occurrences of CODEC_TYPE_* with AVMEDIA_TYPE*
Tested to compile with lavc major bump.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-03 13:37:09 +00:00
Martin Storsjö
1f56f5ed6d sapenc: Free AVStream->info on cleanup
This fixes yet another memory leak, present since SVN rev 25418.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-03 13:21:36 +00:00
Anton Khirnov
9ad4c65f6f rtmpproto: rename URLContext* argument in rtmp_write()
Now the first argument is URLContext *h. However, the function logs to
LOG_CONTEXT, which is #defined as 's' for new lavf major versions.

Therefore, rename h -> s.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-03 11:43:48 +00:00
Tomas Härdin
e65b1934bf Add ProRes FOURCCs to isom.c
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-03 11:40:56 +00:00
Benjamin Larsson
aa42cce57d Add AVC-Intra identifiers used by Flip4Mac for mov files
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-03 10:21:44 +00:00
Clément Bœsch
437fb1c87d Remove a few if (p) av_free(p) forms
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-03 01:37:55 +00:00
Martin Storsjö
ce41c51b0c Free AVStream->info in chained muxers
This fixes memory leaks in the RTSP muxer and RTP hinting in the
mov muxer present since SVN rev 25418.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-02-03 01:03:31 +01:00
Martin Storsjö
d9c0510e22 rtsp: Don't store RTSPStream in AVStream->priv_data
For mpegts in RTP, there isn't a direct mapping between RTSPStreams
and AVStreams, and the RTSPStream isn't ever stored in
AVStream->priv_data, which was earlier leaked. The fix for this
leak, in ea7f080749, lead to
double frees for other, normal RTP streams.

This patch avoids storing RTSPStreams in AVStream->priv_data, thus
avoiding the double free. The RTSPStreams are always available via
RTSPState->rtsp_streams anyway.

Tested with MS-RTSP, RealRTSP, DSS and mpegts/RTP.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-02-03 00:49:15 +01:00
Anton Khirnov
4868bebe5b Add forgotten minor API bumps and APIChanges entries
The bumps are for adding version.h and avio_{get/put}_str functions in
lavf and making av_dlog public in lavu.

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-02-02 22:42:39 +01:00
Luca Barbato
ea7f080749 Free the RTSPStreams in ff_rtsp_close_streams
This plugs a small memory leak

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-02-01 20:40:16 +01:00
Reimar Döffinger
8cb3c557a9 Ogg: discard non-essential metadata from Vorbis header when creating extradata
The first part of the metadata, the "vendor" string, is required by
libvorbis, it will refuse to play when it is not available.
Also we do not currently parse that part into metadata so it would also
be lost if we removed it as well.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-31 20:21:26 +00:00
Mans Rullgard
740ad0d14d mpegtsenc: fix PMT PID calculation
445996aa51 caused the PMT PID to be
off by one.  This corrects it.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-31 16:58:23 +00:00
Georgi Chorbadzhiyski
445996aa51 Replace defines in libavformat/mpegtsenc.c with AVOptions
Around 01/28/11 18:56, Ronald S. Bultje scribbled:
> That patch is now merged, can you submit the update to muxers.texi?
> Then we'll apply the whole thing.

See attached. I hope the documentation is enough.

--
Georgi Chorbadzhiyski
http://georgi.unixsol.org/

From c236024b8254f5c2c45934c30fff390cb0e55a5e Mon Sep 17 00:00:00 2001
From: Georgi Chorbadzhiyski <gf@unixsol.org>
Date: Tue, 25 Jan 2011 13:09:17 +0200
Subject: [PATCH] mpegts: Replace defines in with AVOptions

This patch adds support for setting transport_stream_id,
original_network_id, service_id, pmt_start_pid and start_pid
in mpegts muxer.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-01-31 10:42:13 -05:00
Reimar Döffinger
22e9277aa5 VC1testenc: convert pts values to correct time-base.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-01-31 09:25:18 -05:00
Ronald S. Bultje
4543009943 asf/wtv: use service_provider and service_name metadata tags
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-01-31 08:58:33 -05:00
Vasyl' Vavrychuk
665132e620 mpegts: remove get_pts duplicate of ff_parse_pes_pts.
Signed-off-by: Vasyl' Vavrychuk <vvavrychuk@gmail.com>
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-30 16:39:27 +00:00
Luca Barbato
dfd2a005eb Replace dprintf with av_dlog
dprintf clashes with POSIX.1-2008
2011-01-29 23:55:37 +01:00
Reimar Döffinger
ce20edb7bd Vorbis-in-Ogg: Do not set timebase to invalid values
Avoids an assert when the sample rate is invalid and the timebase
is thus set to e.g. 1/0.
Sample file is http://samples.mplayerhq.hu/ogg/fuzzed-srate-crash.ogg

This is a quick fix for a crash, not a final solution.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-29 13:48:13 +00:00
Peter Ross
4d54df8e07 mpegtsenc: support CODEC_ID_AAC_LATM
$subject. Have used this for loopback testing with mpegts.c.

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
[2. text/x-diff; 0001-mpegtsenc-support-CODEC_ID_AAC_LATM.patch]

From 0f7f9db4b7da1793996af6dda84298507703759a Mon Sep 17 00:00:00 2001
From: Peter Ross <pross@xvid.org>
Date: Sun, 9 Jan 2011 09:45:50 +1100
Subject: [PATCH] mpegtsenc: support CODEC_ID_AAC_LATM

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-28 22:33:57 +00:00
Dave Yeo
a0788cc627 rtspenc: include os_support.h for system without HAVE_POLL_H
fix compile on OS/2

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-28 21:41:12 +01:00
Anton Khirnov
042950542d asfdec: ensure that the whole tag is read.
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-28 21:33:45 +01:00
Mans Rullgard
362d8f7d9e os_support: make poll() fallbacks conditional on CONFIG_NETWORK
poll() is only used by networking code, so the fallback should
only be built if networking is enabled.  Also remove CONFIG_FFSERVER
condition from the declarations.

This should fix building on systems without poll(), broken
by a8475bbdb6.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-28 17:23:19 +00:00
Stefano Sabatini
4fc9ff0ad6 Make the image2 demuxer log more verbose
Add an error message in case the user requests to write more than one file
and the path does not contain a "%d" or "%0Nd" pattern.

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-28 18:04:33 +01:00
Georgi Chorbadzhiyski
a7827a17c6 In mpegts "reserved_future_use" field must be set to 1 in SDT table
According to EN 300 468 section 3.1 (Definitions):

   Unless otherwise specified within the present document all
   "reserved_future_use" bits is set to "1".

This was not the case for SDT generation so this patch fixes it.

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-28 17:46:36 +01:00
Luca Barbato
f81c7ac70a rtsp: make ff_sdp_parse return value forwarded
the sdp demuxer did not forward it at all while the rtsp demuxer assumed
a single kind of error
2011-01-28 15:45:19 +01:00
Luca Barbato
a8475bbdb6 os: replace select with poll
Select has limitations on the fd values it could accept and silently
breaks when it is reached.
2011-01-28 15:45:19 +01:00
Diego Elio Pettenò
e628864033 Hide demuxers', muxers' and protocols' objects via the ld version script.
This reduces the symbols exported by libavformat from 699 to 451.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-28 01:45:17 +00:00
John Stebbins
97b04f5ed3 mov: add support for little-endian utf16 chapter names
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-28 01:06:57 +01:00
Janne Grunau
795ed278e6 movenc: byteswap codec_tag in mov_write_ms_tag
based on Alex Converse's "Fix ADPCM MS in mov muxing" patch
2011-01-28 01:06:57 +01:00
Baptiste Coudurier
f258964217 In mov muxer, mux adpcm_ms and adpcm_ima_wav the way quicktime supports it
In mov demuxer, set adpcm_ms and adpcm_ima_wav frame size to stsd samples per packet.

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-28 01:06:57 +01:00
Diego Elio Pettenò
c6610a216e Prefix all _demuxer, _muxer, _protocol from libavformat and libavdevice.
This also lists the objects from those two libraries as internal (by adding
the ff_ prefix) so that they can then be hidden via linker scripts.
2011-01-26 22:10:09 +00:00
Anton Khirnov
225b6d7fde mov: simplify mov_read_chapters() by using avio_get_str16be
It probably also fixes a memleak or two.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-26 22:03:21 +00:00
Mans Rullgard
c4f8765ac5 Revert "mov: simplify mov_read_chapters() by using avio_get_str16be"
This reverts commit c34461b35b.
The wrong version of the patch was committed.
2011-01-26 22:03:21 +00:00
Diego Elio Pettenò
2d162e3825 Make ff_cmap_read_palette static to libavcodec/iff.c. Delete iff.h.
The iff.h header only declared one function that is now static, the
libavformat/iff.c source file wasn't using it before. Drop the file
entirely.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-26 16:08:04 +00:00
Georgi Chorbadzhiyski
535638b55f mpegtsenc: set reserved bits to 1 in PCR field
The reserved bits between PCR base and extension fields must be
set to 1.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-26 00:02:42 +00:00
Diego Elio Pettenò
57c4d01ec9 Make ff_rtsp_send_cmd_with_content_async static to rtsp.c.
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-25 22:10:36 +01:00
Diego Elio Pettenò
a3dffc0627 Make ff_mxf_pixel_layouts static to mxf.c.
Also make it an anonymous structure as never it is accessed by name.

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-25 21:48:03 +01:00
Diego Elio Pettenò
101e1f6ff9 Make ff_interleave_compare_dts static to utils.c.
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-25 21:48:03 +01:00
Anton Khirnov
c34461b35b mov: simplify mov_read_chapters() by using avio_get_str16be
It probably also fixes a memleak or two.

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-25 21:48:03 +01:00
Anton Khirnov
2934cd9dbf asfdec: remove some commented-out cruft
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-25 21:48:03 +01:00
Anton Khirnov
93b78d1210 lavf: make a variant of ff_get_str16_nolen public
It will be useful in mp3 demuxer and hopeful some other places.

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-25 21:48:03 +01:00
Jai Menon
c0ae5152d1 ffmetaenc: Use correct format specifiers.
Use printf format macros from inttypes.h.
Additionally, this fixes a warning when building with clang.
2011-01-25 17:34:11 +00:00
Mans Rullgard
1e48cdaac3 tty: remove superflous #include <strings.h>
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-25 15:57:53 +00:00
Georgi Chorbadzhiyski
6e78c8ee94 mpegtsenc: remove unused variables
Remove two variables that were not used and caused the following
warnings:

CC      libavformat/mpegtsenc.o
libavformat/mpegtsenc.c: In function 'mpegts_write_section':
libavformat/mpegtsenc.c:72:18: warning: unused variable 'ts'
libavformat/mpegtsenc.c: In function 'mpegts_insert_null_packet':
libavformat/mpegtsenc.c:586:18: warning: unused variable 'ts'

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-25 12:52:45 +00:00
Mans Rullgard
6081f8c4e2 avidec: make print_tag() a macro and remove related ifdefs
The dprintf macro is a no-op if DEBUG is not defined, so there
is no need to guard it here.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-25 02:43:28 +00:00
Diego Elio Pettenò
119cc033fc Make RTPFirstDynamicPayloadHandler static to rtpdec.c
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-25 01:45:34 +00:00
Diego Elio Pettenò
69ad22c7a7 Make ff_realmedia_mp3_dynamic_handler static.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-25 01:37:32 +00:00
Diego Elio 'Flameeyes' Pettenò
73a0b19ba3 Don't check for DEBUG before using dprintf.
The dprintf macro is no-op when DEBUG is unset, so there is no need to
put it conditional to DEBUG.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-25 00:25:50 +00:00
Diego Elio Pettenò
f0a8676958 Make dvenc.c functions static to the unit.
Also drop some CONFIG_DV_MUXER #ifdefs probably vestigial from before the
split of dvenc and dvdec.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-25 00:02:12 +00:00
Martin Storsjö
2762a7a28b rtspdec: Retry with TCP if UDP failed
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-24 22:49:36 +01:00
Martin Storsjo
e836b1b085 rtspdec: Move rtsp_read_pause up, next to rtsp_read_play
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-24 22:46:45 +01:00
Martin Storsjo
aeb2de1c82 rtsp: Use ff_rtsp_undo_setup in the cleanup code in ff_rtsp_make_request
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-24 22:46:43 +01:00
Martin Storsjo
93e7490ee0 rtsp: Split out a function undoing the setup made by ff_rtsp_make_setup_request
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-24 22:46:39 +01:00
Martin Storsjo
fef5649a82 rtsp: Make make_setup_request a nonstatic function
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-24 22:46:36 +01:00
Martin Storsjö
2b0decf60b applehttp: Fix the key check in handle_variant_args
The key string is supposed to contain the equals character,
too.  Since the checked string was wrong, and the return value
check was wrong too, it incorrectly seemed to work right before.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-24 20:19:37 +00:00
Kostya
dacbcd170a reindent after last commit
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-24 20:46:58 +01:00
Kostya
3bdc886c22 Extend WavPack demuxer and decoder to support >2 channel audio
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-24 20:46:58 +01:00
Anton Khirnov
22272f61bb mp3enc: support for id3v2.3 tags using a per-muxer AVOption
fixes issue2562.

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-22 02:06:14 +01:00
Anton Khirnov
cb6bc57681 id3v2: split tables for various ID3v2 versions
This is needed for upcoming ID3v2.3 muxing support.

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-22 02:06:10 +01:00
Anton Khirnov
8c3caf7fb1 mp3enc: handle errors in id3v2_put_ttag
make the initialization of put clearer

this are the differences between
[FFmpeg-devel] [PATCH 1/3] mp3enc: add support for writing UTF-16 tags
and the already applied 187e23478b

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-22 02:04:13 +01:00
Clément Bœsch
045b80e52d Move ID3v1 skip from decoder to demuxer
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-22 01:31:57 +01:00
Anton Khirnov
187e23478b mp3enc: add support for writing UTF-16 tags
Also it gets rid of some mysterious magic numbers in code.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-21 21:52:41 +00:00
Anton Khirnov
dccbd97d72 lavf: move ff_put_str16_nolen from asf to avio and rename it
It will be useful in the mp3 muxer.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-21 20:21:51 +00:00
Anton Khirnov
4efd5cf34b avio: add av_put_str and deprecate put_strz in favor of it
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-21 20:21:03 +00:00
Anton Khirnov
50196a982b lavf: move the version macros to a new header
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-21 19:30:51 +00:00
Anton Khirnov
d66eff3685 id3v2: use an enum for encodings instead of magic numbers.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-21 18:42:10 +00:00
Anton Khirnov
d08928bbea Split mp3 demuxer and muxer into separate files.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-21 15:11:52 +00:00
Janne Grunau
e5fe65512b mpegtsenc: prefer metadata keyed with "service_name"
title metadata is only used as fallback if no service_name is available.

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-20 15:28:32 +01:00
Georgi Chorbadzhiyski
e8315e7881 Set service_provider and service_name in mpegts demuxer
Set service_provider and service_name in mpegts demuxer, previously
name and provider_name were set but since the muxer uses service_provider
and service_name use them.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-20 13:42:27 +00:00
Anton Khirnov
75aded8328 id3v2: don't overwrite existing tags
Apparently some broken taggers prepend a new ID3v2 tag leaving the
existing one intact. Our parser currently reads all tags and overwrites
existing values with supposedly outdated ones.

fixes issue2419

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-20 13:39:19 +00:00
Anton Khirnov
f7fcd6a254 id3v2: convert metadata after all the tags were read
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-20 13:36:28 +00:00
Anton Khirnov
46a2da7698 id3v2: make ff_id3v2_parse static
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-20 13:36:22 +00:00
Georgi Chorbadzhiyski
69688e71bc Add service_provider and service_name metadata
This patch adds support in mpegts muxer for using service_provider and
service_name metadata to set service_provider_name and service_name
fields in SDT.

Example usage:
   ffmpeg -i file.ts -f mpegts -re -acodec copy -vcodec copy -f mpegts \
       -metadata service_provider="Some provider" \
       -metadata service_name="Some Channel" \
       "udp://239.0.70.2:5000?pkt_size=1316&ttl=1"

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-20 11:31:20 +00:00
Janne Grunau
2c3589bfda consolidate .gitignore patters into a single file
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-18 21:32:05 +01:00
Justin Ruggles
f61cbc22d3 Revise check for codec id in voc demuxer.
This fixes demuxing of packets that do not contain a codec tag and come before the codec_id has been set.
2011-01-18 13:07:17 -05:00
Justin Ruggles
1ae02fe03b Fix bug in voc demuxer that was introduced in SVN r26309.
Fixes issue 2560.
2011-01-18 12:15:36 -05:00
Reimar Döffinger
54bc640362 Missing parts of IVF muxer support. 2011-01-18 08:00:23 +01:00
Reimar Döffinger
326851b9bc Add muxer for IVF format. 2011-01-17 21:11:51 +01:00
John Wimer
b79c3df088 prevent integer overflow in calculating duration
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-01-17 17:05:58 +02:00
Janne Grunau
348b8218f7 convert svn:ignore properties to .gitignore files
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-17 15:50:14 +01:00
Michael Niedermayer
8bb7d97be0 Check 4xm headers for validity. This should avoid 1/0.
Originally committed as revision 26392 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-16 18:22:29 +00:00
Michael Niedermayer
f9329946d0 Parse fact chunks from wav files to find duration.
Originally committed as revision 26370 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-15 17:13:32 +00:00
Michael Niedermayer
724b1f6a05 Factor tag reading code out of wav read_header()
Originally committed as revision 26369 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-15 17:13:30 +00:00
Michael Niedermayer
462b26202b Set duration for wav files from sample size and data size or the wf64 sample value.
This should improve duration accuracy slightly and avoids a warning about its
inaccuracy when accurate values are available. Idea by Frank Barchard

Originally committed as revision 26366 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-15 16:26:42 +00:00
Baptiste Coudurier
6dc7dc08ed In mxf muxer, check the return value of gmtime, fix #2494
Originally committed as revision 26343 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-14 22:36:23 +00:00
Ronald S. Bultje
06ed024d4f Copy metadata from ASF files contained in RTSP streams from ASF to RTSP layer,
so that applications can read it also.

Originally committed as revision 26332 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-14 19:44:44 +00:00
Ronald S. Bultje
7f88a5bf9b Introduce av_metadata_copy() to copy metadata from one struct to another.
Originally committed as revision 26330 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-14 19:30:55 +00:00
Peter Ross
b070bcfe8a wtv: ignore VIDEOINFOHEADER2 picture aspect ratio information, as it is unreliable
Originally committed as revision 26327 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-14 08:28:27 +00:00
Martin Storsjö
c66f53cf8b Revert aviobuf: Retry if the read/write function returns AVERROR(EAGAIN)
This reverts SVN commit 26318, which broke MS-RTSP playback.

Originally committed as revision 26326 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-13 06:22:43 +00:00
Stefano Sabatini
0d3ee13551 Use AVERROR_INVALIDDATA rather than -1 for nutdec error codes.
Originally committed as revision 26321 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-12 16:40:28 +00:00
Martin Storsjö
a6963f8304 aviobuf: Retry if the read/write function returns AVERROR(EAGAIN)
Originally committed as revision 26318 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-12 07:06:27 +00:00
Baptiste Coudurier
c3024f9e7e In mov demuxer, handle better wrong time scale, fix issue #2528
Originally committed as revision 26311 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-11 21:06:37 +00:00
Baptiste Coudurier
f6253caf8b In mov demuxer, set r_frame_rate for cfr files
Originally committed as revision 26310 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-11 19:58:00 +00:00
Daniel Kang
e048a9cab1 Do not crash for illegal sample size, fixes issue 2502.
Patch by Daniel Kang, daniel.d.kang at gmail

Originally committed as revision 26309 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-11 14:08:45 +00:00
Stefano Sabatini
440d761e40 Clarify timestamps related error messages in compute_pkt_fields2().
Originally committed as revision 26308 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-11 12:17:27 +00:00
Peter Ross
1c4ac03530 electronicarts: prevent endless loop opportunity in process_audio_header_elements()
Fixes issue2529.

Originally committed as revision 26307 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-11 02:25:12 +00:00
Peter Ross
74093bb593 revert r26302
Originally committed as revision 26305 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-10 22:25:45 +00:00
Peter Ross
e19e051e56 electronicarts: prevent endless loop opportunity in process_audio_header_elements()
Fixes issue2529.

Originally committed as revision 26302 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-10 12:56:50 +00:00
Peter Ross
42396c2e67 electronicarts: only apply audio sanity checks when audio stream is present
Originally committed as revision 26301 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-10 12:51:45 +00:00
Daniel Kang
cb77dad724 perform sanity check on sample rate in electronicarts demuxer
Fixes issue2525
Original patch by Daniel Kang, daniel.d.kang at gmail

Originally committed as revision 26298 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-10 11:38:38 +00:00
Daniel Kang
4da766ce65 perform sanity check on number of channels in electronicarts demuxer
Fixes issue2514
Original patch by Daniel Kang, daniel.d.kang at gmail

Originally committed as revision 26296 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-10 11:02:07 +00:00
Martin Storsjö
a3b058b7ba rtsp: Properly fail if unable to open an input RTP port
Originally committed as revision 26285 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-09 10:47:53 +00:00
Peter Ross
5a477e5960 fix indentation
Originally committed as revision 26278 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-09 02:44:54 +00:00
Peter Ross
866009ea19 wtv: only process timestamp_guid chunks for streams that we know about
Originally committed as revision 26277 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-09 02:42:16 +00:00
Peter Ross
a5a36a7970 wtv: do not repopulate codec information after we have seen data chunks
Originally committed as revision 26276 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-09 02:35:06 +00:00
Peter Ross
bf2e54174e wtv: stop processing chunks if length is smaller than chunk header
Originally committed as revision 26275 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-09 02:21:30 +00:00
Peter Ross
9372f31e03 wtv: fix typo
Originally committed as revision 26274 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-09 02:13:58 +00:00
Peter Ross
50d83b2005 Add audio codec 0x1602 (AAC LATM)
Originally committed as revision 26273 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-09 02:11:41 +00:00
Carl Eugen Hoyos
d267b339e4 Lagarith decoder by Nathan Caldwell, saintdev at gmail
Originally committed as revision 26270 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-08 21:22:15 +00:00
Baptiste Coudurier
a2b7ed3274 In mov muxer, override codec tag for dv in mov, fix remuxing from avi
Originally committed as revision 26257 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-07 19:56:31 +00:00
Baptiste Coudurier
10d8eac98d In mov muxer, override codec tag for h263 in mov, fix remuxing from 3gp
Originally committed as revision 26255 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-07 19:55:08 +00:00
Martin Storsjö
a92c30d76e rtsp: Allow requesting of filtering of source packets
If filtered, only packets from the right source address and port
are received.

To test, play back e.g. some mpeg4 video RTSP stream (where the
video stream is the first stream in the presentation) over UDP.
While receiving this stream, send another stream to the same port:
ffmpeg -re -i <whatever> -vcodec mpeg4 -an -f rtp
rtp://127.0.0.1:5000?localport=1234
Normally, the RTSP playback reports lots of errors at this point.

If the RTSP stream has the ?filter_src option enabled, these
interferring packets are ignored.

Originally committed as revision 26246 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-06 15:22:58 +00:00
Martin Storsjö
21a569f302 udp: Allow specifying the connect option in udp_set_remote_url, too
If the remote address is updated later with this function, the caller
shouldn't set the connect option until in this call.

Originally committed as revision 26245 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-06 15:16:50 +00:00
Martin Storsjö
babd19ce2e rtpproto: Allow specifying the connect option, passed through to udp
By calling connect on the UDP socket, only packets from the chosen
peer address and port are received on the socket. This is one
solution to issue 1688.

Originally committed as revision 26244 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-06 15:16:09 +00:00
Carl Eugen Hoyos
504530bfba Set blkalign to 3840 (maximum bytes per frame) for AC-3 in avi.
Fixes playback for corner-cases like 32kHz 320kb.

Originally committed as revision 26242 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-06 13:30:32 +00:00
Martin Storsjö
79d482b108 rtpdec: Don't set RTP timestamps if they already are set by the depacketizer
For MS-RTSP, we don't always get RTCP packets (never?), so the earlier
timestamping code never wrote anything into pkt->pts. The rtpdec_asf
depacketizer just sets the dts of the packet, so if the generic RTP
timestamping is used, too, we get inconsistent timestamps.

Therefore, skip the generic RTP timestamp algorithm if the depacketizer
already has set something.

This fixes "Invalid timestamps" warnings, present since SVN rev 26187.

Originally committed as revision 26241 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-06 11:33:06 +00:00
Daniel Kang
6cbce63650 Fix assertion fail on audio files with invalid sample rates,
fixes issue 2475.

Patch by Daniel Kang, daniel.d.kang at gmail

Originally committed as revision 26240 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-06 03:30:19 +00:00
Stefano Sabatini
6bbdba08c2 Revert previous commit, as it was not meant to be pushed.
Originally committed as revision 26239 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-06 01:11:57 +00:00
Stefano Sabatini
7820147e6f Issue more explicit error messages in compute_pkt_fields2().
Originally committed as revision 26238 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-06 01:01:21 +00:00
Stefano Sabatini
81bd411965 In av_close_input_stream(), flush the packet queue before to actually
close the stream.

This way the flushed packets can still reference the still unclosed
format context.

In particular this fixes a spurious error issued when closing the
video4linux2 buffer in mmap_release_buffer(), which tries to access
the file descriptor of an already closed file.

Originally committed as revision 26237 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-06 01:01:14 +00:00
Martin Storsjö
29db7c3af4 rtsp: Parse RTP-Info headers
Originally committed as revision 26236 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-05 21:23:42 +00:00
Martin Storsjö
4cb06874c7 Reindent
Originally committed as revision 26235 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-05 21:23:12 +00:00
Martin Storsjö
91d96bd3c0 rtsp: Simplify code
Originally committed as revision 26234 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-05 21:22:50 +00:00
Martin Storsjö
1726813f13 rtsp: Move resetting of rtpdec parameters to before sending the PLAY request
Originally committed as revision 26233 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-05 21:22:15 +00:00
Baptiste Coudurier
ab04337464 In ogg muxer, correctly mux VFR streams, fix issue #2398
Originally committed as revision 26229 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-05 19:32:45 +00:00
Baptiste Coudurier
5e2202d6f3 In mov demuxer, check that gmtime returns a valid value, fix crash, issue #2490
Originally committed as revision 26228 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-05 19:21:04 +00:00
Baptiste Coudurier
4af7166fb4 In mov demuxer, check that stts data exists, fix crash, issue #2479
Originally committed as revision 26227 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-05 19:14:44 +00:00
Anton Khirnov
14fa75eab4 lavf: rename meta.h->ffmeta.h for consistency.
Originally committed as revision 26211 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-04 12:35:39 +00:00
Peter Ross
6780f48846 wtv: obtain codec information from stream2_guid chunks, if present
Originally committed as revision 26208 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-04 11:38:29 +00:00
Peter Ross
17e33f662a wtv: display warning if scrambled stream is detected
Originally committed as revision 26197 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-02 11:17:34 +00:00
Anssi Hannula
cf99e4aa00 Add AVOption support for muxers.
Patch by Anssi Hannula, anssi d hannula a iki d fi

Originally committed as revision 26195 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-02 10:52:34 +00:00
Anssi Hannula
febd72be65 Use new function put_nbyte() to speed up padding.
Patch by Anssi Hannula, anssi d hannula a iki d fi

Originally committed as revision 26194 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-02 10:46:50 +00:00
Anssi Hannula
17ee8f669f Add function put_nbyte() to speed up padding in SPDIF muxer.
Patch by Anssi Hannula, anssi d hannula a iki d fi

Originally committed as revision 26193 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-02 10:45:07 +00:00
Martin Storsjö
d2995eb910 rtsp: Store the Content-Base header value straight to the target
This avoids having a large temporary buffer in the struct used for
storing the rtsp reply headers.

Originally committed as revision 26192 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-02 10:11:12 +00:00
Martin Storsjö
77223c5388 rtsp: Pass the method name to ff_rtsp_parse_line
Originally committed as revision 26191 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-02 10:10:12 +00:00
Martin Storsjö
acc9ed1450 rtsp: Pass RTSPState to ff_rtsp_parse_line, instead of HTTPAuthState
This allows ff_rtsp_parse_line to do more changes directly in RTSPState
when parsing the reply, instead of having to store large amounts of
temporary data in RTSPMessageHeader.

Originally committed as revision 26190 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-02 10:07:56 +00:00
Martin Storsjö
3df54c6bf2 rtsp: Add a method parameter to ff_rtsp_read_reply
Originally committed as revision 26189 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-02 10:06:21 +00:00
Daniel Kang
7f8ffc4efd Fix a floating point exception for invalid framerate, fixes issue 2470.
Patch by Daniel Kang, daniel.d.kang at gmail

Originally committed as revision 26188 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-02 05:01:46 +00:00
Martin Storsjö
3a1cdcc798 rtpdec: Emit timestamps for packets before the first RTCP packet, too
Emitted timestamps in each stream start from 0, for the first received
RTP packet. Once an RTCP packet is received, that one is used for
sync, emitting timestamps that fit seamlessly into the earlier ones.

Originally committed as revision 26187 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-01 22:27:16 +00:00
Peter Ross
773d892a31 move ff_get_bmp_header under CONFIG_DEMUXERS block
Originally committed as revision 26182 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-01 03:24:10 +00:00
Carl Eugen Hoyos
f6bf6e511d Set blkalign to maximum framesize to allow playback on WMP (see issue 2455 and issue 2446).
Originally committed as revision 26167 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-30 14:21:14 +00:00
Carl Eugen Hoyos
548b97a66a Cosmetics: Re-indent after last commit.
Originally committed as revision 26161 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-29 23:43:25 +00:00
Anssi Hannula
cc6c0c7b52 Do not add the preamble if the DTS stream is already padded, like DTS in
wav. In that case, DTS can be transmitted through S/PDIF without
the IEC 61937 headers.

Patch by Anssi Hannula, anssi d hannula a iki d fi

Originally committed as revision 26160 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-29 23:42:27 +00:00
Anssi Hannula
d8e481bb86 s/IEC958/IEC 61937 - IEC958 is a lower level format.
Patch by Anssi Hannula, anssi d hannula a iki d fi

Originally committed as revision 26141 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-29 18:48:32 +00:00
Anssi Hannula
836132ec43 Fix wrong bitstream mode for AC-3.
Noticed by CrystalP from XBMC.

Patch by Anssi Hannula, anssi d hannula a iki d fi

Originally committed as revision 26130 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-29 16:48:40 +00:00
Anssi Hannula
a4c8e0a82b Improve error return values.
Patch by Anssi Hannula, anssi d hannula a iki d fi

Originally committed as revision 26129 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-29 16:42:14 +00:00
Anssi Hannula
977903521e Always encapsulate DTS in big-endian format, at least some receivers
require that.

Patch by Anssi Hannula, anssi d hannula a iki d fi

Originally committed as revision 26128 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-29 16:34:47 +00:00
Anssi Hannula
e5e932e8b0 Add Anssi and myself to the authors in doxygen.
Patch by Anssi Hannula, anssi d hannula a iki d fi

Originally committed as revision 26127 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-29 16:30:07 +00:00
Peter Ross
3900707866 wtv: parse MPEG2 descriptor events
Originally committed as revision 26126 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-29 13:41:10 +00:00
Peter Ross
cc9038e95c add ff_parse_mpeg2_descriptor; make MPEG2 descriptor parsing routines available to other modules.
Originally committed as revision 26125 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-29 12:45:31 +00:00
Peter Ross
0af1671e53 wtv: only warn about unknown subtype, if it actually unknown
Originally committed as revision 26123 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-29 10:43:16 +00:00
Peter Ross
945df9703b wtv: use correct names for subtitle and language guids
Originally committed as revision 26122 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-29 03:49:02 +00:00
Michael Niedermayer
7cf0472e6a Fix assertion failure due to frames being 0 in mp3 vbr bitrate calculation.
Fixes issue 2442.

Originally committed as revision 26121 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-29 01:33:36 +00:00
Anton Khirnov
bb50ed089f ffmetaenc: remove useless initializers
Originally committed as revision 26114 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-28 09:03:38 +00:00
Anton Khirnov
645439c3c3 lavf: rename meta{dec,enc}.c -> ffmeta{dec,enc}.c
Originally committed as revision 26113 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-28 09:03:33 +00:00
Martin Storsjö
9e99f84f7d rtsp: Check if the rtp stream actually has an RTPDemuxContext
For example MS-RTSP doesn't have RTPDemuxContexts for all streams.

This fixes issue 2448.

Originally committed as revision 26107 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-27 09:56:19 +00:00
Nicolas George
9128ae08b3 Implement av_find_best_stream.
Originally committed as revision 26104 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-27 09:08:20 +00:00
Anton Khirnov
107a7e3e7b lavf: bump minor and add APIchanges entry after adding AVFMT_NOSTREAMS
Originally committed as revision 26103 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-27 07:46:57 +00:00
Anton Khirnov
fd5b124d74 Metadata demuxer.
Originally committed as revision 26102 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-27 07:46:53 +00:00
Anton Khirnov
a46515115c Metadata muxer
Dumps all metadata to a text file for easy manual editing.

Originally committed as revision 26101 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-27 07:46:49 +00:00
Anton Khirnov
bb62d5c1f0 Allow output formats without any streams.
Required for future metadata format.

Originally committed as revision 26100 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-27 07:46:44 +00:00
Peter Ross
a187c68678 Bump libavformat minor version, forgotten in r26094
Originally committed as revision 26095 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-26 05:48:38 +00:00
Peter Ross
82ca054a63 Windows Televison (WTV) demuxer
Originally committed as revision 26094 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-26 01:28:25 +00:00
Peter Ross
a750050f4c make guid utility function visibile to other modules (ff_guidcmp, ff_get_guid)
Originally committed as revision 26093 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-26 01:26:29 +00:00
Peter Ross
141de5a9c1 add ff_find_stream_index
Originally committed as revision 26092 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-26 01:24:51 +00:00
Peter Ross
456a70aeb8 add ff_get_bmp_header
Originally committed as revision 26091 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-26 01:23:44 +00:00
Michael Niedermayer
58ec7e00db Clarify AVFMT_TS_DISCONT and muxers.
Originally committed as revision 26089 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-25 19:49:15 +00:00
Martin Storsjö
8c579c1c60 rtsp: Require the transport reply from the server to match the request
This fixes a crash if we requested TCP interleaved transport, but the
server replies with transport data for UDP. According to the RFC, the
server isn't allowed to respond with another transport type than the
one requested.

Originally committed as revision 26077 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-23 15:05:24 +00:00
Martin Storsjö
81c8c18780 Makefile: Fix dependencies of components
This fixes compilation with --disable-everything --enable-<component>,
for all encoders, decoders, muxers, demuxers, parsers, protocols, bsfs,
indevs, outdevs and filters at the moment. (All those that work without
any external dependencies at least.)

Originally committed as revision 26076 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-22 20:00:42 +00:00
Martin Storsjö
1e0957cc6b Add a missing dependency for the WebM muxer
This fixes one of the issues found if building with
--disable-everything --enable-muxer=webm

Originally committed as revision 26066 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-21 09:23:35 +00:00
Martin Storsjö
9b14ec5fae sdp: Add a framesize attribute to H.263 SDP descriptions
While not mentioned in RFC 4629, this is required for H.263 in
3GPP TS 26.234. It is in practice required for playback with
Android stagefright and on Samsung bada phones.

Originally committed as revision 26062 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-20 20:46:40 +00:00
David Czech
9100d4d632 Fix crash if invalid bit-rate was read from file.
Fixes issue 2426.

Patch by David Czech, davidczech510 gmail

Originally committed as revision 26061 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-20 09:58:27 +00:00
Reimar Döffinger
bf09a01981 Change ASF demuxer to return incomplete last packets.
Whether the behaviour for streams using scrambling makes sense
is unclear.

Originally committed as revision 26053 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-18 13:18:52 +00:00
Zhentan Feng
c4e93eeecd Increase buffer size because the header itself can be larger than 8192
(largest size according to spec: 64k). Fixes playback of
mmsh://a1635.v24937.c2493.g.vm.akamaistream.net/7/1635/2493/v0001/premrad.download.akamai.com/2493/premiere_rock_report/Country_Report.wma

Patch by Zhentan Feng <spyfeng gmail com>.

Originally committed as revision 26047 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-17 21:17:40 +00:00
Martin Storsjö
bbd8f5477d rtsp: Don't set the RTP time base from the sample rate if no sample rate is set
This also reverts SVN rev 26016, which incorrectly overwrote the time base
with 90 kHz for all streams, regardless of what was set by the SDP parsing.

The stream that triggered the fix in 26016 still works after this commit.

Originally committed as revision 26022 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-15 21:06:25 +00:00
Luca Barbato
a4a3bade0a Reinstate default time_base for rtp streams
The generic default is 0/0 and that obviously triggers once the value is used.

Originally committed as revision 26016 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-15 17:16:37 +00:00
Thomas Guillem
1aa58c6405 tcp: Check url_interrupt_cb if connect was interrupted by a signal
This makes it possible to abort a blocking connect call.

Patch by Thomas Guillem, thomas dot guillem at gmail

Originally committed as revision 26014 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 23:03:05 +00:00
Justin Ruggles
80575c0e55 Add missing dependency for matroska muxer.
Originally committed as revision 26005 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 17:14:40 +00:00
Reimar Döffinger
4172951ba7 Return an error when get_buffer reads none or only partial data instead
of returning packets with uninitialized data.
Returning partial packets as for other demuxers is problematice due to
packet scrambling and thus is not done.

Originally committed as revision 25931 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-11 21:41:47 +00:00
Reimar Döffinger
3c3ef81b9b Ensure that packets returned from ASF demuxer are properly 0-padded.
Originally committed as revision 25930 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-11 21:39:08 +00:00
Reimar Döffinger
b72daad062 Remove hack in MP3 probe that was meant as a work-around for large
ID3v2 tags which no longer works since ID3v2 handling was moved to
generic code.
In addition, in caused false-positives for all files starting with
one or more 0-bytes.

Originally committed as revision 25929 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-11 21:34:50 +00:00
Anton Khirnov
a152c77f26 id3v2: skip data length indicator
Originally committed as revision 25926 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-10 15:48:56 +00:00
Kostya Shishkov
614e139a11 Don't try to demux WavPack files with >2 channels until we can support them
Originally committed as revision 25919 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-07 18:15:06 +00:00
Martin Storsjö
86b6e387cc rtsp/rtpdec: Set the AVStream time_base directly in rtsp when it is known
This fixes cases where the RTP time base and the sample rate of the stream
differ. Previously, the AVStream time_base was unconditionally set to
the sample rate (which initially was set to one value when parsing the
rtpmap field in the SDP, but later overridden by an a=SampleRate field).

Additionally, this makes the code actually use the stream time base set
in rtpmap for video codecs, instead of hardcoding it to always be 90 kHz.

Originally committed as revision 25908 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-07 13:29:44 +00:00
Martin Storsjö
bb776f3b00 rtsp: Parse RealRTSP sample rate declarations from the SDP
The RTP time base can be different from the actual content sample rate.

Originally committed as revision 25907 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-07 13:28:45 +00:00
Martin Storsjö
2eeefe205f rtpdec: Handle MP3 in RealRTSP
This fixes playback of a RealRTSP/MP3 URL from the RTSP samples on
MultimediaWiki.

Originally committed as revision 25906 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-07 13:28:13 +00:00
Anton Khirnov
407d3d5a3a id3v2: skip encrypted/compressed frames
Originally committed as revision 25903 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-07 07:52:54 +00:00
Anton Khirnov
7a07d158bd id3v2: use a named constant instead of 0x02
Originally committed as revision 25902 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-07 07:52:50 +00:00
Baptiste Coudurier
c6f1e29a15 In mov demuxer, read alac sample from extradata, fix #2406
Originally committed as revision 25901 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-07 01:38:26 +00:00
Martin Storsjö
86042de8a5 rtpdec_h264: Pass NAL type 0 through
According to the spec, this type shouldn't ever be used. Nevertheless,
passing it through enables decoding streams which otherwise aren't
decodeable.

Originally committed as revision 25897 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-06 12:44:09 +00:00
Martin Storsjö
4838cdab21 rtpdec: Skip padding bytes at the end of packets
Originally committed as revision 25896 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-06 12:43:38 +00:00
Martin Storsjö
28b4eb95bc rtpdec_qcelp: Use the depacketizer for static payload types, too
Originally committed as revision 25894 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-05 19:42:14 +00:00
Martin Storsjö
6a7e31a901 rtsp: Look for RTP payload handlers for static payload types, too
Originally committed as revision 25893 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-05 19:41:44 +00:00
Martin Storsjö
003eb64217 rtsp: Factorize code for initializing the rtp payload handler
Originally committed as revision 25892 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-05 19:41:09 +00:00
Martin Storsjö
1e515c4280 rtpdec: Add functions for finding depacketizers by name or payload id
Originally committed as revision 25891 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-05 19:39:50 +00:00
Martin Storsjö
2beb910d79 rtpdec: Allow dynamic payload handlers to handle static payload types, too
Originally committed as revision 25890 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-05 19:38:55 +00:00
Martin Storsjö
35014efcc6 rtpdec: Add a dynamic payload handler for the x-Purevoice format, RFC 2658
This fixes roundup issue 2390.

Originally committed as revision 25889 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-05 19:37:45 +00:00
Martin Storsjö
35b0169484 RTP/VP8: Update the warning about the VP8 payload
The current implementation is incompatible with the latest spec drafts,
this should be communicated clearly to the user.

Originally committed as revision 25887 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-05 11:45:57 +00:00
Aurelien Jacobs
118ccae030 add subtitle codec autodetection
Originally committed as revision 25884 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-04 14:46:13 +00:00
Aurelien Jacobs
5bdbf64cf3 set default subtitle_codec for ass muxer
Originally committed as revision 25870 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-04 00:47:12 +00:00
Aurelien Jacobs
908dc2a0b8 cosmetic: alignment
Originally committed as revision 25869 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-04 00:44:42 +00:00
Aurelien Jacobs
87d69d3232 use designated initializer in ASS (de)muxer
Originally committed as revision 25868 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-04 00:37:53 +00:00
Tomas Härdin
66be80d610 mpegtsenc: Improve PCR generation and output
This fixes PCR drift due to accumulating TS_PACKET_SIZE*8*90000LL/ts->mux_rate each packet, due to rounding errors when mux_rate does not evenly divide 135360000.
This patch also increases the PCR precision to 27 MHz from 90 kHz and takes the location of the PCR data into account (+11 bytes according to the spec).

Originally committed as revision 25864 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-03 13:26:42 +00:00
Stefan Gehrer
77b7c334be skip top-level objects to search for the simple index in ASF files
Originally committed as revision 25863 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-03 07:49:07 +00:00
Anton Khirnov
3694ac240b mpc: read id3v1 tags.
Originally committed as revision 25860 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-02 09:56:15 +00:00
Andrew Wason
3d305fd071 Add FourCC yuvs for rawvideo (PIX_FMT_YUYV422).
Patch by Andrew Wason, rectalogic rectalogic com

Originally committed as revision 25853 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-29 23:15:51 +00:00
Aaron Colwell
365d8e471d Ensure that data_offset is set correctly when there are partial
data packets before the first complete one.
Patch by Aaron Colwell [acolwell chromium org].

Originally committed as revision 25846 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-29 19:02:28 +00:00
Anton Khirnov
82f19afefe Partially revert "Simplify code by using av_metadata_set2()."
This reverts snprintf->av_d2str part of r20840.
With it, track number is exported as a float, which is not
desirable.

Originally committed as revision 25845 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-29 16:38:12 +00:00
Martin Storsjö
4da71f18f6 rtpdec: Remove useless NULL initializations when using designated initializers
Originally committed as revision 25844 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-29 16:04:45 +00:00
Martin Storsjö
fe70a95e1d rtpdec: Change the qdm2, qt and svq3 depacketizers to use designated initializers
Originally committed as revision 25843 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-29 16:04:04 +00:00
Baptiste Coudurier
74f726209f In ts demuxer, if pes packet size is < ts packet, honor pes packet and skip padded data.
Fixes issue #2392.

Originally committed as revision 25841 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-29 03:43:56 +00:00
Martin Storsjö
0b6a7ff4b4 rtsp: Do a forgotten reindenting
Originally committed as revision 25839 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-28 21:17:39 +00:00