1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

21087 Commits

Author SHA1 Message Date
Jun Zhao
49efd41c47 lavf/udp: use ff_log_net_error to replace log_net_error
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-08-18 16:16:11 +08:00
Jun Zhao
0ed0af595b lavf/tcp: check return value of setsockopt.
when setsockopt fail, use ff_log_net_error to dump the string
describing for error number.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-08-18 16:16:11 +08:00
Jun Zhao
0a8ff1d8bb lavf/network: check return value of setsockopt.
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-08-18 16:16:11 +08:00
Jun Zhao
d428ef0ea5 lavf/network: add a ff_log_net_error function.
add a ff_log_net_error function for error log.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-08-18 16:16:11 +08:00
Michael Niedermayer
c2eec1762d avformat/rmdec: Fix EOF check in the stream loop in ivr_read_header()
Fixes: long running loop
Fixes: ivr-timeout-42468cb797f52f025fb329394702f5d4d64322d6

Found-by: Paul Ch <paulcher@icloud.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-08-17 21:53:13 +02:00
Michael Niedermayer
1e71cb2c8e avformat/mlvdec: read_string() received unsigned size, make the argument unsigned
Fixes: infinite loop
Fixes: mlv-timeout-e3b8cab9835edecad6823baa057e029671329d04

Found-by: Paul Ch <paulcher@icloud.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-08-17 21:53:13 +02:00
James Almer
f00964e2f7 avformat/av1: filter out tile list OBUs from samples
As per the updated spec.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-08-17 15:26:05 -03:00
James Almer
7b5f93d4e1 avformat: bump micro version after previous changes
Signed-off-by: James Almer <jamrial@gmail.com>
2018-08-17 15:22:28 -03:00
James Almer
8d5604a69a avformat/av1: update ff_isom_write_av1c() to the latest revision of the spec
This will get ISOBMFF and Matroska up to date with the revised AV1 Codec
Configuration Box spec.
For now keep propagating raw OBUs as extradata until all libavcodec modules
are adapted to handle AV1CodecConfigurationRecord formatted extradata.

Tested-by: Thomas Daede <bztdlinux@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-08-17 15:09:02 -03:00
Gyan Doshi
02741853d7 avformat: correct fdebug loglevel
fftools/cmdutils sets loglevel for fdebug to DEBUG but all fdebug output
except for two were emitted at TRACE.
2018-08-14 22:06:30 +05:30
sanil
551a029a18 libavformat/dashdec: Support negative value of the @r attrbute of S in SegmentTimeline element.
The following patch supports parsing negative value of the @r attribute of S in SegmentTimeline element.

Example streams:
1. http://dash.edgesuite.net/dash264/TestCases/1c/qualcomm/1/MultiRate.mpd
2. http://dash.edgesuite.net/dash264/TestCases/1c/qualcomm/2/MultiRate.mpd
2018-08-13 16:53:59 +08:00
Sasi Inguva
12673bb253 lavf/mov.c: Set start_time for all streams (in case of edit lists).
Fixes vorbis mp4 audio files, with edit list specified. Since
st->skip_samples is not set in case of vorbis , ffmpeg computes the
start_time as negative.

Signed-off-by: Sasi Inguva <isasi@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-08-11 02:37:42 +02:00
Carl Eugen Hoyos
6130068453 lavf/mov: Force HEVC codec_id for code-point dvh1 and an hvcC atom.
The mp4 registration authority accepted a code-point for Dolby Vision
HEVC that was already used as a fourcc for DVCPRO 100.

Fixes ticket #7347.
2018-08-09 00:44:07 +02:00
Colin NG
af4c2acddd libavformat/dashdec: Fix for un-free memory
Fixes ticket #7338.
2018-08-08 23:55:25 +02:00
Steven Liu
243ecadad5 avformat/flvdec: add flv_full_metadata option into flvdec
output all the metadata context when use this option.

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-08-07 15:51:36 +08:00
Steven Liu
3b99bb3889 avformat/flvdec: reindent code for previous commit
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-08-07 15:50:47 +08:00
Steven Liu
d37125fb91 avformat/flvdec: add flv_ignore_prevtag option into flvdec
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-08-07 15:48:23 +08:00
Steven Liu
d54ae9b782 avformat/dashdec: remove unused functions and process code
Based on a patch for hls by Richard Shaffer

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-08-07 12:37:02 +08:00
Jacek Jendrzej
0cf5e6b5b4 avformat/dashdec: Fix memleak when resolve_content_path
Can be reproduced with:  valgrind  --leak-check=full  -v ffmpeg -i
http://yt-dash-mse-test.commondatastorage.googleapis.com/media/motion-20120802-manifest.mpd

Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-08-07 12:31:55 +08:00
Jacek Jendrzej
2f45378ba1 avformat/dashdec: fix for ticket #7336
fix for ticket #7336

Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-08-07 12:31:49 +08:00
Michael Niedermayer
6b67d7f059 avformat/flvenc: Check audio packet size
Fixes: Assertion failure
Fixes: assert_flvenc.c:941_1.swf

Found-by: #CHEN HONGXU# <HCHEN017@e.ntu.edu.sg>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-08-04 16:17:01 +02:00
James Almer
2de5209d91 avformat/matroskaenc: filter and reorder AV1 OBUs
Make sure to not write forbidden OBUs to CodecPrivate, and do the same with
unnecessary OBUs for packets.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-08-02 12:41:55 -03:00
James Almer
ded339fb3c avformat/av1: reorder OBUs before writting them in ff_isom_write_av1c()
Make sure Sequence Header is first, and only allow one of its kind.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-08-02 12:41:54 -03:00
James Almer
692e323d89 avcodec/av1_parse: return size of the parsed OBU in parse_obu_header()
Signed-off-by: James Almer <jamrial@gmail.com>
2018-08-02 12:41:54 -03:00
James Almer
1e126560c2 avformat/av1: return an error when no data is provided to ff_isom_write_av1c()
Signed-off-by: James Almer <jamrial@gmail.com>
2018-08-02 12:41:53 -03:00
Gyan Doshi
c9118d4d64 avformat/avs: add descriptive name and url
AVS now more commonly refers to the Chinese AVS format. This demuxer
processes video files for Creature Shock game
2018-08-02 10:53:03 +05:30
Antonio Morell
6f3e2913f5 libavformat/dashenc: Fix relative URI of HLS master playlist 2018-07-30 11:09:54 +05:30
Timo Rothenpieler
ed647ab79f avformat/librtmp: fix returning EOF from Read/Write
Ticket #7052
2018-07-28 01:04:38 +02:00
hwren
b7b7b8e8a1 lavf: add avs2 fourcc
Signed-off-by: hwren <hwrenx@126.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-07-27 20:07:52 +08:00
Jun Zhao
790cf9518a lavf/tcp: add option to setting Maximum Segment Size
This can change the the MSS value announced to the other end in
the initial TCP packet, it's can be used when failed Path MTU
discovery.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-07-26 19:03:24 +08:00
Michael Niedermayer
a37c620269 avformat/mov: Check default_encrypted_sample before use in mov_read_sample_encryption_info()
Fixes: 2018-0721-sample
Fixes: null pointer dereference

Found-by: Nikita Knyzhov (knnikita@yandex.ru)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-07-26 02:42:42 +02:00
Carl Eugen Hoyos
fa35ab80f3 lavf/isom: Make auxiliary_offsets consistently uint64_t.
Fixes a compilation warning if size_t != uint64_t:
libavformat/mov.c: In function ‘mov_read_saio’:
libavformat/mov.c:6207:45: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
         encryption_index->auxiliary_offsets = auxiliary_offsets;
                                             ^
2018-07-25 20:06:04 +02:00
Carl Eugen Hoyos
c51e0cd6ed lavf/flvdec: Remove an outdated comment.
The buffer size was increased in b2fecce3 to prepare for 790a3cdf.
2018-07-25 15:08:43 +02:00
Marton Balint
a5c17cf43e avformat/mxfdec: drop invalid index table segments when sorting them
This way if an index table segment is present multiple times, we can always use
the proper one instead of the invalid one.

Fixes seeking in the sample of ticket #5671.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-07-24 09:06:55 +02:00
Paul B Mahol
251329fa76 avformat/bink: move code for skipping unknown fields to correct place 2018-07-22 10:03:56 +02:00
James Almer
9888a19db4 avformat/movenc: add support for AV1 streams
Signed-off-by: James Almer <jamrial@gmail.com>
2018-07-20 12:00:32 -03:00
James Almer
9ca7ad246d avformat/mov: add support for AV1 streams
Signed-off-by: James Almer <jamrial@gmail.com>
2018-07-20 11:43:25 -03:00
Baptiste Coudurier
b420fead53 avformat/mxfdec: only call mxf_free_metadataset when ctx_size is != 0, otherwise ctx == mxf 2018-07-19 08:25:24 -07:00
Gyan Doshi
8aa6d9a8d3 avformat/mov: only set handler_name from mdia->hdlr
6 FATE references updated.

Fixes #7104
2018-07-16 21:33:01 +05:30
Karsten Otto
c5329d64b1 aadec: improve seeking in mp3 content
MP3 frames may not be aligned to aa chunk boundaries. When seeking,
calculate the expected frame offset in the target chunk. Adjust the
timestamp and truncate the next packet accordingly.

This solution works for the majority of tested audio material. For
some rare encodings with mp3 padding or embedded id3 tags, it will
mispredict the correct offset, and at worst skip an extra frame.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-07-14 19:04:48 +02:00
Gyan Doshi
28ed68fa31 avformat/movenc: add reason for minf->hdlr in MOV only 2018-07-14 12:03:50 +05:30
Marton Balint
e5ff2c0c06 avformat/mxfdec: only return stream indexes which have a corresponding track
Without this check some crafted files might crash because a packet might be
demuxed which have no corresponding mxf track.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-07-13 22:58:40 +02:00
Michael Niedermayer
b0644f7f72 avformat/mov: Simplify last element computation in mov_estimate_video_delay()
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Reviewed-by: Sasi Inguva <isasi@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-07-13 02:19:50 +02:00
Michael Niedermayer
aba13dc13e avformat/mov: Break out of inner loop early in mov_estimate_video_delay()
0.266 <- 0.299 sec (this is time ffmpeg so containing alot other things)

Sample for benchmark was: ffmpeg -f rawvideo -pix_fmt yuv420p -s 32x32 -i /dev/zero -t 24:00:00.00 out.mp4

Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Reviewed-by: Sasi Inguva <isasi@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-07-13 02:19:50 +02:00
Michael Niedermayer
3ce4034308 avformat/mov: Eliminate variable buf_size from mov_estimate_video_delay()
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Reviewed-by: Sasi Inguva <isasi@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-07-12 01:28:23 +02:00
Michael Niedermayer
c995e01b1e avformat/mov: remove modulo operations from mov_estimate_video_delay()
0.324 <-0.491 sec

Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Reviewed-by: Sasi Inguva <isasi@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-07-12 01:28:23 +02:00
Steven Liu
bd8a5c6b7c avformat/hlsenc: improve compute after_init_list_dur
fix ticket: 7305
vs->sequence - hls->start_sequence - vs->nb_entries is the
after_init_list_dur fragment numbers
fix the wrong compute way vs->sequence - vs->nb_entries

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-07-11 13:28:14 +08:00
Michael Niedermayer
fa19fbcf71 avformat/movenc: Write version 2 of audio atom if channels is not known
The version 1 needs the channel count and would divide by 0
Fixes: division by 0
Fixes: fpe_movenc.c_1108_1.ogg
Fixes: fpe_movenc.c_1108_2.ogg
Fixes: fpe_movenc.c_1108_3.wav

Found-by: #CHEN HONGXU# <HCHEN017@e.ntu.edu.sg>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-07-09 23:10:39 +02:00
Karsten Otto
6cc6b619b9 aadec: add chapters and seeking
read_packet reads content in chunks. Thus seek must be clamped to valid
chunk positions in the file, which in turn are relative to chapter start
positions.

So in read_header, scan for chapter headers once by skipping through the
content. Set stream time_base based on bitrate in bytes/s, for easy
timestamp to position conversion.

Then in read_seek, find the chapter containing the seek position, calculate
the nearest chunk position, and reinit the read_seek state accordingly.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-07-09 03:25:53 +02:00
Karsten Otto
c126065947 aadec: improve eof detection
Remember the end position of audio content in the file and check it during
read_packet. There always seems to be other data beyond it, which could be
misinterpreted as more audio. Also add some extra avio_read error checks,
to bail early in case of a broken/truncated file.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-07-08 11:14:53 +02:00