ruiquan.crq
ae9a1a9698
lavf/url: fix relative url parsing when the query string or fragment has a colon
...
This disallows the usage of ? and # in libavformat specific scheme options
(e.g. subfile,,start,32815239,end,0,,:video.ts) but this change was considered
acceptable.
Signed-off-by: ruiquan.crq <caihaoning83@gmail.com >
Signed-off-by: Marton Balint <cus@passwd.hu >
2020-10-28 21:34:09 +01:00
James Almer
37d742b607
avcodec/codec2utils: move the remaining avpriv functions to lavf
...
They are only used by the codec2 demuxers.
The symbols are kept around until the next major bump.
Signed-off-by: James Almer <jamrial@gmail.com >
2020-10-28 11:59:35 -03:00
James Almer
7f76974e7d
libavcodec/codec2utils: remove codec2_version_from_extradata()
...
It's only used in the codec2 demuxers, and can be simplified with an AV_RB16()
call instead.
Suggested-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com >
Signed-off-by: James Almer <jamrial@gmail.com >
2020-10-28 11:59:16 -03:00
James Almer
3916af4d95
avcodec/codec2utils: remove avpriv prefix from inline functions
...
Signed-off-by: James Almer <jamrial@gmail.com >
2020-10-28 11:55:53 -03:00
Anton Khirnov
744b7f2e91
lavf: move AVStream.last_in_packet_buffer to AVStreamInternal
...
Those are private fields, no reason to have them exposed in a public
header.
2020-10-28 15:01:40 +01:00
Anton Khirnov
30f5180ca6
lavf: move AVStream.probe_data to AVStreamInternal
...
Those are private fields, no reason to have them exposed in a public
header.
2020-10-28 15:01:22 +01:00
Anton Khirnov
91a98cc4ea
lavf: move AVStream.pts_buffer to AVStreamInternal
...
Those are private fields, no reason to have them exposed in a public
header.
2020-10-28 15:00:40 +01:00
Anton Khirnov
cea7c19cda
lavf: move AVStream.*index_entries* to AVStreamInternal
...
Those are private fields, no reason to have them exposed in a public
header. Since there are some (semi-)public fields located after these,
even though this section is supposed to be private, keep some dummy
padding there until the next major bump to preserve ABI compatibility.
2020-10-28 14:59:28 +01:00
Anton Khirnov
7e87288f73
lavf: move AVStream.interleaver_chunk_* to AVStreamInternal
...
Those are private fields, no reason to have them exposed in a public
header.
2020-10-28 14:58:28 +01:00
Anton Khirnov
108864acee
lavf: move AVStream.{request_probe,skip_to_keyframe} to AVStreamInternal
...
Those are private fields, no reason to have them exposed in a public
header.
2020-10-28 14:57:01 +01:00
Anton Khirnov
456b170bd7
lavf: move AVStream.{*skip_samples.*_discard_sample} to AVStreamInternal
...
Those are private fields, no reason to have them exposed in a public
header.
2020-10-28 14:56:20 +01:00
Anton Khirnov
cb46a6bcbc
lavf: move AVStream.{nb_decoded_frames,mux_ts_offset} to AVStreamInternal
...
Those are private fields, no reason to have them exposed in a public
header.
2020-10-28 14:55:53 +01:00
Anton Khirnov
323c9a8c52
lavf: move AVStream.{pts_wrap_*,update_initial_durations_done} to AVStreamInternal
...
Those are private fields, no reason to have them exposed in a public
header.
2020-10-28 14:54:51 +01:00
Anton Khirnov
36d7c1dee8
lavf: move AVStream.pts_reorder_error[_count] to AVStreamInternal
...
Those are private fields, no reason to have them exposed in a public
header.
2020-10-28 14:54:35 +01:00
Anton Khirnov
25bade3258
lavf: move AVStream.{last_dts_for_order_check,dts_[mis]ordered} to AVStreamInternal
...
Those are private fields, no reason to have them exposed in a public
header.
2020-10-28 14:54:22 +01:00
Anton Khirnov
c1b916580a
lavf: move AVStream.{inject_global_side_data,display_aspect_ratio} to AVStreamInternal
...
Those are private fields, no reason to have them exposed in a public
header.
2020-10-28 14:53:45 +01:00
Anton Khirnov
8741f1fe26
lavf: move AVStream.info to AVStreamInternal
...
This struct is for internal use of avformat_find_stream_info(), so it
should not be exposed in public headers. Keep a stub pointer in its
place to avoid changing AVStream layout, since e.g. ffmpeg.c accesses
some fields located after it (even though they are marked as private).
2020-10-28 14:52:06 +01:00
Anton Khirnov
f95d9510ff
avformat: add a stream event flag for new packets
2020-10-28 13:58:29 +01:00
Anton Khirnov
48f3ed96e9
avformat: extend documentation of event_flags
...
Document how it is to be used for muxing (currently supported by
flvenc).
2020-10-28 13:57:38 +01:00
Anton Khirnov
c515a35dde
avformat: fix typo in doxy
...
av_read_frame() reads new packets, av_read_packet() does not exist.
2020-10-28 13:57:38 +01:00
Anton Khirnov
886c601a70
lavf/latmenc: use a local simplified copy of avpriv_copy_bits()
...
This is the only place in lavf where avpriv_copy_bits() is used, so this
allows us to make avpriv_copy_bits() lavc-local.
2020-10-28 13:53:23 +01:00
Anton Khirnov
2068ad5914
lavf/latmenc: fix units mismatch
...
avpriv_copy_bits() takes the size in bits, not bytes. According to
a736eb4a60 , nobody is quite sure whether
this code produces working files.
2020-10-28 13:53:23 +01:00
Yigit Uyan
c1efb1decb
rtsp: increase the control uri size
...
Current browsers support up to 2k characters.
Signed-off-by: Anton Khirnov <anton@khirnov.net >
2020-10-28 13:53:20 +01:00
Limin Wang
6f36eb0da7
avformat/mpegtsenc: make first_pcr sync with the first valid dts
...
now first_pts assume dts will start from zero, if it's not true(copyts is enable),
too many null packet will be inserted for cbr output.
Please test with below command, you'll get huge test.ts without the patch:
./ffmpeg -y -copyts -i ../fate-suite/mpegts/loewe.ts -c:v libx264 -x264opts \
nal-hrd=cbr:force-cfr=1 -b:v 3500k -minrate 3500k -maxrate 3500k -bufsize \
1000k -c:a mp2 -muxrate 4500k -vframes 1000 test.ts
Reviewed-by: Marton Balint <cus@passwd.hu >
Signed-off-by: Limin Wang <lance.lmwang@gmail.com >
2020-10-27 18:18:24 +08:00
Limin Wang
f3568a33c9
avformat/mpegtsenc: use total_size instead of avio_tell()
...
avio_tell() fails to get the amount of data written so far when the
underlying IO context is flushed to segments.
Please test with below command:
$ ./ffmpeg -f lavfi -i testsrc=duration=100:size=vga -c:v libx264 -x264opts \
nal-hrd=cbr:force-cfr=1 -b:v 500k -minrate 500k -maxrate 500k -bufsize 500k \
-f hls -hls_time 10 -hls_ts_options "muxrate=2000000" test%d.ts
$ du -h test*.ts
Before:
2.4M test00.ts
4.8M test11.ts
7.2M test22.ts
9.6M test33.ts
12M test44.ts
...
After apply the patch:
2.4M test00.ts
2.4M test11.ts
2.4M test22.ts
2.4M test33.ts
2.4M test44.ts
...
Reviewed-by: Marton Balint <cus@passwd.hu >
Signed-off-by: Limin Wang <lance.lmwang@gmail.com >
2020-10-27 18:18:24 +08:00
Zane van Iperen
7a11cc29d6
avformat: add alp muxer
2020-10-25 23:44:26 +10:00
Zane van Iperen
5df7fd1cbe
avformat/alp: fix handling of TUN files
...
Sample rate is always 22050. Verified by trying various files in the game.
2020-10-25 23:44:25 +10:00
Michael Niedermayer
728330462c
avformat/rmdec: Make expected_len 64bit
...
Fixes: signed integer overflow: 1347551268 * 14 cannot be represented in type 'int'
Fixes: 26458/clusterfuzz-testcase-minimized-ffmpeg_dem_RM_fuzzer-5655364324032512
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-10-25 09:49:40 +01:00
Michael Niedermayer
b23a619c13
avformat/pcm: Check block_align
...
Fixes: signed integer overflow: 321 * 8746632 cannot be represented in type 'int'
Fixes: 26461/clusterfuzz-testcase-minimized-ffmpeg_dem_PVF_fuzzer-6326427831762944
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-10-25 09:49:31 +01:00
Michael Niedermayer
80bc2ac3c0
avformat/lrcdec: Clip timestamps
...
Fixes: signed integer overflow: 7111111111111531010 - -7335632962598013506 cannot be represented in type 'long'
Fixes: 26463/clusterfuzz-testcase-minimized-ffmpeg_dem_LRC_fuzzer-6015558333759488
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-10-25 09:49:26 +01:00
Michael Niedermayer
857aba7c45
avformat/electronicarts: Check for EOF in each iteration of the loop in ea_read_packet()
...
Fixes: timeout(>20sec -> 1ms)
Fixes: 26526/clusterfuzz-testcase-minimized-ffmpeg_dem_EA_fuzzer-5672328069120000
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Peter Ross <pross@xvid.org >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-10-25 09:05:01 +01:00
Michael Niedermayer
b990148d1e
avformat/ifv: Check that total frames do not overflow
...
Fixes: Infinite loop
Fixes: 26392/clusterfuzz-testcase-minimized-ffmpeg_dem_GIF_fuzzer-5713658237419520
Fixes: 26435/clusterfuzz-testcase-minimized-ffmpeg_dem_SUBVIEWER_fuzzer-6548251853193216
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-10-24 19:11:12 +02:00
Michael Niedermayer
7c144b363e
avformat/nistspheredec: Check bps
...
Fixes: left shift of 1111111190 by 3 places cannot be represented in type 'int'
Fixes: 26437/clusterfuzz-testcase-minimized-ffmpeg_dem_NISTSPHERE_fuzzer-4886896091856896
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-10-24 19:11:12 +02:00
Michael Niedermayer
715ff75e5d
avformat/jacosubdec: Use 64bit inside get_shift()
...
Fixes: signed integer overflow: 111111111 * 30 cannot be represented in type 'int'
Fixes: 26448/clusterfuzz-testcase-minimized-ffmpeg_dem_JACOSUB_fuzzer-5638440374501376
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-10-24 19:11:12 +02:00
Michael Niedermayer
37396e9ba8
avformat/genh: Check block_align
...
Fixes: infinite loop
Fixes: 26440/clusterfuzz-testcase-minimized-ffmpeg_dem_GENH_fuzzer-5632134020333568
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-10-24 19:11:12 +02:00
Michael Niedermayer
a413ed9863
avformat/mvi: Check count for overflow
...
Fixes: left shift of 21378748 by 10 places cannot be represented in type 'int'
Fixes: 26449/clusterfuzz-testcase-minimized-ffmpeg_dem_MVI_fuzzer-5680463374712832
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-10-24 19:11:12 +02:00
Michael Niedermayer
209b9ff5c3
avformat/asfdec_f: Check for negative ext_len
...
Fixes: Infinite loop
Fixes: 26376/clusterfuzz-testcase-minimized-ffmpeg_dem_PCM_U32LE_fuzzer-6050518830678016
Fixes: 26377/clusterfuzz-testcase-minimized-ffmpeg_dem_TY_fuzzer-4838195726123008
Fixes: 26384/clusterfuzz-testcase-minimized-ffmpeg_dem_G729_fuzzer-5173450337157120
Fixes: 26396/clusterfuzz-testcase-minimized-ffmpeg_dem_PCM_S24BE_fuzzer-5071092206796800
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-10-23 10:07:57 +02:00
Michael Niedermayer
50b29f081e
avformat/bethsoftvid: Check image dimensions before use
...
Fixes: signed integer overflow: 55255 * 53207 cannot be represented in type 'int'
Fixes: 26387/clusterfuzz-testcase-minimized-ffmpeg_dem_AVS2_fuzzer-5684222226071552
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-10-23 10:07:57 +02:00
Michael Niedermayer
c95b47e18f
avformat/genh: Check block_align for how it will be used in SDX2_DPCM
...
Fixes: signed integer overflow: 19922944 * 1024 cannot be represented in type 'int'
Fixes: 26402/clusterfuzz-testcase-minimized-ffmpeg_dem_VMD_fuzzer-5745470053548032
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-10-23 10:07:57 +02:00
Michael Niedermayer
e680d50eb4
avformat/au: Check for EOF in au_read_annotation()
...
Fixes: Timeout (too looong -> 1 ms)
Fixes: 26366/clusterfuzz-testcase-minimized-ffmpeg_dem_SDX_fuzzer-5655584843759616
Fixes: 26391/clusterfuzz-testcase-minimized-ffmpeg_dem_ALP_fuzzer-5484026133217280
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-10-23 10:07:57 +02:00
Michael Niedermayer
c7a5face77
avformat/vividas: Check for zero v_size
...
Fixes: SEGV on unknown address 0x000000000000
Fixes: 26482/clusterfuzz-testcase-minimized-ffmpeg_dem_VIVIDAS_fuzzer-4905102324006912
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-10-23 09:47:12 +02:00
Michael Niedermayer
d34e4904cd
avformat/segafilm: Do not assume AV_CODEC_ID_NONE is 0
...
Suggested-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-10-22 18:51:27 +02:00
Michael Niedermayer
c0d7fd269b
avformat/segafilm: Check that there is a stream
...
Fixes: assertion failure
Fixes: 26472/clusterfuzz-testcase-minimized-ffmpeg_dem_SEGAFILM_fuzzer-5759751591559168
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-10-22 18:51:27 +02:00
Limin Wang
6fb2bdd1d0
avformat/udp: cosmetics
...
Signed-off-by: Limin Wang <lance.lmwang@gmail.com >
2020-10-22 20:53:57 +08:00
Limin Wang
2676277b6d
avformat/udp: clarify option description for timeout unit
...
Signed-off-by: Limin Wang <lance.lmwang@gmail.com >
2020-10-22 20:53:56 +08:00
Limin Wang
784ce1c294
avformat/rtsp: reuse POLLING_TIME and remove POLL_TIMEOUT_MS
...
Signed-off-by: Limin Wang <lance.lmwang@gmail.com >
2020-10-22 20:53:56 +08:00
Limin Wang
92c40ef882
avformat/rtsp: support for listen_timeout option for sdp
...
Now the listen timeout is hardcoded(10s).
How to test(30s timeout):
./ffprobe -listen_timeout 30 -protocol_whitelist rtp,udp,file -i test.sdp
Signed-off-by: Limin Wang <lance.lmwang@gmail.com >
2020-10-22 20:53:56 +08:00
Limin Wang
2aceae1438
avformat/rtpproto: support for rtp read timeout
...
then we can set the rtp read timeout instead of infinite timeout.
How to test(5s timeout):
./ffprobe -i rtp://192.168.1.67:1234?timeout=5000000
Signed-off-by: Limin Wang <lance.lmwang@gmail.com >
2020-10-22 20:53:56 +08:00
bevis
de59826703
libavformat/hls: use local var url for log to avoid crash
...
During operation, the user exits and interrupts,
causing pls->segment to be released,
resulting in a null pointer crash
Signed-off-by: bevis <javashu2012@gmail.com >
Signed-off-by: Steven Liu <lq@chinaffmpeg.org >
2020-10-22 17:13:15 +08:00
Michael Niedermayer
1868cb7316
avformat/wtvdec: Check dir_length
...
Fixes: Infinite loop
Fixes: 26445/clusterfuzz-testcase-minimized-ffmpeg_dem_WTV_fuzzer-5125558331244544
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Peter Ross <pross@xvid.org >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-10-21 17:21:41 +02:00