Commit Graph

6885 Commits

Author SHA1 Message Date
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