# programs
avconv_deps="avcodec avformat swscale"
-avplay_deps="avcodec avformat swscale sdl"
-avplay_select="rdft"
-avprobe_deps="avcodec avformat"
-avserver_deps="avformat ffm_muxer fork rtp_protocol rtsp_demuxer !shared"
-avserver_extralibs='$ldl'
-ffmpeg_deps="avcodec avformat swscale"
+ffplay_deps="avcodec avformat swscale sdl"
+ffplay_select="buffersink_filter rdft"
+ffprobe_deps="avcodec avformat"
- ffserver_deps="avformat ffm_muxer fork rtp_protocol rtsp_demuxer"
++ffserver_deps="avformat ffm_muxer fork rtp_protocol rtsp_demuxer !shared"
+ffserver_extralibs='$ldl'
+ffmpeg_deps="avcodec avformat swscale swresample"
+ffmpeg_select="buffersink_filter"
doc_deps="texi2html"
/*
* HACK to avoid mpeg ps muxer to spit many underflow errors
- * Default value from Libav
+ * Default value from FFmpeg
* Try to set it use configuration option
*/
- c->fmt_ctx.preload = (int)(0.5*AV_TIME_BASE);
c->fmt_ctx.max_delay = (int)(0.7*AV_TIME_BASE);
if (avformat_write_header(&c->fmt_ctx, NULL) < 0) {
static int mxf_read_partition_pack(void *arg, AVIOContext *pb, int tag, int size, UID uid, int64_t klv_offset)
{
MXFContext *mxf = arg;
- MXFPartition *partition;
+ MXFPartition *partition, *tmp_part;
UID op;
uint64_t footer_partition;
+ uint32_t nb_essence_containers;
if (mxf->partitions_count+1 >= UINT_MAX / sizeof(*mxf->partitions))
return AVERROR(ENOMEM);
if (mxf->metadata_sets[i]->type == IndexTableSegment)
nb_segments++;
- *sorted_segments = av_mallocz(nb_segments * sizeof(**sorted_segments));
- unsorted_segments = av_mallocz(nb_segments * sizeof(*unsorted_segments));
- if (!sorted_segments || !unsorted_segments) {
+ if (!(unsorted_segments = av_calloc(nb_segments, sizeof(*unsorted_segments))) ||
+ !(*sorted_segments = av_calloc(nb_segments, sizeof(**sorted_segments)))) {
+ av_freep(sorted_segments);
av_free(unsorted_segments);
return AVERROR(ENOMEM);
}
/* default timeout: 1 minute */
rt->timeout = 60;
-- /* for each stream, make the setup request */
-- /* XXX: we assume the same server is used for the control of each
-- * RTSP stream */
- port_off = av_get_random_seed() % (RTSP_RTP_PORT_MAX - RTSP_RTP_PORT_MIN);
-
+ /* Choose a random starting offset within the first half of the
+ * port range, to allow for a number of ports to try even if the offset
+ * happens to be at the end of the random range. */
+ port_off = av_get_random_seed() % ((rt->rtp_port_max - rt->rtp_port_min)/2);
/* even random offset */
port_off -= port_off & 0x01;