Commit Graph

19520 Commits

Author SHA1 Message Date
fuqiuping
2d72ea68f0 avformat/flvenc: support mp3 audio with 48khz
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-06 22:46:25 +01:00
Michael Niedermayer
c6bc823eea avformat/tcp: Put struct sockaddr_in6 under #if
Fixes: error: dereferencing pointer to incomplete type

Tested-by: Dave Yeo <daveryeo@telus.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-06 21:29:12 +01:00
Stefano Sabatini
755472124f lavf/mpegtsenc: write metadata descriptor for timed ID3 packets
This is required since some programs are not able to correctly recognize
the metadata. See H.222, 2.6.58 Metadata pointer descriptor.

putstr8() is modified in order to allow to skip writing the string
length.
2016-11-06 12:36:51 +01:00
Stefano Sabatini
9ccdf04bd0 lavf/mpegtsenc: move putstr8 definition up
This allows to use the function in a future commit.
2016-11-06 12:36:43 +01:00
James Almer
75a13115cd avformat/mux: remove unnecessary autobsf hack
autobsf has been ported to the new bsf API.

Signed-off-by: James Almer <jamrial@gmail.com>
2016-11-05 22:42:23 -03:00
James Almer
e8a39f584a avformat/framehash: also print channel layout as a string
This should be more useful for users since numerical values for channel
layout can be confusing and unintuitive.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-11-05 22:42:22 -03:00
Andreas Cadhalpun
0efb610611 mxfdec: fix NULL pointer dereference
Metadata streams have priv_data set to NULL.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-05 18:56:41 +01:00
liu jc
c0f6eff6a7 avformat/tcp: workaround for IOS9 getaddrinfo in IPv6 only network use hardcode IPv4 address can not resolve port number.
Signed-off-by: liujingchao <jcliu@outlook.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-05 18:48:00 +01:00
Timur Aydin
7746103227 avformat/rtpdec: Add support for 24 bit RTSP audio playback
When ffplay is used to play from the RTSP URL that serves 24 bit audio
content, ffplay fails to recognize the audio codec format. The attached
patch adds support for playing 24 bit audio content over RTSP by
defining a dynamic payload handler for "L24".

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-05 17:21:57 +01:00
Matt Oliver
d6f85ec270 avformat/avisynth.c: Use new safe dlopen code.
Signed-off-by: Matt Oliver <protogonoi@gmail.com>
2016-11-05 18:08:53 +11:00
Michael Niedermayer
9e58812519 avformat/mux: split side data before internal auto BSF
The bitstream filters do not work with merged in side data

This leaves the input packet split if it is being split.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-11-04 22:12:59 -03:00
James Almer
6005c7e656 Revert "avformat/mux: split side data earlier in av_write_frame and av_interleaved_write_frame"
This reverts commit fba2a8a254.

The changes were right for av_write_frame() but not for av_interleaved_write_frame().
The following commit will fix this in a simpler way.

Signed-off-by: James Almer <jamrial@gmail.com>
2016-11-04 21:59:48 -03:00
Carl Eugen Hoyos
222f59afd1 lavf/movenc: Do not print an error when muxing gray8 rawvideo.
This was fixed in 9a27780821
2016-11-05 00:43:31 +01:00
James Almer
fba2a8a254 avformat/mux: split side data earlier in av_write_frame and av_interleaved_write_frame
Similarly, merge it back before returning.

Fixes ticket #5927.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-11-04 17:13:43 -03:00
Carl Eugen Hoyos
db23fde784 lavf/mux: Add missing CR/LF to error messages. 2016-11-04 12:23:47 +01:00
Sasi Inguva
4abe1ff08f lavf/mov.c: Use the first sidx for tracks without sidx.
According to spec ISO_IEC_15444_12 "For any media stream for which no segment index is present, referred to as non‐indexed stream, the media stream associated with the first Segment Index box in the segment serves as a reference stream in a sense that it also describes the subsegments for any non‐indexed media stream."

Signed-off-by: Sasi Inguva <isasi@google.com>
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-03 19:03:22 +01:00
Andreas Cadhalpun
f84ae3f04a avformat: close parser if codec changed
The parser depends on the codec and thus must not be used with a different one.
If it is, the 'avctx->codec_id == s->parser->codec_ids[0] ...' assert in
av_parser_parse2 gets triggered.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-02 22:19:14 +01:00
James Almer
5cb57131d3 avformat/matroskaenc: use display aspect ratio for DisplayWidth and DisplayHeight when possible
This avoids potential rounding errors and guarantees the source aspect
ratio is preserved.
Keep writing pixel values when Stereo 3D Mode is enabled and for WebM,
as the format doesn't support anything else.

This fixes ticket #5743, implementing the suggestion from ticket #5903.

Signed-off-by: James Almer <jamrial@gmail.com>
2016-11-02 17:08:38 -03:00
James Almer
bab6b60675 avformat/matroskaenc: support writing Chroma Location elements
Signed-off-by: James Almer <jamrial@gmail.com>
2016-11-02 17:07:04 -03:00
Michael Niedermayer
a566c952f9 avformat/mpegtsenc: Add option to mark stream begin as discontinuous
This avoids continuity check failures in concatenated streams

Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-02 16:34:01 +01:00
Rodger Combs
1a958f4eb0
lavf/matroskaenc: don't try to modify the header when live-streaming 2016-11-02 01:16:26 -05:00
Rodger Combs
be28ce210d
lavf/matroskaenc: fix uninitialized read 2016-11-02 01:16:26 -05:00
Rodger Combs
8e6478b723
lavf/segment: fix autobsf 2016-11-02 01:16:23 -05:00
Michael Niedermayer
2b09a3ad19 Revert "img2 encoder: allow %t in filename, based on patch from Yuval Adam"
breaks API

Found-by: jamrial
This reverts commit 1a956c64c8.
2016-11-01 23:03:24 +01:00
rogerdpack
1a956c64c8 img2 encoder: allow %t in filename, based on patch from Yuval Adam
Signed-off-by: rogerdpack <rogerpack2005@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-01 22:29:23 +01:00
Andreas Cadhalpun
e0c6b32046 apngdec: use side data to pass extradata to the decoder
Fixes remuxing apng streams coming from the apng demuxer.
This is a regression since 940b8908b9.

Found-by: James Almer <jamrial@gmail.com>
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-01 18:49:28 +01:00
Andreas Cadhalpun
9d83b209d8 mov: immediately return from mov_fix_index without old index entries
If there are no index entries, e_old = st->index_entries is only one
byte large, since it was created by av_realloc called with size 0.

Thus accessing e_old[0].timestamp causes a heap buffer overflow.

Reviewed-by: Sasi Inguva <isasi@google.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-01 18:45:34 +01:00
Adriano Pallavicino
6089c44a2a Fix build warnings due to misleading indentation
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-01 17:44:10 +01:00
Carl Eugen Hoyos
f73a3aacbb lavf/mov: Only search for invalid moov in free if compliance < STRICT. 2016-11-01 11:37:34 +01:00
Sasi Inguva
5e965582d5 lavf/mov.c: Use the correct timescale when seeking for audio.
Signed-off-by: Sasi Inguva <isasi@google.com>
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-10-31 13:43:43 +00:00
Mark Thompson
e8634fb92e openssl: Allow newer TLS versions than TLSv1
The use of TLSv1_*_method() disallows newer protocol versions; instead
use SSLv23_*_method() and then explicitly disable the deprecated
protocol versions which should not be supported.

Fixes ticket #5915.
2016-10-30 13:18:45 +00:00
Michael Niedermayer
077939626e avformat/flvdec: Fix regression loosing streams
Fixes: unknown_video.flv

Found-by: Thierry Foucu <tfoucu@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-28 12:31:01 +02:00
Andreas Cadhalpun
940b8908b9 apng: use side data to pass extradata to muxer
This fixes creating apng files, which is broken since commit
5ef1959080.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-10-28 01:53:52 +02:00
Stephen Hutchinson
bf14393635 avisynth: fix Planar RGB output
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-27 04:37:57 +02:00
James Almer
eabbc64728 avformat/matroskaenc: fix cue relative position values when CRC32 is enabled
The dynamic buffer does not contain the CRC32 element so calls to avio_tell()
don't take it into account. This resulted in CueRelativePosition values being
six bytes short.
This is a regression since 6724525a15

Instead of adding yet another custom check for CRC32 to fix a size or an offset,
remove the existing ones and reserve the six bytes in the dynamic buffer.

Signed-off-by: James Almer <jamrial@gmail.com>
2016-10-26 16:28:59 -03:00
Michael Niedermayer
1609935b6c Bump minor versions after 3.2 branchpoint to seperate release
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-26 20:52:42 +02:00
Michael Niedermayer
3f3025205f Bump minor versions for 3.2
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-26 20:52:42 +02:00
Michael Niedermayer
38e5a4f3bb Revert "avformat/utils: Discard huge timestamps which would cause overflows if used in basic computations"
Some people seem to oppose this the patch seems to have been missed for a month on the ML
lets restart the discussion and solve this after the release

This reverts commit e936c8d176.
2016-10-26 20:31:04 +02:00
Michael Niedermayer
e936c8d176 avformat/utils: Discard huge timestamps which would cause overflows if used in basic computations
Allowing larger timestamps makes it impossible to calculate basic things like the
difference of 2 timestamps or their sum without checking each individual computation for
overflow.
This should avoid a significant number of overflow checks

Fixes Ticket5136

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-26 19:46:00 +02:00
Michael Niedermayer
d88a6bedb9 avformat/isom: Fix old API regression with exporting max bitrate
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-26 19:46:00 +02:00
Suman-
a81494b603 lavf/flvdec: init AVPacket::pos to FLVTAG offset
Current code doesn't initialize AVPacket::pos. Made it point to FLVTAG so flv_read_packet can decode from pos

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-26 02:12:18 +02:00
Rodger Combs
490c6bda0e
lavf/mov: reindent
Reviewed-By: Michael Niedermayer <michael@niedermayer.cc>
2016-10-24 05:47:10 -05:00
Rodger Combs
697400eac0
lavf/mov: improve tref/chap chapter handling
3 parts:
- Supports multiple chapter streams
- Exports regular text chapter streams as opaque data. This prevents consumers
  from showing chapters as if they were regular subtitle streams.
- Exports video chapter streams as thumbnails, and provides the first one as
  an attached_pic.
2016-10-24 05:47:10 -05:00
Rodger Combs
73ead477dd
lavf: add AV_DISPOSITION_TIMED_THUMBNAILS
Reviewed-By: Michael Niedermayer <michael@niedermayer.cc>
2016-10-24 05:47:05 -05:00
Rodger Combs
d99d7cbdfc
lavf/rawenc: add automatic bitstream filtering for H264+HEVC 2016-10-24 03:53:24 -05:00
Rodger Combs
42cb050a05
lavf/movenc+dashenc: add automatic bitstream filtering
This is disabled by default when the empty_moov flag is enabled
2016-10-24 03:53:23 -05:00
Rodger Combs
c972a28fc3
lavf/dashenc: add deinit function 2016-10-24 03:53:23 -05:00
Rodger Combs
e83d5d7e58
lavf/movenc: add deinit function 2016-10-24 03:53:22 -05:00
Rodger Combs
45f5c55732
lavf/segment: fix writing separate header with auto BSF 2016-10-24 03:53:22 -05:00
Rodger Combs
c7cd6ad850
lavf/segment: add deinit function 2016-10-24 03:53:22 -05:00