Commit Graph

15783 Commits

Author SHA1 Message Date
Benoit Fouet
9c843fb1d0 avformat/avidec: ensure that palette does not contain the BottomUp info.
Considering the palette is located at the end of extradata may be flawed
when the extradata contains the palette followed by the BottomUp field.
When the BottomUp field is present, exclude it from the palette.
Fixes part of ticket #1304

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-22 11:01:27 +02:00
Benoit Fouet
591e06b0e2 avformat/img2: remove useless 'pix' duplicated entry.
The second entry will never be selected, so let's save some bytes in the
library.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-22 10:25:31 +02:00
Thomas Volkert
e1cddd1a0c rtpenc_h263_rfc2190: avoid misleading error output
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-22 03:45:34 +02:00
Clément Bœsch
08e2b0da2c avformat/assenc: mux all extradata at once
Before this commit, the code was muxing up to the 2nd line after
"[Events]" (assuming it to be the "Format:" line). The remaining are
generally "Comment:" directives which can stay in that place. mkvextract
behaves that way so it seems there is no reason for that extra
complexity.
2014-09-21 18:55:12 +02:00
Clément Bœsch
e60770679b avformat/assenc: return correct error code 2014-09-21 18:50:16 +02:00
Thomas Volkert
dcdc1cbf43 rtpdec_hevc: do not print an error message if the received packet has a valid header but lacks additional bytes as payload
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-21 15:07:26 +02:00
wm4
6c7f1155bb avformat/mp3dec: avoid early EOF with concatenated gapless mp3s
Consider a file created with something like:

    cat file1.mp3 file2.mp3 > result.mp3

Then if file2.mp3 has gapless information, result.mp3 would stop playing
something in the middle. This happens because the gapless info directs
the decoder to discard all samples after a certain position. To make
matters worse, the gapless info of file2.mp3 will be used when playing
the file1.mp3 part, because the gapless info is located at the end of
the file.

While handling concatenated gapless files correctly would be insane and
a lot of effort (especially without scanning the whole file on opening),
it's easy to prevent at least early EOF. Playback will happen to work,
even if it's slightly broken.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-21 14:57:12 +02:00
Thomas Volkert
6821a5a4ad rtpenc: HEVC/H.265 support
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-21 12:49:08 +02:00
wm4
d87fe2687f avformat/mp3dec: fix gapless audio support
The code already had skipping of initial padding, but discarding
trailing frame padding was missing.

This is somewhat questionable, because it will make the decoder discard
any data after the declared file size in the LAME header. But note that
skipping full frames at the end of the stream is required. Encoders
actually create such files.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-20 19:46:25 +02:00
Daniel Bomar
af1818276e avformat/os_support: Add _DEFAULT_SOURCE to hide warning about _SVID_SOURCE depreciation
As suggested, this just adds _DEFAULT_SOURCE while preserving
_SVID_SOURCE for whatever old systems still need it.

Signed-off-by: Daniel Bomar <dbdaniel42@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-19 22:32:05 +02:00
Michael Niedermayer
986f63d17f Merge commit '2bb2c2bd75e5f4b28a945511cda77e0a1a44c758'
* commit '2bb2c2bd75e5f4b28a945511cda77e0a1a44c758':
  rtpenc_chain: Pass the initial time_base hint on to the chained muxer

See: [FFmpeg-devel] [PATCH] avformat/rtpenc_chain: Set timebase
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-18 02:14:53 +02:00
Martin Storsjö
2bb2c2bd75 rtpenc_chain: Pass the initial time_base hint on to the chained muxer
In practice this hint is ignored - the rtp muxer always overwrites
the stream time base without taking the hint into account. But as
a general practice this is the correct way to pass a time base hint
on to a chained muxer.

This avoids warnings about using the codec time base as hint
being deprecated.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-09-17 22:53:27 +03:00
Michael Niedermayer
8c71de762b Merge commit 'c5560e72d0bb69f8a1ac9536570398f84388f396'
* commit 'c5560e72d0bb69f8a1ac9536570398f84388f396':
  apetag: Fix APE tag size check

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-17 20:42:26 +02:00
Katerina Barone-Adesi
c5560e72d0 apetag: Fix APE tag size check
The size variable is (correctly) unsigned, but is passed to several functions
which take signed parameters, such as avio_read, sometimes after having
numbers added to it. So ensure that size remains within the bounds that
these functions can handle.

CC: libav-stable@libav.org
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-09-17 06:37:05 -07:00
Michael Niedermayer
3c020b6959 avformat/avienc: Dont search for startcodes in inserted empty avi frames
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-17 00:39:09 +02:00
Michael Niedermayer
474d858fd9 Revert "avformat/rtpproto: fix strict aliasing violations with sockaddr"
It appears this breaks build with MSVC
until someone who has MSVC setup has time to investigate and
workaround/fix this, its better to revert so that build is not broken
Thats even more so as the original commit only fixed a hypothetical issue

This reverts commit e587a428d7.
2014-09-16 23:43:13 +02:00
Carl Eugen Hoyos
7c3ba1b83a Add a closing LF to Webm-manifest files.
Fixes fate-webm-dash-manifest on AIX.

Reviewed-by: Nicolas George
2014-09-16 17:24:56 +02:00
Clément Bœsch
de0e49c245 avformat/flacenc: use av_clip() instead of av_clip_c() 2014-09-16 16:57:20 +02:00
Steven Liu
2c21e8b1a4 lavf/hls: add hls_ts_option
Same as COMMITID 4f5493fe23.

Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2014-09-16 16:30:03 +02:00
Michael Niedermayer
aaeae281a8 avformat/mpegtsenc: More verbose warning messages in case of missing video ES startcodes
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-16 03:56:37 +02:00
Michael Niedermayer
b76d6132e3 avformat/network: move sockaddr_union after sockaddr_storage compatibility code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-16 01:19:53 +02:00
Mika Raento
f685f7d7a8 hlsenc: single_file, support HLS ver 4 byteranges
This adds a new option -hls_flags single_file that creates one .ts file
for HLS and adds byteranges to the .m3u8 file, instead of creating one
.ts file for each segment.

This is helpful at least for storing large number of videos, as the
number of files per video is drastically reduced and copying and storing
those files takes less requests and inodes.

This is based on work by Nicolas Martyanoff, discussed on ffmpeg-devel
in July 2014. That patch seems abandoned by the author, and contained
unrelated changes. This patch tries to add the minimum amount of code to
support the byterange playlists.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-15 22:16:44 +02:00
Michael Niedermayer
e587a428d7 avformat/rtpproto: fix strict aliasing violations with sockaddr
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-15 13:31:00 +02:00
Michael Niedermayer
8c1dc1f6ed avformat/network: add union for avoiding strict aliassing violations with sockaddr*
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-15 13:31:00 +02:00
Michael Niedermayer
36ea35bbc0 avformat/utils: free s->pb for image2 as it can be used with and without a file
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-13 23:25:17 +02:00
Clément Bœsch
89d42da5c6 avformat/assenc: honor ReadOrder 2014-09-13 23:02:51 +02:00
Michael Niedermayer
296cd9c432 avformat/mpegts: Improve probe heuristic by considering the overall frequency of 0x47 headers
Fixes Ticket3939

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-13 22:08:21 +02:00
Clément Bœsch
d86cf4a91d avformat/vobsub: fix NULL dereference 2014-09-13 15:15:32 +02:00
Andreas Cadhalpun
bcac0f4010 lavf/format.c: use AVPROBE_SCORE_MIME instead of AVPROBE_SCORE_EXTENSION for matching mime types
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-13 00:37:35 +02:00
Michael Niedermayer
b3fd2b175c avformat/img2dec: Fail probing when no data is yet available and the filename contains no number/glob patterns either.
Fixes Ticket3901

the seek test error codes change due to a change in the failure path,
this could be avoided by changing the respective error codes to EINVAL

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-12 19:01:44 +02:00
Michael Niedermayer
917d14e6a2 avformat/format: Run image2 probe again when file content data is available
Reviewed-by: Benoit Fouet <benoit.fouet@free.fr>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-12 18:20:38 +02:00
Michael Niedermayer
321c3cd1a9 avformat/img2dec: reduce bmppipe probe score
bmp pipe needs the bmp parser which is not bug free and should thus not be favored
over the bmp image2 demuxer
that also means this change could be reverted in case bmp pipe is improved so it
handles all single bmp images correctly

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-12 18:19:11 +02:00
Michael Niedermayer
de4a4ca1a0 avformat/img2_alias_pix: Add AVClass and image2 AVOptions
This fixes the default timebase and allows overriding the framerate

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-11 15:34:13 +02:00
Michael Niedermayer
8b4714614f avformat/img2_alias & brender_pix: fix function names
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-11 15:16:24 +02:00
Michael Niedermayer
646d663f71 avformat/img2_brender_pix: Add AVClass and image2 AVOptions
This fixes the default timebase and allows overriding the framerate

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-11 15:10:59 +02:00
Michael Niedermayer
5303a644f5 avformat/img2: Make AVOptions available to img* demuxers defined in other files
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-11 15:10:15 +02:00
Michael Niedermayer
ea7ebadeb7 avformat/rmdec: very basic MLTI support
Fixes Ticket2152

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-11 14:13:03 +02:00
Michael Niedermayer
3294fc8c47 avformat/concatdec: fix "warning: explicitly assigning a variable of type int to itself"
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-10 11:48:39 +02:00
Michael Niedermayer
1b5ccae0f2 avformat/mp3dec: Improve seeking frame sync code
Fixes Ticket3884

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-10 02:32:41 +02:00
Clément Bœsch
c7d8dbad14 avformat: remove FF_API_ASS_SSA dead code 2014-09-09 21:34:23 +02:00
Michael Niedermayer
f7bbe0f414 avformat/mpeg: update comment on probe score
Found-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-09 02:51:59 +02:00
Michael Niedermayer
5109ce2017 avformat/mpeg: increase score for short mpeg-ps by 1
Fixes Ticket 3855

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-09 01:10:55 +02:00
Michael Niedermayer
951f6fa3f3 avformat/rtpdec_qt: Fix 'warning: passing argument 2 of ffio_init_context discards const qualifier from pointer target type'
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-08 16:56:19 +02:00
Stefano Sabatini
f51de9cac2 lavf/segment: abort in case of invalid segment format options 2014-09-08 15:22:55 +02:00
Hendrik Leppkes
e9c08e32d6 avformat/utils: Exclude the header size when computing duration from bit_rate
This improves the estimate for MP3s with cover art tags.

Fixes Ticket2931

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-08 05:22:05 +02:00
Michael Niedermayer
aecd064744 Merge commit '803e82276b3716bf6012ec69e8854dae14a4fd2b'
* commit '803e82276b3716bf6012ec69e8854dae14a4fd2b':
  libavformat: Check mkdir return error codes

Conflicts:
	libavformat/hdsenc.c
	libavformat/smoothstreamingenc.c

See: c89f8f80cc
See: a3886ea3c5
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-08 00:39:26 +02:00
Martin Storsjö
803e82276b libavformat: Check mkdir return error codes
Previously, the returned error codes were intentionally ignored
(see fadd3a6821), to avoid aborting if the directory already
existed. If the mkdir actually failed, this was caught when
opening files within the directory fails anyway.

By handling the error code here (but explicitly ignoring EEXIST),
the error messages and return codes in these cases are more
appropriate and less confusing.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-09-07 23:20:29 +03:00
Michael Niedermayer
7c1835c52a avformat/m4vdec: Check for non startcode 00 00 00 sequences in probe
Fixes miss detection of PCM as m4v
Fixes Ticket 3928

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-07 16:39:39 +02:00
Stefano Sabatini
4f5493fe23 lavf/segment: add segment_format_options option 2014-09-07 13:17:46 +02:00
Michael Niedermayer
c2430304df avformat/swfdec: Do not change the pixel format
This is currently not supported
Fixes part of Ticket 3539

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-07 00:39:52 +02:00