Commit Graph

19594 Commits

Author SHA1 Message Date
Andreas Cadhalpun 2c90316b46 hls: fix leaking avio_opts on hls_read_header error
Use the hls_close function to reduce code duplication.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-07 19:44:41 +01:00
Andreas Cadhalpun a305e0e5c0 hls: move hls_close above hls_read_header
This is needed for the following commit.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-07 19:43:43 +01:00
Anssi Hannula e2193b53ea avformat/hls: Add missing error check for avcodec_parameters_copy()
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
2016-11-07 18:56:36 +02:00
Anssi Hannula 3d2f636497 avformat/hls: Fix probing mpegts audio streams that use probing
Commit 04964ac311 ("avformat/hls: Fix missing streams in some
cases with MPEG TS") caused a regression where subdemuxer streams that
use probing (e.g. dts/eac3/mp2 in mpegts) no longer get probed properly.

This is because the codec parameters from the subdemuxer stream, once
probed, are not passed on to the main stream.

Fix that by updating the codec parameters if the codec id changes.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
2016-11-07 18:56:36 +02:00
Anssi Hannula 9a51cd35b8 avformat/hls: Factor copying stream info to a separate function
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
2016-11-07 18:56:36 +02:00
Andreas Cadhalpun 34aeb5dbc4 xmv: validate sample_rate
AVCodecParameters.sample_rate is a signed integer, so
XMVAudioPacket.sample_rate should be, too.

A negative sample rate doesn't make sense and triggers assertions in
av_rescale_rnd.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-07 00:51:49 +01:00
Andreas Cadhalpun 54b8fbbc5d voc_packet: validate sample_rate
A negative sample rate doesn't make sense and triggers assertions in
av_rescale_rnd.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-07 00:51:49 +01:00
Andreas Cadhalpun eb205eda3f oggparsespeex: validate sample_rate
A negative sample rate doesn't make sense and triggers assertions in
av_rescale_rnd.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-07 00:51:49 +01:00
Andreas Cadhalpun f748e3b5a2 nuv: validate sample_rate
A negative sample rate doesn't make sense and triggers assertions in
av_rescale_rnd.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-07 00:51:49 +01:00
Andreas Cadhalpun 2c818c3821 mvdec: validate sample_rate
A negative sample rate doesn't make sense and triggers assertions in
av_rescale_rnd.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-07 00:51:49 +01:00
Andreas Cadhalpun 0747754622 mpeg4audio: validate sample_rate
A negative sample rate doesn't make sense and triggers assertions in
av_rescale_rnd.

Also check for errors from avpriv_mpeg4audio_get_config in
ff_mp4_read_dec_config_descr.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-07 00:51:49 +01:00
Andreas Cadhalpun 9d36602abc mov: validate sidx timescale
A negative timescale doesn't make sense and triggers assertions in
av_rescale_rnd.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-07 00:51:49 +01:00
Andreas Cadhalpun a398f054fd mov: validate time_scale
A negative timescale doesn't make sense and triggers assertions in
av_rescale_rnd.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-07 00:51:49 +01:00
Andreas Cadhalpun fc022e77ee mov: validate sample_rate
A negative sample rate doesn't make sense and triggers assertions in
av_rescale_rnd.

fate-aac-al07_96 fails if sample_rate == 0 is rejected in
ff_mov_read_stsd_entries.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-07 00:51:49 +01:00
Andreas Cadhalpun 0009457dc0 ffmdec: validate sample_rate
A negative sample rate doesn't make sense and triggers assertions in
av_rescale_rnd.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-07 00:51:49 +01:00
Andreas Cadhalpun 872fcfcc0f bfi: validate sample_rate
A negative sample rate doesn't make sense and triggers assertions in
av_rescale_rnd.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-07 00:51:49 +01:00
Andreas Cadhalpun 2eb05eaa68 adxdec: validate sample_rate
A negative sample rate doesn't make sense and triggers assertions in
av_rescale_rnd.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-07 00:51:49 +01:00
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
Rodger Combs a246fef163
lavf/mux: add avformat_init_output
This allows a consumer to run the muxer's init function without actually
writing the header, which is useful in chained muxers that support
automatic bitstream filtering.
2016-10-24 03:53:21 -05:00
Carlos Fernandez 728ccae8a2 lavf/mpegts: add missed fixes to scte35 section callback
They somehow got lost along the patch versions.

Signed-off-by: Marton Balint <cus@passwd.hu>
2016-10-23 00:10:34 +02:00
James Almer cc71fa319f avformat/matroskaenc: write DisplayWidth and DisplayHeight elements only if they differ from PixelWidth and PixelHeight
Signed-off-by: James Almer <jamrial@gmail.com>
2016-10-22 15:00:15 -03:00
Andreas Cadhalpun 178eebd79e mpegts: handle AVMEDIA_TYPE_UNKNOWN correctly
It is negative, so can't be used for left shifting.

This fixes ubsan runtime error: shift exponent -1 is negative

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-10-22 19:23:12 +02:00
Carl Eugen Hoyos 6969bed12c lavf/rtpdec_g726: Map mime type G726 to g726le.
Add new mime types AAL2-G726 for g726 as suggested in rfc 3551.

This patch will break interaction with applications that incorrectly
use big-endian G.726 with mime type G726 but we know of at least one
device (DVTel camera) that correctly implements the rfc, so do the same.

Fixes ticket #5890.
2016-10-22 03:53:38 +02:00
Andreas Cadhalpun c8a6eb58d7 doc: fix spelling errors
Thanks to Mathieu Malaterre <malat@debian.org> for reporting the
Que/Queue typo. (https://bugs.debian.org/839542)

Reviewed-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-10-21 23:58:47 +02:00
Carlos Fernandez 5db3c9476c lavf/mpegts: SCTE-35 extraction from mpegts
Reviewed-by: Marton Balint <cus@passwd.hu>
Acked-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Carlos Fernandez <carlos@ccextractor.org>
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-10-21 20:41:19 +02:00
Michael Niedermayer fecb3e82a4 avformat/mxfdec: Check size to avoid integer overflow in mxf_read_utf16_string()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-21 20:06:29 +02:00
Michael Niedermayer c495f4ffde avformat/mxfdec: Fix mixed declaration and code
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-21 20:06:29 +02:00
Andreas Cadhalpun b0a043f51b dcstr: fix division by zero
Also check for possible overflows.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-10-21 19:41:09 +02:00
Andreas Cadhalpun 93c39db5f1 aiff: check block_align in aiff_read_packet
It can be unset in avcodec_parameters_from_context and a value of 0
causes SIGFPE crashes.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-10-21 19:40:59 +02:00
Hiroyuki OYAMA 47f74df29c avformat/rtmpproto: Fix RTMP control message handling error in listen mode.
Fix problem to fail by a RTMP Control Message except "Set Chunk Size (1)" after an RTMP handshake. When 'nginx-rtmp-module' relays an RTMP, it sends not only control message 'Set Chunk Size (1)' but also 'Window Acknowledgement Size (5)'.

Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-21 16:16:32 +02:00
Rodger Combs ecb53e1101
lavf/segment: decide whether to rename based on list URI
This fixes the case of writing segments to local files, but the list
over a network protocol.
2016-10-21 01:43:59 -05:00
Matt Oliver 798c6ecce5 openssl: Support version 1.1.0.
Fixes #5675

Signed-off-by: Matt Oliver <protogonoi@gmail.com>
2016-10-21 15:16:44 +11:00
Mark Reid 6902e1c7fa libavformat/mxfdec: add metadata streams for external referenced sourclips
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-21 02:04:19 +02:00
Mark Reid 263f8fd7e5 libavformat/mxfdec: don't assume first stream index to be primary
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-21 02:04:16 +02:00
Mark Reid 3b82be9e3b libavformat/mxfdec: export track name metadata
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-21 02:04:01 +02:00
Tobias Rapp e3196b6862 avformat/mxfdec: Detect field_order based on video_line_map
Read video_line_map from MXF generic picture essence descriptor and use
it to derive the coded field order. Use field_dominance to derive the
display field order from coded field order. If field_dominance is not
available the default value "1" is used as defined in SMPTE S377-1.

Fixes field_order detection for a bunch of DV/DVCPRO files. The heuristic
for deriving coded field order from video_line_map is inspired by
MediaInfo.

Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-21 02:00:56 +02:00
Andreas Cadhalpun ee5f0f1d35 rsd: limit number of channels
Negative values don't make sense and too large values can cause
overflows. For AV_CODEC_ID_ADPCM_THP this leads to a too small extradata
buffer being allocated, causing out-of-bounds writes.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-10-20 19:54:54 +02:00
Steven Liu 5702416c57 avformat/flvenc: do not attempt to write duration and filesize when not seekable
Its impossible to update the filesize & duration values if seekback is not
possible as with live streams

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-20 18:07:24 +02:00
Carl Eugen Hoyos d8716864f9 lavf/riff: Document the interleaving of VSM4 video. 2016-10-19 23:39:19 +02:00
Andreas Cadhalpun a5b4476a60 avformat: prevent triggering request_probe assert in ff_read_packet
If probe_codec is called with pkt == NULL, it sets probe_packets to 0
and request_probe to -1.
However, request_probe can change when calling s->iformat->read_packet
and thus a probe_packets value of 0 doesn't guarantee a request_probe
value of -1.
In that case calling probe_codec again is necessary to prevent
triggering the assert.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-10-19 23:13:28 +02:00
Derek Buitenhuis dfe7e5501d FATE: Add test for muxing discontinuous MP4 fragments with large timestamps
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-10-19 13:25:21 +02:00
Michael Niedermayer 18ad44d145 avformat/movenc: Skip duration check for discontinuous fragments
Found-by: Daemon404
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-19 13:25:21 +02:00
Jean Caillé 6498549fd7 lavf/mov: support gopro hero moments udta tag
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-19 13:25:21 +02:00
James Almer 0ad71ed6f9 avformat/matroskadec: fix BitsPerChannel element's default value
The element is currently ignored, so there's no effective functionality
change with this.

Signed-off-by: James Almer <jamrial@gmail.com>
2016-10-18 23:55:32 -03:00
James Almer f5cfc0cc54 avformat/matroskadec: clarify some Colour element defaults using enum values
This way it's more clear what the default values refer to, as
Undetermined/Unspecified is 0 for some, 2 for others.

Signed-off-by: James Almer <jamrial@gmail.com>
2016-10-18 23:55:05 -03:00
James Almer ea201ad14c avformat/mov: pass the demuxer's AVFormatContext to avpriv_request_sample()
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-10-18 23:09:02 -03:00
James Almer 47ee6f1a59 avformat/matroskadec: support parsing Chroma Location elements
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-10-18 20:39:07 -03:00
Jon Toohill 3b02f6dd7b lavf/mp3enc: write encoder delay/padding upon closing
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-10-18 20:19:43 +02:00
Carl Eugen Hoyos 31a0a84216 lavf/avidec: Be more verbose when ignoring very large tag size. 2016-10-18 15:01:50 +02:00
Zhao Zhili 7853d838a6 avformat/tests/gitignore: add fifo_muxer entry
Reviewed-by: Jan Sebechlebsky <sebechlebskyjan@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-18 03:38:37 +02:00
Carl Eugen Hoyos a20f3238be lavf/avidec: Do not fail for very large idx1 tags.
Fixes demuxing the sample file from github pull request 197,
the size of its idx1 tag is 6171936 bytes, followed by a JUNK
tag of 9505704 bytes.
2016-10-18 00:25:41 +02:00