Commit Graph

16540 Commits

Author SHA1 Message Date
Martin Storsjö
adc214e679 rtpenc: Avoid brittle switch fallthroughs
Instead explicitly jump to the default case in the cases where
it is wanted, and avoid fallthrough between different codecs,
which could easily introduce bugs if people editing the code
aren't careful.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-12-18 23:11:37 +02:00
Michael Niedermayer
5d97af0cb2 Merge commit 'df07c07b3de0a5e8890078944de1eb5cb8372ef8'
* commit 'df07c07b3de0a5e8890078944de1eb5cb8372ef8':
  rtpdec_h263_rfc2190: Clear the stored bits if discarding buffered data

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-18 20:40:39 +01:00
Michael Niedermayer
7c0ab0a3b8 Merge commit '42181740a3972e17d0097d28fabc9a1a60322d47'
* commit '42181740a3972e17d0097d28fabc9a1a60322d47':
  rtpenc: Set the AVFMT_TS_NONSTRICT flag

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-18 20:30:12 +01:00
Michael Niedermayer
c0586b257d Merge commit '01f251c44d83eedc819625d2caac9ff9697a085d'
* commit '01f251c44d83eedc819625d2caac9ff9697a085d':
  rtpenc: Set the timestamp properly when sending mpegts data, too

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-18 20:22:47 +01:00
Michael Niedermayer
4d5ca069c7 Merge commit 'f2c614e8c4a935b52bbf86819128d9e797230c20'
* commit 'f2c614e8c4a935b52bbf86819128d9e797230c20':
  srtpproto: fix option flag type

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-18 19:59:03 +01:00
Martin Storsjö
df07c07b3d rtpdec_h263_rfc2190: Clear the stored bits if discarding buffered data
If we throw away the buffered incomplete frame, make sure to also
throw away the buffered bits of an incomplete byte at the same
time.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-12-18 11:59:54 +02:00
Martin Storsjö
42181740a3 rtpenc: Set the AVFMT_TS_NONSTRICT flag
In particular, when packetizing mpegts into rtp, the input packet
timestamp may come from more than one stream, which could cause
multiple packets be written with the same timestamp.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-12-18 11:59:19 +02:00
Martin Storsjö
01f251c44d rtpenc: Set the timestamp properly when sending mpegts data, too
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-12-18 11:59:12 +02:00
Tristan Matthews
f2c614e8c4 srtpproto: fix option flag type
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-12-18 11:58:23 +02:00
Thomas Volkert
00d7555f34 wavdec: RIFX file format support
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-18 00:10:35 +01:00
Michael Niedermayer
973684a4fb Merge commit '456e93bfdd4cbc5e995dea415019abd0703d0e16'
* commit '456e93bfdd4cbc5e995dea415019abd0703d0e16':
  dashenc: Adjust the start time of a segment to the end of the previous segment

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-17 12:05:00 +01:00
Michael Niedermayer
b32cb08b7f Merge commit '2f628d5943c12389c07d652d23d3916997f9f0f6'
* commit '2f628d5943c12389c07d652d23d3916997f9f0f6':
  dashenc: Write segment timelines properly if the timeline has gaps

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-17 11:57:09 +01:00
Martin Storsjö
456e93bfdd dashenc: Adjust the start time of a segment to the end of the previous segment
This is the same adjustment that the mp4 muxer does to the start
timestamp of fragments, since the timestamp of a sample in an mp4
file is implicit from the sum of earlier sample durations.

This avoids gaps in the timeline (which can stop dash.js from
playing it back), and makes sure the timestamp on the segmenter
level matches what the mp4 muxer actually writes into the segments.

This is only an issue if the AVPacket duration of the last
packet of a segment doesn't point to the actual start timestamp
of the next packet (the first in the next segment).

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-12-17 09:43:08 +02:00
Martin Storsjö
2f628d5943 dashenc: Write segment timelines properly if the timeline has gaps
Write a new start time if the duration of the previous segment
didn't match the start of the next one. Check that segments
actually are continuous before writing a repeat count.

This makes sure timestamps deduced from the timeline actually
match the real start timestamp as written in filenames (if
using a template containing $Time$).

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-12-17 09:42:30 +02:00
Michael Niedermayer
be9ce6e10a avformat/mov: fix integer overflow of size
Fixes: case1_call_stack_overflow.mp4
Found-by: Michal Zalewski <lcamtuf@coredump.cx>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-16 23:37:25 +01:00
Michael Niedermayer
caa7a3914f avformat/mov: check atom nesting depth
Fixes call stack overflow
Fixes: case1_call_stack_overflow.mp4
Found-by: Michal Zalewski <lcamtuf@coredump.cx>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-16 23:37:24 +01:00
Michael Niedermayer
b8eb8b0310 avformat/hlsenc: Use av_freep() to avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-16 15:37:04 +01:00
Michael Niedermayer
91ea466551 avformat/flvdec: Use av_freep() avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-16 15:37:04 +01:00
Michael Niedermayer
16d763fa45 avformat/hdsenc: Use av_freep() avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-16 15:37:04 +01:00
Christian Suloway
92a596f13b avformat/hlsenc: fix hls_write_trailer() on hls_start() failure
Close segment I/O context and append segment in hls_write_trailer() only
when segment I/O context is allocated.

Signed-off-by: Christian Suloway <csuloway@globaleagleent.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-16 03:57:58 +01:00
Michael Niedermayer
1a86e29ff0 Merge commit '6f4364aba9d70dc5fd9f1c88b9c03bf9ea893d40'
* commit '6f4364aba9d70dc5fd9f1c88b9c03bf9ea893d40':
  mov: Fix handling of zero-length metadata values

Conflicts:
	libavformat/mov.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-16 02:23:43 +01:00
Martin Storsjö
6f4364aba9 mov: Fix handling of zero-length metadata values
Since 3cec81f4d4, a zero-length metadata value would try to
allocate 2*0 bytes, where av_malloc() returns NULL.

Always add one to the allocated length, to allow space for
a null terminator in the zero-length case.

Incidentally, this fixes fate-alac on RVCT 4.0, where a compiler
bug seems to mess up the mov muxer to the point that it writes
the wrong sort of metadata. Previously this bug was undetected,
but since 3cec81f4d4 such mov files started returning
AVERROR(ENOMEM) in the mov demuxer.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-12-15 23:42:10 +02:00
Nicolas George
acbc2ed26a lavf/concatdec: handle NOPTS start_time.
Fix trac ticket #3598.

Signed-off-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-15 20:00:35 +01:00
Michael Niedermayer
ae658efef8 avformat/xmv: Check return code of ff_alloc_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-15 16:01:05 +01:00
Michael Niedermayer
480cd822b3 avformat/flic: se av_freep() to avoid leaving stale extradata pointer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-15 15:49:00 +01:00
Michael Niedermayer
0051e3c233 avformat/rtpdec_mpeg4: Use av_freep() to avoid leaving stale extradata pointer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-15 15:48:35 +01:00
Michael Niedermayer
c116befc92 avformat/xmv: use av_freep() to avoid leaving stale extradata pointer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-15 15:47:54 +01:00
Xiaohan Wang
490a3ebf36 matroskadec: Fix read-after-free in matroska_read_seek()
In matroska_read_seek(), |tracks| is assigned at the begining of the
function. However, functions like matroska_parse_cues() could reallocate
the tracks and invalidate |tracks|.

This assigns |tracks| only before using it, so that it will not get
invalidated elsewhere.

Bug-Id: chromium/427266
2014-12-15 15:46:34 +01:00
Michael Niedermayer
89f0feadc2 avformat/assenc: Use av_freep() to avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-15 15:43:42 +01:00
Michael Niedermayer
51b193214d avformat/avidec: Use av_freep() to avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-15 15:43:14 +01:00
Carl Eugen Hoyos
4373a25d94 lavf/mxfdec: Fix memleaks reading corrupt files.
Fixes ticket #4173.

Reviewed-by: Tomas Härdin
2014-12-15 01:37:12 +01:00
Carl Eugen Hoyos
27bdfd29f1 lavf/mxfdec: Factorize mxf_read_close().
This will allow to fix leaks in a subsequent commit.
2014-12-15 01:31:12 +01:00
Michael Niedermayer
4efdb29c75 avformat/dv: Use av_freep() to avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-15 00:38:05 +01:00
Michael Niedermayer
a29524bf2e avformat/utils: Do not update programs streams from program-less streams in update_wrap_reference()
Fixes Ticket3686

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-14 20:56:59 +01:00
Michael Niedermayer
8ddfc00ab7 avformat/mp3dec: Name the dummy variable as what it is, to avoid confusion
Found-by: nattyzs <nattyzs@163.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-14 20:08:13 +01:00
Michael Niedermayer
ed86dbd05d avformat/aviobuf: Check that avio_seek() target is non negative
Fixes out of array access

Suggested-by: Andrew Scherkus <scherkus@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-14 17:39:53 +01:00
Michael Niedermayer
ad2deb02e5 avcodec/xiph: mark returned header pointers const from avpriv_split_xiph_headers()
Reviewed-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-14 14:30:45 +01:00
Michael Niedermayer
3b537eab27 avformat/nutenc: store the actual r_frame_rate in the corresponding field if available
Fixes Ticket 3629 part3

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-14 02:12:49 +01:00
Michael Niedermayer
add46edf33 avformat/utils: use r_frame_rate only in the demuxer for ff_compute_frame_duration()
This is primarly to maintain current behavior when r_frame_rate is set for muxers
and could be reverted if it has some advantage

Fixes Ticket3629 part1

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-14 02:12:49 +01:00
Michael Niedermayer
d5a263f480 fix "than" typo
Found-by reimar
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-13 20:52:31 +01:00
Michael Niedermayer
53496aa7f3 avformat/utils: Do not estimate the container bitrate from the streams if one video stream lacks the bitrate
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-13 19:20:10 +01:00
Michael Niedermayer
d7de48f0df avformat/mov: Simplify code by using OFFSET() and FLAGS macros
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-13 15:06:19 +01:00
wm4
a66893ac94 avformat/utils: check for malloc failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-12 23:37:29 +01:00
Michael Niedermayer
e2829a8175 avformat/mov: Disable XMP metadata by default
This was suggested by cbsrobot, ubitux and koda

There are files with huge amounts of XMP data, which would otherwise
be displayed in the terminal output of FFmpeg

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-11 21:47:37 +01:00
Gabor Nagy
28fc31d78d avformat/avidec: Do not fail for crazy start times
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-11 14:59:10 +01:00
Michael Niedermayer
7ee5f764ee Merge commit 'e737a4aaafcb1d761b7f96043c2f83ce742c64ae'
* commit 'e737a4aaafcb1d761b7f96043c2f83ce742c64ae':
  dashenc: Change the duration fields to 64 bit

Conflicts:
	libavformat/dashenc.c

See: e65849a70b
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-11 02:03:47 +01:00
Christian Suloway
97b65f6126 avformat/hlsenc: added segment file deletion
This option flag deletes segment files removed from the playlist after a
period of time equal to the duration of the segment plus the duration of
the playlist.

Signed-off-by: Christian Suloway <csuloway@globaleagleent.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-10 23:49:25 +01:00
Martin Storsjö
e737a4aaaf dashenc: Change the duration fields to 64 bit
For the last_duration field, it's mostly theoretical, but the
total_duration field more probably may need to actually be 64 bit.

Bug-Id: CID 1254944
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-12-10 22:51:51 +02:00
Michael Niedermayer
52a17972de avformat/yuv4mpegdec: fix "warning: field_order may be used uninitialized in this function"
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-10 14:46:39 +01:00
Michael Niedermayer
0fadbd3623 avformat/flvdec: fix potential use of uninitialized variables
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-10 13:40:20 +01:00
Gabor Nagy
ae8168074e avformat/avidec: Increase dshow_block_align use threshold by 1
Fixes 00.avi

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-10 03:18:30 +01:00
Michael Niedermayer
1397cb002d Merge commit 'fa8934d6d6a0bb290010bdf16265c40b331d56fb'
* commit 'fa8934d6d6a0bb290010bdf16265c40b331d56fb':
  dashenc: log file output progress in verbose mode

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-10 01:24:56 +01:00
Michael Niedermayer
bd378acad4 Merge commit '95d880fa6436f3b557a9c060428a04b9e4d552df'
* commit '95d880fa6436f3b557a9c060428a04b9e4d552df':
  rtpproto: Fix the input RTP data format check

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-10 01:24:12 +01:00
Bryan Huh
fa8934d6d6 dashenc: log file output progress in verbose mode
As the manifest/segments are flushed to disk, log to stderr the
progress, when in verbose logging mode

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-12-10 00:03:16 +02:00
Martin Storsjö
95d880fa64 rtpproto: Fix the input RTP data format check
Only the upper 2 bits of the first byte are known to be
a fixed value.

The lower bits in the first byte of a RTP packet could be set
if the input is from another RTP packetizers than libavformat's,
but for RTCP packets, they would also be set when sending RTCP RR
packets, triggering false warnings about incorrect input format
to the protocol.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-12-09 23:59:14 +02:00
Carl Eugen Hoyos
01ab761b46 Allow mov musing if the ac3 parser was disabled.
This reverts 8091fe30.
Reported and tested by Takashi, ffmpeg-list dubistmeinheld de
2014-12-09 22:12:53 +01:00
Michael Niedermayer
6ef9d1b216 Merge commit 'fccfc22d1f304aef42a0b960e4c1d55ce67107f5'
* commit 'fccfc22d1f304aef42a0b960e4c1d55ce67107f5':
  libavformat: Build hevc.o when building the RTP muxer

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-09 21:40:09 +01:00
Michael Niedermayer
2d0117f816 avformat/crypto: fix key vs iv typo
Fixes Ticket 4167

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-09 19:58:56 +01:00
Michael Niedermayer
20cb3fab3f avformat/utils: change assert to av_assert0()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-09 17:57:35 +01:00
Michael Niedermayer
041c6109da avformat/utils: replace impossible condition by av_assert0() in ff_gen_search()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-09 17:53:30 +01:00
Michael Niedermayer
308429e124 avformat/wavenc: check return value of strftime()
Fixes CID1257006

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-09 16:15:40 +01:00
Martin Storsjö
fccfc22d1f libavformat: Build hevc.o when building the RTP muxer
The RTP muxer enables the actual codepaths within sdp.c,
which depend on hevc.o since e5cfc8fd.

This fixes builds with --disable-everything --enable-muxer=rtp.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-12-09 16:09:37 +02:00
Michael Niedermayer
99bf26fc6b Merge commit '3c01039e0bc7d269900e15551f8171c4328a0223'
* commit '3c01039e0bc7d269900e15551f8171c4328a0223':
  mov: further expand the list of parsed metadata tags

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-09 11:50:48 +01:00
Michael Niedermayer
a5e5959d52 avformat/utils: fix calculating the absolute difference of timestamps
we dont use FFABS(a-b) as that could result in undefined behavior if it overflows

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-09 06:13:32 +01:00
Michael Niedermayer
dd70470d72 avformat/utils: Compute the current pts of mpeg1/2 I/P frames from the next frame when available
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-09 03:34:20 +01:00
Michael Niedermayer
9e561410c0 avformat/utils: Pass the next pts/dts to compute_pkt_fields() when available
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-09 03:33:44 +01:00
Michael Niedermayer
885e74622e Merge commit 'e2e07dbaab1f17e995842b7eacec4665d44c3d14'
* commit 'e2e07dbaab1f17e995842b7eacec4665d44c3d14':
  mov: expand the list of parsed metadata tags

Conflicts:
	libavformat/mov.c

See: 543f3db978
See: dadf668df2
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-08 23:16:43 +01:00
Michael Niedermayer
0dcebe2620 Merge commit 'b704b648f9ecb830874627db958a37e004107d1b'
* commit 'b704b648f9ecb830874627db958a37e004107d1b':
  mov: parse XMP metadata on demand

Conflicts:
	libavformat/isom.h
	libavformat/version.h

See: 054c506e3d

The default is left unchanged at enabled
We can change the default if people prefer but i do not want to do that
in a merge.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-08 22:59:16 +01:00
Michael Niedermayer
420aebf0c5 Merge commit '174c5fde90060faab67796a5eaef742630f1db6e'
* commit '174c5fde90060faab67796a5eaef742630f1db6e':
  mov: parse @PRM and @PRQ metadata tags

Conflicts:
	libavformat/mov.c

See: f540851ce3
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-08 22:14:29 +01:00
Michael Niedermayer
82f0f0482e Merge commit '35384934d6e27e0334060a23a0c83a3cb5cef198'
* commit '35384934d6e27e0334060a23a0c83a3cb5cef198':
  mov: cosmetics: reorder the list of tags

Conflicts:
	libavformat/mov.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-08 21:59:08 +01:00
Dave Rice
3c01039e0b mov: further expand the list of parsed metadata tags
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-12-08 14:28:16 +00:00
Vittorio Giovara
e2e07dbaab mov: expand the list of parsed metadata tags
Based on L-Smash code by Yusuke Nakamura <muken.the.vfrmaniac@gmail.com>.
2014-12-08 14:28:09 +00:00
Vittorio Giovara
b704b648f9 mov: parse XMP metadata on demand
The Extensible Metadata Platform tag can contain various kind of data
which are not strictly related to the video file, such as history of edits
and saves from the project file. So display XMP metadata only when the
user explicitly requires it.

Based on a patch by Marek Fort <marek.fort@chyronhego.com>.
2014-12-08 13:53:30 +00:00
Vittorio Giovara
174c5fde90 mov: parse @PRM and @PRQ metadata tags
These tags describe the product and quicktime library version respectively.
They originate from Adobe Premiere, but also some other programs use them.
Contrary to other tags, they contain 'raw' data which is not to be
interpreted as iso639 or mac strings.

Based on a patch by Peter Ross <pross@xvid.org>.
2014-12-08 13:53:20 +00:00
Vittorio Giovara
35384934d6 mov: cosmetics: reorder the list of tags
Alphabetically order the list by the tag to facilitate the insertion of
new ones.
2014-12-08 13:53:10 +00:00
Joakim Plate
90411b333d Allow reading of growing avi files (currently being written)
This uses the RIFF header stored size to figure out the expected AVI
file size, instead of the actual file. To work fully it requires handling
failed avio_seek() instead of assuming they always succeed.

Some fate file has been cut off and contains half a frame at the end which
previously was not output during demuxing. This frame is now output to
encoder, thus the fate diff update.

Bug-Id: 261
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-12-08 13:29:33 +00:00
Carl Eugen Hoyos
250e077ee9 riff: Support decoding png in avi (ImageJ) 2014-12-08 13:29:18 +00:00
Michael Niedermayer
5ab467043a Merge commit '29bc7bfba288ff8572ed967a8752a1dbde7b724b'
* commit '29bc7bfba288ff8572ed967a8752a1dbde7b724b':
  rtpproto: Write a warning if the input data written isn't RTP packetized

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-08 12:15:44 +01:00
Martin Storsjö
29bc7bfba2 rtpproto: Write a warning if the input data written isn't RTP packetized
Tell the user that the RTP muxer needs to be used to packetize
the data - using the RTP protocol on its own isn't enough.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-12-08 11:59:12 +02:00
Rens Dijkshoorn
dceb8b1252 avformat/movenc: Add 2048x1080 to the aivx case
This improves compatibility of such files with apple tools

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-08 04:26:16 +01:00
Michael Niedermayer
72c984432e avformat/matroskadec: request a sample with recursive seek heads
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-07 22:45:34 +01:00
wm4
6551acab68 avformat/matroskadec: fix handling of recursive SeekHead elements
When matroska_execute_seekhead() is called, it goes through the list of
seekhead entries and attempts to read elements not read yet. When doing
this, the parser can find further SeekHead elements, and will extend the
matroska->seekhead list. This can lead to a (practically) infinite loop
with certain broken files. (Maybe it can happen even with valid files.
The demuxer doesn't seem to check correctly whether an element has
already been read.)

Fix this by ignoring elements that were added to the seekhead field
during executing seekhead entries.

This does not fix the possible situation when multiple SeekHead elements
after the file header (i.e. occur after the "before_pos" file position)
point to the same elements. These elements will probably be parsed
multiple times, likely leading to bugs.

Fixes ticket #4162.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-07 22:30:56 +01:00
Luca Barbato
4fd7e63c87 mp3: Tweak the probe scores
Having more than 10 consecutive frames decoded as mp3 should be
considered a clear signal that the sample is mp3 and not mpegps.

Reported-By: Florian Iragne <florian@iragne.fr>
CC: libav-stable@libav.org
2014-12-07 21:50:47 +01:00
Michael Niedermayer
e65849a70b avformat/dashenc: make durations 64bit
Fix potential integer overflow
Fix CID1254944

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-07 20:07:26 +01:00
Luca Barbato
4f5906a1d7 latm: Do not give a score for a single instance
Bug-Id: 773
CC: libav-stable@libav.org
2014-12-07 13:15:03 +01:00
Michael Niedermayer
74080ded96 avformat/mpeg: add commented out av_log() to probe
This is commonly needed for debugging mis-detections

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-06 22:38:38 +01:00
Michael Niedermayer
e15b29bb18 avformat/mpeg: do not count PES packets inside PES packets during probing
Fixes: misdetection of test2.mp3

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-06 22:34:10 +01:00
Michael Niedermayer
a4f387bf56 avformat/mpegts: Warn if ffio_ensure_seekback() failed
Should silence CID1257005

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-06 20:37:16 +01:00
Michael Niedermayer
c149f67e9b avformat/apetag: More completely check avio_get_str() return value
This is not needed but its more proper to check the return value

Fixes CID1041122

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-06 17:12:49 +01:00
Christian Suloway
1c639fa6e0 avformat/hlsenc: added segment filename option
This option allows segment filenames to be specified. Unless -hls_flags
single_file is set the filename is used as a string format with the
segment number.

Example:
ffmpeg -f lavfi -i testsrc -c:v h264 -map 0 -hls_segment_filename
bar%03d.ts foo.m3u8

Signed-off-by: Christian Suloway <csuloway@globaleagleent.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-06 02:28:23 +01:00
Michael Niedermayer
03abf55f25 avformat/rmdec: Check for overflow in ff_rm_read_mdpr_codecdata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-06 00:49:23 +01:00
Michael Niedermayer
50f9de59a0 avformat/rmdec: rm_read_extradata: add error message for oversized extradata
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-06 00:49:20 +01:00
Michael Niedermayer
ef2f9073dd Merge commit '1c77ead1fb14d64e6798fc5e32af04abcb3cebb4'
* commit '1c77ead1fb14d64e6798fc5e32af04abcb3cebb4':
  rm: Use the correct codec_data_size signedness

Conflicts:
	libavformat/rm.h
	libavformat/rmdec.c

See: a6f730730b
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-06 00:48:47 +01:00
Rafaël Carré
57bfafe76b avformat/mpegts: fix Opus stream count
That number represents the number of streams, not the number of channels

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-05 16:00:11 +01:00
Matthieu Bouron
8c0a865ad9 mov: skip version and flags attributes in mov_read_chan()
Fixes decting channel layout for files with uncommon audio, such as
FL and FR in two separate streams. Introduced in 3bab7cd.

CC: libav-devel@libav.org
Sample-Id: ticket1474.mov
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-12-05 13:03:49 +00:00
Mark Reid
4f69477870 libavformat/mxfdec.c refactor resolving MultiDescriptor and remove essence group hack
I think this is a better way to deal with single frame essence data then my
previous way.

Reviewed-by: Tomas Härdin <tomas.hardin@codemill.se>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-04 23:31:37 +01:00
Steve Jiekak
a32c3c2392 replaced av_dv_codec_profile by av_dv_codec_profile2 in encoder and dv muxers
Signed-off-by: Steve Jiekak <devaureshy@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-04 20:24:00 +01:00
Luca Barbato
1c77ead1fb rm: Use the correct codec_data_size signedness
The function takes a size and not an offset.

CC: libav-stable@libav.org
Sample-Id: rm_deadlock.rm

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-12-04 13:14:28 +00:00
Carl Eugen Hoyos
963aa1daf8 Fix standalone compilation of the iec61883 input device. 2014-12-04 01:35:47 +01:00
Lukasz Marek
650aa36f35 lavf/oggenc: use meaningful error codes
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-12-03 22:20:22 +01:00
Michael Niedermayer
a6f730730b avformat/rmdec: Check codec_data_size
Fixes infinite loop
Fixes Ticket4154

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-03 20:01:18 +01:00
Michael Niedermayer
eac5c7b837 avformat/aviobuf: Fix infinite loop in ff_get_line()
Fixes ticket4152

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-03 19:05:56 +01:00
Luca Barbato
69c1fe7c9c mkv: Validate ASS Start and End fields
CC: libav-stable@libav.org
2014-12-03 13:08:41 +00:00
Carl Eugen Hoyos
7a4be4315f Support muxing 4k AVC Intra in mov.
Reported and tested by Rens Dijkshoorn, rens onlinemedia nl
2014-12-02 23:35:40 +01:00
Michael Niedermayer
d76adfae9c Merge commit '8f8caca2242e1fe05f37493cfabcd3f4de198550'
* commit '8f8caca2242e1fe05f37493cfabcd3f4de198550':
  Add support for BDAV/m2ts-mode muxing

Conflicts:
	libavformat/mpegtsenc.c

See: 09a858da7d
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-02 22:42:35 +01:00
Michael Niedermayer
02444f02f1 Merge commit '3cec81f4d4f26b62bc2d22bb450bbf51ec3a7f09'
* commit '3cec81f4d4f26b62bc2d22bb450bbf51ec3a7f09':
  mov: allocate the tag value dynamically

Conflicts:
	libavformat/mov.c

See: f31445a82d
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-02 22:26:40 +01:00
Michael Niedermayer
781a5a392c Merge commit 'e352b293712ff7cbde67eba3ce3f8510b037de09'
* commit 'e352b293712ff7cbde67eba3ce3f8510b037de09':
  mov: Add an option for exporting all metadata

Conflicts:
	libavformat/isom.h
	libavformat/mov.c
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-02 22:13:20 +01:00
Michael Niedermayer
d0b0fe6691 Merge commit '5639ed9abb58311f82cf3499b682d228290adb09'
* commit '5639ed9abb58311f82cf3499b682d228290adb09':
  mov: do not truncate the language-prefixed tag

Conflicts:
	libavformat/mov.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-02 21:45:44 +01:00
Michael Niedermayer
1537d0b432 Merge commit '604c9b1196c70d79bbbc1f23e75f6a8253a74da3'
* commit '604c9b1196c70d79bbbc1f23e75f6a8253a74da3':
  rtsp: move the CONFIG_ macros to the beginning of the check

Conflicts:
	libavformat/rtsp.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-02 21:39:05 +01:00
Florent Le Coz
2e0935965b Drop the unofficial extension prefix for MPEG and MPEG-TS formats
As per the RFCs:
http://tools.ietf.org/html/rfc3555#page-38
http://tools.ietf.org/html/rfc3003

CC: libav-stable@libav.org
2014-12-02 15:28:22 +00:00
Fredrik Axelsson
8f8caca224 Add support for BDAV/m2ts-mode muxing
Signed-off-by: Fredrik Axelsson <fraxbe@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-02 15:28:22 +00:00
Thilo Borgmann
3cec81f4d4 mov: allocate the tag value dynamically
This allows to load metadata entries longer than 1024 bytes.
Displaying them is still limited to 1024 characters, but applications
can load them fully now.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-12-02 15:28:22 +00:00
Vittorio Giovara
e352b29371 mov: Add an option for exporting all metadata 2014-12-02 15:28:22 +00:00
Vittorio Giovara
5639ed9abb mov: do not truncate the language-prefixed tag 2014-12-02 15:28:22 +00:00
Vittorio Giovara
604c9b1196 rtsp: move the CONFIG_ macros to the beginning of the check
With --disable-optimizations, the DCE of some compilers does not remove
such unused code, causing linking failure.
2014-12-02 15:28:22 +00:00
Jean-Baptiste Mardelle
7319a47c7e mpegtsenc: recognize .mts as MPEG Transport Stream 2014-12-02 15:28:22 +00:00
Benoit Fouet
d7716961a8 avformat/apngdec: exit probing when skipping is not possible.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-02 16:02:01 +01:00
Benoit Fouet
543fceba9c apng: move shared header from avformat to avcodec.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-02 15:52:31 +01:00
Carl Eugen Hoyos
f151f5415a lavf/qcp: Print unknown GUID on error. 2014-12-02 11:40:01 +01:00
Carl Eugen Hoyos
7f6515e491 Also print GUIDs as shown in the Windows registry to ease debugging. 2014-12-02 11:39:06 +01:00
Michael Niedermayer
24e7e0237b avformat/crypto: Use av_memdup()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-02 02:01:11 +01:00
Christian Suloway
00d4013d9f avformat/crypto: added encryption
Signed-off-by: Christian Suloway <csuloway@globaleagleent.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-02 01:46:10 +01:00
Michael Niedermayer
24fdf7334d avformat/utils: Search harder for missing stream information in flv by default
Fixes Ticket4133

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-01 15:49:32 +01:00
Andreas Cadhalpun
b28652599d doc: fix spelling errors
succesfully => successfully, reproducable => reproducible, specifiying => specifying, isnt => isn't, seperated => separated

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-01 00:31:06 +01:00
Michael Niedermayer
8653419e9d avformat/mxfdec: Reset structural_components_count when allocation fails
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-30 23:25:19 +01:00
Mark Reid
e5d217f048 libavformat/mxfdec.c: initial support for EssenceGroups
Previous version reviewed-by: Tomas Härdin <tomas.hardin@codemill.se>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-30 23:14:06 +01:00
Michael Niedermayer
e74f2be1ed avformat/riffdec: ask for samples with wav header size < 14
Based on commit by Hendrik Leppkes <h.leppkes@gmail.com>

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-30 01:55:36 +01:00
Michael Niedermayer
27897d2ef6 Merge commit '491805636cef50d3f582bd345e1460eeb739ea48'
* commit '491805636cef50d3f582bd345e1460eeb739ea48':
  rtmpproto: Fix a typo in a comment

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-28 22:01:45 +01:00
Martin Storsjö
491805636c rtmpproto: Fix a typo in a comment
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-11-28 20:56:45 +02:00
Michael Niedermayer
f001a2bd34 Merge commit 'fcae9f212a6001d966c52dc22cd4b22e9851b428'
* commit 'fcae9f212a6001d966c52dc22cd4b22e9851b428':
  dashenc: Avoid a VLA-like construct

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-28 12:52:13 +01:00
Michael Niedermayer
5ce070c16c Merge commit 'a9d8d35e4833fc4dfbf557ce73c84e9ca6224427'
* commit 'a9d8d35e4833fc4dfbf557ce73c84e9ca6224427':
  dashenc: Add options to make segment names configurable

Conflicts:
	libavformat/dashenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-28 12:50:38 +01:00
Michael Niedermayer
21ff626ce0 Merge commit '01eac895ab350027467ffbe7278740f89ae8be75'
* commit '01eac895ab350027467ffbe7278740f89ae8be75':
  rtmpproto: Only prepend @setDataFrame for onMetaData and |RtmpSampleAccess

Conflicts:
	libavformat/rtmpproto.c

See: 60fd790f38
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-28 12:31:59 +01:00
Michael Niedermayer
900fff89c9 Merge commit '44127b157e9f8acb837d4bb3a094f56b40da3ef5'
* commit '44127b157e9f8acb837d4bb3a094f56b40da3ef5':
  rtmppkt: Make pkt->data reallocable

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-28 12:14:26 +01:00
Michael Niedermayer
42a095d095 Merge commit '3c3b8003a13d9c3668c0bb6d79d2376da3b2b352'
* commit '3c3b8003a13d9c3668c0bb6d79d2376da3b2b352':
  rtmpproto: Simplify code for copying data into the output packet

Conflicts:
	libavformat/rtmpproto.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-28 11:57:33 +01:00
Michael Niedermayer
a105c1f204 Merge commit '857e6667f9061ae261c0b951113e4efc4329b05e'
* commit '857e6667f9061ae261c0b951113e4efc4329b05e':
  rtmpproto: Clarify a comment

Conflicts:
	libavformat/rtmpproto.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-28 11:35:08 +01:00
Martin Storsjö
fcae9f212a dashenc: Avoid a VLA-like construct
This fixes the build on compilers that interpreted the earlier
code as a variable length array (which we intentionally disallow).

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-11-28 11:55:42 +02:00
Bryan Huh
a9d8d35e48 dashenc: Add options to make segment names configurable
This allows one to specify templated segment names for init-segments,
media-segments, and for the base-url in the case of single-file.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-11-28 10:48:15 +02:00
Martin Storsjö
01eac895ab rtmpproto: Only prepend @setDataFrame for onMetaData and |RtmpSampleAccess
Currently, when streaming to an RTMP server, any time a packet of type
RTMP_PT_NOTIFY is encountered, the packet is prepended with @setDataFrame
before it gets sent to the server. This is incorrect; only packets for
onMetaData and |RtmpSampleAccess should invoke @setDataFrame on the RTMP
server. Specifically, the current bug manifests itself when trying to
stream onTextData or onCuePoint invocations.

This fix addresses that problem and ensures that the @setDataFrame is
only prepended for onMetaData and |RtmpSampleAccess.

Since data is fed to the rtmp_write function in smaller pieces (depending
on the calling IO buffer size), we can't generally assume that the
whole packet (or even the whole command string) is available at once,
therefore we can only check the command string once the full packet
has been transferred to us for sending.

Based on a patch by Jeffrey Wescott.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-11-28 09:59:29 +02:00
Martin Storsjö
44127b157e rtmppkt: Make pkt->data reallocable
We try to avoid mixing av_malloc with av_realloc, since av_malloc
may be implemented with functions that can't (formally) be mixed
with the functions used in av_realloc.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-11-28 09:59:28 +02:00
Martin Storsjö
3c3b8003a1 rtmpproto: Simplify code for copying data into the output packet
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-11-28 09:59:27 +02:00
Martin Storsjö
857e6667f9 rtmpproto: Clarify a comment
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-11-28 09:59:25 +02:00
Lukasz Marek
500d608861 lavf/ffmenc: store recommended encoder configuration
ffmenc will store recommended encoder configuration if present.
This will allow the user to base on local defaults and
apply only explicitly set options.

If recommended encoder configuration is not present, then
non-default context's options are stored.

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-11-27 23:19:41 +01:00
Lukasz Marek
568853b8f5 lavf/ffmdec: add common options to recommended encoder configuration
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-11-27 23:19:20 +01:00
Vincent Bernat
d0f8b94b43 avformat/rtpproto: Allow to specify DSCP class
By appending `?dscp=26` to the URL, IP packets will be classified as
AF31 (assured forwarding for multimedia flows with low probability of
loss). On congested network, this allows a user to assign priorities to
flows.

Signed-off-by: Vincent Bernat <vincent@bernat.im>
2014-11-27 19:53:09 +01:00
Vincent Bernat
5269cef408 avformat/udp: Allow to specify DSCP class
By appending `?dscp=26` to the URL, IP packets will be classified as
AF31 (assured forwarding for multimedia flows with low probability of
loss). On congested network, this allows a user to assign priorities to
flows.

Signed-off-by: Vincent Bernat <vincent@bernat.im>
2014-11-27 19:53:09 +01:00
Clément Bœsch
92fa1d9231 avformat/mov: change conjugation for "Duplicate" 2014-11-27 18:13:57 +01:00
Clément Bœsch
5ab882d728 avformat/mov: strengthen some table allocations 2014-11-27 18:12:40 +01:00
Matthew Oliver
0167fa0060 msvc: Fix compilation errors due to header include order.
Ensures that the header include order is such that winsock2.h is always
included before windows.h or that windows.h does not include winsock.h.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-27 12:40:18 +01:00
Michael Niedermayer
4ae1d6021b Merge commit '675ac56b7ee0f204963fde55295197c5df80aa91'
* commit '675ac56b7ee0f204963fde55295197c5df80aa91':
  Revert "lavf: Don't try to update files atomically with renames on windows"

Conflicts:
	libavformat/dashenc.c
	libavformat/hdsenc.c
	libavformat/internal.h
	libavformat/smoothstreamingenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-27 11:52:33 +01:00
Michael Niedermayer
cc663bd13a Merge commit '79fd186a5035cf16fc0ab288d8f59da8b1ba2c0e'
* commit '79fd186a5035cf16fc0ab288d8f59da8b1ba2c0e':
  lavf: Use MoveFileEx instead of rename/_wrename on windows

Conflicts:
	configure

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-27 11:35:54 +01:00