1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-02 03:06:28 +02:00
FFmpeg/libavformat
Andreas Rheinhardt a54c94d95f avformat/matroskaenc: Only write Cues at the front if space has been reserved
If the AVIOContext for output was unseekable when writing the header,
no space for Cues would be reserved even if the reserve_index_space
option was used (because it is reasonable to expect that one can't seek
back to the beginning to write the Cues anyway). But if the AVIOContext
was seekable when writing the trailer, it was presumed that space for
the Cues had been reserved when the reserve_index_space option indicated
so even when it was not. As a result, the beginning of the file would be
overwritten.

This commit fixes this: If the reserve_index_space option had been used
and no space has been reserved in advance because of unseekability when
writing the header, then no attempt to write Cues will be performed
when writing the trailer; after all, writing them at the front is
impossible and writing them at the end is probably undesired.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-05-19 01:12:06 +02:00
..
tests avformat/url: check url root node when rel include double dot and trim double dot 2020-05-06 12:00:26 +08:00
.gitignore
3dostr.c
4xm.c
a64.c
aacdec.c
aadec.c
ac3dec.c
acm.c
act.c
adp.c
ads.c
adtsenc.c
adxdec.c
aea.c
afc.c
aiff.h
aiffdec.c
aiffenc.c
aixdec.c
allformats.c avformat: add demuxer for Pro Pinball Series' Soundbanks 2020-05-05 20:07:19 +02:00
alp.c
amr.c avformat/amr: Don't reimplement ff_raw_write_packet() 2020-04-14 18:52:44 +02:00
anm.c
apc.c
ape.c
apetag.c
apetag.h
apm.c
apngdec.c
apngenc.c
aptxdec.c
aqtitledec.c
argo_asf.c
asf.c
asf.h
asfcrypt.c
asfcrypt.h
asfdec_f.c avformat/asfdec_f: Fix overflow check in get_tag() 2020-03-21 20:55:27 +01:00
asfdec_o.c
asfenc.c
assdec.c
assenc.c
ast.c
ast.h
astdec.c
astenc.c
async.c
au.c
av1.c
av1.h
av1dec.c
avc.c
avc.h
avformat.h avformat/avformat.h: Correct some comments 2020-04-01 05:48:31 +02:00
avformatres.rc
avi.h
avidec.c avformat/avidec: Fix memleak with embedded GAB2 subtitles 2020-04-05 18:38:26 +02:00
avienc.c avformat/avienc: Use AV_STRINGIFY for compile time constant 2020-03-14 22:07:27 +01:00
avio_internal.h avformat/aviobuf: Add function to reset dynamic buffer 2020-03-30 05:50:49 +02:00
avio.c remove CHAR_MIN/CHAR_MAX usage 2020-03-17 22:46:36 +01:00
avio.h
aviobuf.c avformat/aviobuf, nutenc: Move ff_puv_v, ff_get_v_length to nutenc.c 2020-05-05 19:28:28 +02:00
avisynth.c avformat/avisynth: fix deprecation warning 2020-04-05 01:23:46 +02:00
avlanguage.c
avlanguage.h
avr.c
avs.c
bethsoftvid.c avformat/bethsoftvid: Fix potential memleak upon reallocation failure 2020-03-22 13:00:19 +01:00
bfi.c
bink.c avformat/bink: properly mark packets that are key frames 2020-03-20 14:24:34 +01:00
bintext.c
bit.c
bluray.c
bmv.c
boadec.c
brstm.c
c93.c
cache.c
caf.c
caf.h
cafdec.c
cafenc.c
cavsvideodec.c
cdg.c
cdxl.c
chromaprint.c lavf/chromaprint: Silence compilation warnings 2020-04-05 22:47:21 +02:00
cinedec.c
codec2.c
concat.c avformat/concat: priv_data should be freed internally 2020-05-01 22:57:29 +08:00
concatdec.c
crcenc.c
crypto.c
cutils.c
dash.c
dash.h
dashdec.c avformat/dashdec: compute the segment size use current pos minus offset plus one 2020-05-07 19:33:35 +08:00
dashenc.c avformat/dashenc: remove the arbitrary restrictions for filename 2020-05-01 22:57:29 +08:00
data_uri.c
dauddec.c
daudenc.c
davs2.c
dcstr.c
derf.c avformat: add derf demuxer 2020-03-17 16:05:49 +01:00
dfa.c
dhav.c
diracdec.c
dnxhddec.c
dsfdec.c
dsicin.c
dss.c avformat/dss: Remove unnecessary allocation 2020-04-03 17:56:57 +02:00
dtsdec.c
dtshddec.c
dump.c avformat/dump: Use int64_t for intermediate time values 2020-05-17 13:03:30 +01:00
dv.c
dv.h
dvbsub.c
dvbtxt.c
dvenc.c
dxa.c
eacdata.c
electronicarts.c
epafdec.c
ffmeta.h
ffmetadec.c
ffmetaenc.c
fifo_test.c
fifo.c ffplay, avcodec, avformat: Don't initialize before av_packet_ref() 2020-03-28 04:17:20 +01:00
file_open.c
file.c
filmstripdec.c
filmstripenc.c avformat/filmstripenc: Use ff_raw_write_packet() 2020-04-14 19:01:27 +02:00
fitsdec.c
fitsenc.c
flac_picture.c
flac_picture.h
flacdec.c
flacenc_header.c
flacenc.c avformat/vorbiscomment: Switch to AVIOContext from bytestream API 2020-05-03 13:43:54 +02:00
flacenc.h
flic.c
flv.h
flvdec.c
flvenc.c
format.c
framecrcenc.c
framehash.c
frmdec.c
fsb.c
ftp.c avformat/ftp: Fix for invalid use of av_strtok 2020-05-10 22:32:34 +08:00
fwse.c avformat: add fwse demuxer 2020-03-17 16:04:42 +01:00
g722.c
g723_1.c
g726.c
g729dec.c
gdv.c
genh.c
gif.c
gifdec.c
golomb_tab.c
gopher.c
gsmdec.c
gxf.c
gxf.h
gxfenc.c avformat: implement retiming directly in mxfenc and gxfenc 2020-05-07 23:12:24 +02:00
h261dec.c
h263dec.c
h264dec.c
hashenc.c
hca.c avformat: add hca demuxer 2020-03-17 16:08:13 +01:00
hcom.c
hdsenc.c avformat/hdsenc: Add explicit deinit function 2020-04-30 08:24:09 +02:00
hevc.c
hevc.h
hevcdec.c
hls.c avformat/hls: Don't strdup non-null-terminated string 2020-03-24 21:22:15 +01:00
hlsenc.c avformat/hlsenc: Don't segfault on uncommon names 2020-05-17 22:55:18 +02:00
hlsplaylist.c avformat: add subtitle support in master playlist m3u8 2020-04-08 23:02:41 +08:00
hlsplaylist.h avformat: add subtitle support in master playlist m3u8 2020-04-08 23:02:41 +08:00
hlsproto.c
hnm.c avformat/hnm: Only keep and parse what is needed later 2020-04-02 21:22:52 +02:00
http.c avformat/http: Fix for invalid use of av_strtok 2020-05-10 22:32:34 +08:00
http.h
httpauth.c
httpauth.h
icecast.c
icodec.c
icoenc.c
id3v1.c
id3v1.h
id3v2.c
id3v2.h
id3v2enc.c
idcin.c
idroqdec.c
idroqenc.c
iff.c
ifv.c
ilbc.c avformat/ilbc: Add missing #if for muxer 2020-04-07 17:01:58 +02:00
img2_alias_pix.c
img2_brender_pix.c
img2.c
img2.h
img2dec.c
img2enc.c ffplay, avcodec, avformat: Don't initialize before av_packet_ref() 2020-03-28 04:17:20 +01:00
ingenientdec.c
internal.h avformat/mux: Set AV_PKT_FLAG_KEY for is_intra_only packet 2020-05-07 07:12:24 +08:00
ip.c
ip.h
ipmovie.c
ircam.c
ircam.h
ircamdec.c
ircamenc.c
isom.c
isom.h libavformat/mov: fix multiple trun per traf 2020-04-11 18:15:58 +02:00
iss.c
iv8.c
ivfdec.c
ivfenc.c avformat/ivfenc: move bsf insertion to the init function 2020-05-11 19:41:59 -03:00
jacosubdec.c
jacosubenc.c
jvdec.c
kvag.c
latmenc.c
libamqp.c
libavformat.v
libgme.c
libmodplug.c
libopenmpt.c
librtmp.c
libsmbclient.c
libsrt.c avformat/libsrt: change open_timeout to int64_t to avoid integer overflow 2020-05-03 05:28:33 +08:00
libssh.c
libzmq.c
lmlm4.c
loasdec.c
log2_tab.c
lrc.c
lrc.h
lrcdec.c
lrcenc.c
lvfdec.c
lxfdec.c
m4vdec.c
Makefile avformat: implement retiming directly in mxfenc and gxfenc 2020-05-07 23:12:24 +02:00
matroska.c avformat/matroska: Move mime_tag lists to matroskadec 2020-04-20 21:24:18 +02:00
matroska.h avformat/matroska: Move mime_tag lists to matroskadec 2020-04-20 21:24:18 +02:00
matroskadec.c avformat/matroskadec: Allow multiple Tags elements 2020-05-08 13:42:35 +02:00
matroskaenc.c avformat/matroskaenc: Only write Cues at the front if space has been reserved 2020-05-19 01:12:06 +02:00
md5proto.c
metadata.c
metadata.h
mgsts.c
microdvddec.c
microdvdenc.c
mj2kdec.c
mkvtimestamp_v2.c
mlpdec.c
mlvdec.c
mm.c
mmf.c
mms.c
mms.h
mmsh.c
mmst.c
mov_chan.c
mov_chan.h
mov_esds.c
mov.c avformat/mov: Read the QT Metadata Keys only once 2020-05-15 22:03:36 +02:00
movenc.c avformat/movenc: cosmetics 2020-04-26 14:34:03 +02:00
movenc.h avformat/movenc: remove the write_clli mov flag 2020-04-13 10:37:45 -06:00
movenccenc.c
movenccenc.h
movenchint.c
mp3dec.c
mp3enc.c lavf/mp3enc: fix ID3v1 year metadata setting issue 2020-04-29 15:14:17 +08:00
mpc8.c
mpc.c avformat/mpc: Simplify cleanup 2020-04-19 02:37:46 +02:00
mpeg.c avformat/mpeg: Decrease score by 1 for files with very little valid data 2020-05-10 01:09:13 +02:00
mpeg.h
mpegenc.c
mpegts.c avformat/mpegts: Shuffle avio_seek 2020-05-17 20:15:05 +02:00
mpegts.h avformat/mpegtsenc: use standard pids for m2ts 2020-04-21 21:28:29 +02:00
mpegtsenc.c avformat/mpegtsenc: Remove two duplicated fields 2020-05-14 09:53:59 -04:00
mpegvideodec.c
mpjpeg.c
mpjpegdec.c
mpl2dec.c
mpsubdec.c
msf.c
msnwc_tcp.c
mtaf.c
mtv.c
musx.c
mux.c avformat/mux: Call check_packet() more directly 2020-05-16 02:55:59 +02:00
mvdec.c
mvi.c
mxf.c avformat/mxfenc: add some missing content package rates 2020-03-14 22:25:25 +01:00
mxf.h avformat/mxfenc: move content package rates and timebase combinations to a separate struct 2020-03-14 22:25:25 +01:00
mxfdec.c avformat/mxfdec: reindent code 2020-05-05 08:20:45 +08:00
mxfenc.c avformat: implement retiming directly in mxfenc and gxfenc 2020-05-07 23:12:24 +02:00
mxg.c
ncdec.c
network.c
network.h
nistspheredec.c
nspdec.c
nsvdec.c avformat/nsvdec: Use av_packet_move_ref() for packet ownership transfer 2020-03-26 20:06:15 +01:00
nullenc.c
nut.c
nut.h
nutdec.c
nutenc.c avformat/nutenc: Write size into right dynamic buffer 2020-05-05 19:35:38 +02:00
nuv.c
oggdec.c avformat/oggdec: Reallocate buffer before writing into it 2020-05-01 23:30:35 +02:00
oggdec.h oggdec: add support for proper demuxing of chained Opus files and streams 2020-04-30 23:05:51 +01:00
oggenc.c avformat/oggenc: Avoid allocating and copying when writing page data 2020-05-09 16:18:39 +02:00
oggparsecelt.c
oggparsedaala.c
oggparsedirac.c
oggparseflac.c
oggparseogm.c
oggparseopus.c oggdec: add support for proper demuxing of chained Opus files and streams 2020-04-30 23:05:51 +01:00
oggparseskeleton.c
oggparsespeex.c
oggparsetheora.c
oggparsevorbis.c lavf/oggparsevorbis: Use case-insensitive key compare for vorbis picture 2020-04-11 12:56:21 +02:00
oggparsevp8.c
oma.c
oma.h
omadec.c
omaenc.c
options_table.h remove CHAR_MIN/CHAR_MAX usage 2020-03-17 22:46:36 +01:00
options.c
os_support.c
os_support.h
paf.c
pcm.c
pcm.h
pcmdec.c
pcmenc.c
pjsdec.c
pmpdec.c
pp_bnk.c avformat: add demuxer for Pro Pinball Series' Soundbanks 2020-05-05 20:07:19 +02:00
prompeg.c
protocols.c
psxstr.c
pva.c
pvfdec.c
qcp.c
qtpalette.c
qtpalette.h
r3d.c avformat/r3d: Remove write-only array 2020-04-23 20:09:38 +02:00
rawdec.c
rawdec.h
rawenc.c
rawenc.h
rawutils.c
rawvideodec.c
rdt.c
rdt.h
realtextdec.c
redspark.c
replaygain.c
replaygain.h
riff.c avcodec: add MV30 decoder 2020-04-10 12:22:09 +02:00
riff.h
riffdec.c
riffenc.c
rl2.c
rm.c
rm.h
rmdec.c
rmenc.c
rmsipr.c
rmsipr.h
rpl.c
rsd.c
rso.c
rso.h
rsodec.c
rsoenc.c avformat/rso: Don't reimplement ff_raw_write_packet() 2020-04-14 18:57:59 +02:00
rtmp.h
rtmpcrypt.c
rtmpcrypt.h
rtmpdh.c
rtmpdh.h
rtmpdigest.c
rtmphttp.c
rtmppkt.c
rtmppkt.h
rtmpproto.c avformat/rtmpproto: use av_reallocp_array() 2020-05-06 23:02:00 +08:00
rtp.c
rtp.h
rtpdec_ac3.c
rtpdec_amr.c
rtpdec_asf.c
rtpdec_dv.c
rtpdec_formats.h
rtpdec_g726.c
rtpdec_h261.c
rtpdec_h263_rfc2190.c
rtpdec_h263.c
rtpdec_h264.c
rtpdec_hevc.c
rtpdec_ilbc.c
rtpdec_jpeg.c
rtpdec_latm.c
rtpdec_mpa_robust.c
rtpdec_mpeg4.c
rtpdec_mpeg12.c
rtpdec_mpegts.c
rtpdec_qcelp.c
rtpdec_qdm2.c
rtpdec_qt.c
rtpdec_rfc4175.c
rtpdec_svq3.c
rtpdec_vc2hq.c
rtpdec_vp8.c
rtpdec_vp9.c
rtpdec_xiph.c
rtpdec.c
rtpdec.h
rtpenc_aac.c
rtpenc_amr.c
rtpenc_chain.c
rtpenc_chain.h
rtpenc_h261.c
rtpenc_h263_rfc2190.c
rtpenc_h263.c
rtpenc_h264_hevc.c
rtpenc_jpeg.c
rtpenc_latm.c
rtpenc_mpegts.c
rtpenc_mpv.c
rtpenc_vc2hq.c
rtpenc_vp8.c
rtpenc_vp9.c
rtpenc_xiph.c
rtpenc.c
rtpenc.h
rtpproto.c
rtpproto.h
rtsp.c avformat/rtsp: Put strings instead of pointers to strings into array 2020-04-20 18:21:39 +02:00
rtsp.h
rtspcodes.h
rtspdec.c
rtspenc.c
s337m.c
samidec.c
sapdec.c
sapenc.c
sauce.c
sauce.h
sbcdec.c
sbgdec.c
sccdec.c
sccenc.c
sctp.c
sdp.c
sdr2.c
sdsdec.c
sdxdec.c
segafilm.c
segafilmenc.c
segment.c avformat: only allow a single bitstream filter when muxing 2020-04-26 22:39:01 +02:00
serdec.c
shortendec.c
sierravmd.c
siff.c
smacker.c avformat/smacker: Cosmetics 2020-04-08 16:23:07 +02:00
smjpeg.c
smjpeg.h
smjpegdec.c
smjpegenc.c
smoothstreamingenc.c avformat/smoothstreamingenc: use av_reallocp_array() 2020-05-06 23:02:00 +08:00
smush.c
sol.c
sox.h
soxdec.c
soxenc.c
spdif.c
spdif.h
spdifdec.c
spdifenc.c
srtdec.c
srtenc.c
srtp.c
srtp.h
srtpproto.c
stldec.c
subfile.c
subtitles.c avformat/subtitles: Don't increment packet counter prematurely 2020-03-22 13:00:19 +01:00
subtitles.h
subviewer1dec.c
subviewerdec.c lavf/subviewerdec: Support higher sub-second precision. 2020-03-21 18:46:36 +01:00
supdec.c
supenc.c
svag.c
swf.c
swf.h
swfdec.c
swfenc.c
takdec.c
tcp.c
tedcaptionsdec.c
tee_common.c
tee_common.h
tee.c ffplay, avcodec, avformat: Don't initialize before av_packet_ref() 2020-03-28 04:17:20 +01:00
teeproto.c
thp.c avformat/thp: Require a video stream 2020-05-10 01:09:13 +02:00
tiertexseq.c
tls_gnutls.c lavf/tls_gnutls: check for interrupt inside handshake loop 2020-04-21 21:14:26 +03:00
tls_libtls.c
tls_mbedtls.c lavf/tls_mbedtls: fix resource leak 2020-04-22 12:41:29 +08:00
tls_openssl.c
tls_schannel.c avformat/tls_schannel: immediately return decrypted data if available 2020-05-13 17:05:23 +03:00
tls_securetransport.c
tls.c
tls.h
tmv.c
tta.c
ttaenc.c
tty.c
txd.c
ty.c
udp.c
uncodedframecrcenc.c
unix.c
url.c avformat/url: check url root node when rel include double dot and trim double dot 2020-05-06 12:00:26 +08:00
url.h
urldecode.c
urldecode.h
utils.c avformat/utils: move is_intra_only() to header and rename to ff_is_intra_only() 2020-05-06 23:02:00 +08:00
v210.c
vag.c
vapoursynth.c
vc1dec.c
vc1test.c
vc1testenc.c
version.h avformat: add demuxer for Pro Pinball Series' Soundbanks 2020-05-05 20:07:19 +02:00
vividas.c avformat/vividas: simplify, use av_rescale_q() instead 2020-05-10 22:32:33 +08:00
vivo.c
voc_packet.c
voc.c
voc.h
vocdec.c
vocenc.c
vorbiscomment.c avformat/vorbiscomment: Switch to AVIOContext from bytestream API 2020-05-03 13:43:54 +02:00
vorbiscomment.h avformat/vorbiscomment: Switch to AVIOContext from bytestream API 2020-05-03 13:43:54 +02:00
vpcc.c
vpcc.h
vpk.c
vplayerdec.c
vqf.c
w64.c
w64.h
wavdec.c
wavenc.c avformat/wavenc: simplify, use av_rescale_q() instead 2020-05-10 22:32:34 +08:00
wc3movie.c
webm_chunk.c avformat/Makefile: Remove false dependencies of WebM and Matroska muxer 2020-04-14 18:43:44 +02:00
webmdashenc.c avformat/Makefile: Remove false dependencies of WebM and Matroska muxer 2020-04-14 18:43:44 +02:00
webpenc.c
webvttdec.c avformat/webvttdec: Remove write-only variable 2020-04-23 20:09:38 +02:00
webvttenc.c
westwood_aud.c
westwood_vqa.c
wsddec.c
wtv_common.c
wtv.h
wtvdec.c
wtvenc.c
wv.c
wv.h
wvdec.c avformat/wvdec: Export version as extradata 2020-04-02 07:17:34 +02:00
wvedec.c
wvenc.c
xa.c
xmv.c
xvag.c
xwma.c avformat/xwma: return always proper error codes 2020-03-19 10:58:07 +01:00
yop.c avformat/yop: Use av_packet_move_ref() for packet ownership transfer 2020-03-26 20:51:34 +01:00
yuv4mpeg.h
yuv4mpegdec.c avformat/yuv4mpegdec: add support for 444alpha 2020-03-19 17:34:31 +01:00
yuv4mpegenc.c