Commit Graph

23858 Commits

Author SHA1 Message Date
Michael Niedermayer
b72d657b73 avformat/tta: Check for EOF in index reading loop
Fixes: OOM
Fixes: 33585/clusterfuzz-testcase-minimized-ffmpeg_dem_TTA_fuzzer-4564665830080512

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-06-18 18:58:25 +02:00
Kevin LaFlamme
7d1464721e dashenc: Write out DASH manifest immediately in streaming mode
When streaming mode is enabled with fMP4/CMAF for DASH output, the
segment files are available to read by players as soon as the first byte
is written instead of only after the file is fully written. The DASH
manifest currently only gets written when the final write to the segment
file occurs. This means that players cannot stream the first segment
while it is being written.

When -lhls is enabled with MP4 segments the HLS manifest is written
immediately to advertise the in-flight segments. This change adds the
same behavior for the DASH manifest so players can stream it
immediately.
2021-06-14 21:47:09 +05:30
Limin Wang
f21626b67b avformat/dashenc: use av_match_ext()
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-06-14 21:11:24 +05:30
Valerii Zapodovnikov
91ba771a3f avformat/mxfdec: fixed jp2k_rsiz and 170M matrix
Again. 240M matrix is different from BT.601! And 170M is the same
as BT.601. It is primaries that are the same in 240M and 170M, as
for jp2k_rsiz see page 17 of ST 422:2019. IT WAS THERE since 2006.
This wrong jp2k_rsiz is a copy-paste of header_open_partition_key.
2021-06-13 22:04:14 +02:00
Michael Niedermayer
480f11bdd7 avformat/rpl: The associative law doesnt hold for signed integers in C
Add () to avoid undefined behavior
Fixes: signed integer overflow: 9223372036854775790 + 57 cannot be represented in type 'long'
Fixes: 34983/clusterfuzz-testcase-minimized-ffmpeg_dem_RPL_fuzzer-5765822923538432

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-06-12 14:22:42 +02:00
Michael Niedermayer
ffe4851e23 avformat/utils: Avoid overflow in codec_info_duration computation for subtitles
Fixes: signed integer overflow: 9223126845747118112 - -2594073385365397472 cannot be represented in type 'long'
Fixes: 34936/clusterfuzz-testcase-minimized-ffmpeg_dem_MATROSKA_fuzzer-6739888002170880

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-06-12 14:22:42 +02:00
Michael Niedermayer
bf4e7ec825 avformat/utils: check dts/duration to be representable before using them
Fixes: signed integer overflow: 6854513951393103890 + 3427256975738527712 cannot be represented in type 'long'
Fixes: 32936/clusterfuzz-testcase-minimized-ffmpeg_dem_R3D_fuzzer-5236914752978944

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-06-12 14:22:42 +02:00
Michael Niedermayer
f54d85cee6 avformat/mov: Check for duplicate mdcv
Fixes: memleak
Fixes: 34932/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5456227658235904

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-06-12 14:22:42 +02:00
Michael Niedermayer
1e24da5cfe avformat/flvdec: Check data before casting
Fixes: -nan is outside the range of representable values of type 'long'
Fixes: signed integer overflow: 1000 * -9223372036854775808 cannot be represented in type 'long'
Fixes: 34890/clusterfuzz-testcase-minimized-ffmpeg_dem_FLV_fuzzer-5334208657620992

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-06-12 14:22:42 +02:00
Anton Khirnov
71c0ef882e lavf: clarify probesize/format_probesize doxy
probesize is not used for probing the input format, but its
documentation claims it does.
2021-06-11 19:42:24 +02:00
James Almer
2cccab96f6 avformat: make AVStream.pts_wrap_bits public
It can be useful to library users, and is currently being used by ffmpeg.c

Suggested-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-06-10 18:37:26 -03:00
zheng qian
f38458089f avformat/mpegtsenc: enable muxing of ARIB captions
Writes a general ARIB stream identifier descriptor, as well
as a data component descriptor which also includes a
pre-defined additional_arib_caption_info structure.

Signed-off-by: zheng qian <xqq@xqq.im>
2021-06-10 23:16:55 +03:00
Anton Khirnov
1256b71ba9 lavf/mp3dec: avoid avcodec.h dependency 2021-06-10 16:51:44 +02:00
Anton Khirnov
c9642265f8 lavf/mov_chan: avoid avcodec.h dependency 2021-06-10 16:51:44 +02:00
Anton Khirnov
823ca1ba84 lavf/matroska: avoid avcodec.h dependency 2021-06-10 16:51:44 +02:00
Anton Khirnov
f3dafe6a41 lavf/latmenc: avoid avcodec.h dependency 2021-06-10 16:51:44 +02:00
Anton Khirnov
e246625b01 lavf/id3v1: drop unnecessary avcodec.h include 2021-06-10 16:51:44 +02:00
Anton Khirnov
5620d18e66 lavf/hevc: drop unnecessary avcodec.h include 2021-06-10 16:51:44 +02:00
Anton Khirnov
f79d009b7c lavf/framecrcenc: avoid avcodec.h dependency 2021-06-10 16:51:44 +02:00
Anton Khirnov
239b7d2e40 lavf/adtsenc: avoid avcodec.h dependency 2021-06-10 16:51:44 +02:00
Anton Khirnov
e7196afe28 lavf/a64: avoid avcodec.h dependency 2021-06-10 16:51:44 +02:00
Anton Khirnov
e67e02d156 lavf/avformat.h: drop the avcodec.h include
Since AVStream.codec is gone, avformat.h does not require anything from
avcodec.h.
2021-06-10 16:51:44 +02:00
Anton Khirnov
51200769c3 lavf/icoenc: include required headers explicitly 2021-06-10 16:51:44 +02:00
Anton Khirnov
c4c6c83421 lavf/internal: include avcodec.h explicitly
Do not depend on avformat.h to provide it.
2021-06-10 16:51:44 +02:00
James Almer
591b88e678 avformat: move AVStream.{first,cur}_dts to AVStreamInternal
They are private fields, no reason to have them exposed in a public header.

Signed-off-by: James Almer <jamrial@gmail.com>
2021-06-09 13:55:25 -03:00
James Almer
c768233293 avformat/utils: make ff_update_cur_dts() shared
libavdevice needs it.

Signed-off-by: James Almer <jamrial@gmail.com>
2021-06-09 13:55:25 -03:00
Zhao Zhili
58614f7bee avformat/libsrt: workaround conflict with ffmpeg cmdline option
Add 'srt_streamid' option as an alias for 'streamid'.

Signed-off-by: Marton Balint <cus@passwd.hu>
2021-06-09 00:09:33 +02:00
Zhao Zhili
55c54ff744 avformat/libsrt: add tsbpd option
Signed-off-by: Marton Balint <cus@passwd.hu>
2021-06-09 00:07:10 +02:00
Zhao Zhili
9099046cc7 avformat/libsrt: send message in order
There is no good use case for out of order delivery of data. For live
streaming with TSBPD enabled by default, the receiver get data in order
based on the timestamps. However, if TSBPD is disabled, the data can
be delivered out of order.

Signed-off-by: Marton Balint <cus@passwd.hu>
2021-06-09 00:07:10 +02:00
Valerii Zapodovnikov
812f39ee85 Revert "avformat/dashenc: Disable writing CODECS tag for HEVC streams"
This reverts commit d6d407d2d7.
Hack not needed after a2b1dd0ce3.
Will fix #7480 and #8904.
This will include e.g. CODECS="hvc1.2.4.L123.B0" into m3u8.

Signed-off-by: Valerii Zapodovnikov <val.zapod.vz@gmail.com>
2021-06-08 22:59:26 +05:30
Michael Niedermayer
a0a4a527c3 avformat/rpl: Check for EOF and zero framesize
Fixes: Infinite loop
Fixes: 34751/clusterfuzz-testcase-minimized-ffmpeg_dem_RPL_fuzzer-5439330800762880
Fixes: 34774/clusterfuzz-testcase-minimized-ffmpeg_dem_RPL_fuzzer-5851571660390400

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-06-08 18:00:05 +02:00
Michael Niedermayer
29b244ffc1 avformat/rpl: Use 64bit in bitrate computation and check it
Fixes: signed integer overflow: 777777776 * 4 cannot be represented in type 'int'
Fixes: 29102/clusterfuzz-testcase-minimized-ffmpeg_dem_RPL_fuzzer-6726188921913344

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-06-05 16:59:37 +02:00
Gyan Doshi
071930de72 avformat/mov: add option to use tfdt for fragment timestamps. 2021-06-02 10:46:04 +05:30
Joel Linn
127c40c9ca avcodec/movenc: fix spelling in warning message
hldr -> hdlr
2021-06-01 23:49:35 +05:30
Przemysław Sobala
575e52272d lavf/dashenc.c: Fix creating audio-only HLS playlists
With audio/video HLS playlists, audio chunklists are treated as
alternative renditions for video chunklists. This is wrong for
audio-only HLS playlists.

fixes: 9252
2021-06-01 11:58:26 +05:30
Gyan Doshi
51f1194eda avformat/hls: relay format options to segment demuxer
Signed-off-by: Gyan Doshi <ffmpeg@gyani.pro>
Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
2021-05-30 09:21:19 +05:30
Michael Niedermayer
4c1afa2925 avformat/movenc: Check pal_size before use
Fixes: assertion failure
Fixes: out of array read
Fixes: Ticket8190
Fixes: CVE-2020-22015

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-05-29 20:14:24 +02:00
Michael Niedermayer
f8611ae1ef avformat/avio: Check av_opt_copy() for failure
Fixes: CID1477416 Unchecked return value

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-05-27 17:41:36 +02:00
Michael Niedermayer
36a3a5050a avformat/moflex: Remove unneeded format variable
Fixes: CID1477423 Uninitialized scalar variable

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-05-27 17:41:04 +02:00
Anton Khirnov
9d4c018497 avio: do not export avpriv_io_{move,delete}
They are private and not used by anything outside of lavf. There is no
reason for them to be exported.
2021-05-22 15:27:55 +02:00
Ubaldo Porcheddu
36b16a30db avformat/mpegtsenc: add NIT support
With some minor changes by Marton Balint:
 - removed trailing whitespace
 - fixed network_descriptors_length
 - fixed reserved_future_use flag in the start of the section
 - removed unused program variable
 - emit first NIT after PAT
 - some other cosmetics

Signed-off-by: Ubaldo Porcheddu <ubaldo@eja.it>
Signed-off-by: Marton Balint <cus@passwd.hu>
2021-05-20 23:07:46 +02:00
Marton Balint
f597041d57 avformat/flvdec: use milisecond precision for parsing timestamps
Also use helper function to set the timestamp. Maybe we could also use
nanosecond precision, but there were some float rounding concerns.

Signed-off-by: Marton Balint <cus@passwd.hu>
2021-05-20 20:39:14 +02:00
Valerii Zapodovnikov
ab658db4d0 libavformat/hlsenc: fix typos in comments 2021-05-20 09:25:15 +05:30
Michael Niedermayer
3e44bd068f avformat/fifo: check for flushed packets and timeshift
Fixes: CID1464151 Dereference after null check

Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-05-18 19:11:50 +02:00
James Almer
a42d249c91 avformat/framecrcenc: print basic side data information again
This partially reverts c6ae560a18.

Signed-off-by: James Almer <jamrial@gmail.com>
2021-05-18 10:18:49 -03:00
Steven Liu
59032494e8 Revert "avformat/hlsenc: compute video_keyframe_size after write keyframe"
This reverts commit b5ca8f2c66.

This commit will make new problem about tickets: 9193,9205
It flush data into file with init file context together,
and it can get keyframe size, maybe need more method to get keyframe
size.

Signed-off-by: Steven Liu <liuqi05@kuaishou.com>
2021-05-15 15:27:58 +08:00
Andreas Rheinhardt
6ff2aba088 avformat/utils: Fix NPD when allocating AVStreamInternal fails
Regression since b9c5fdf6027010d15ee90a43aa023e45a5189097;
fixes Coverity ID #1484786.

Also remove the check for st->internal->parser as av_parser_close(NULL)
is a no-op.

Reviewed-by: James Almer <jamrial@gmail.com>
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-05-13 22:50:53 +02:00
Peter Ross
b5ea0980c5 fix broken links to msdn documentation
Signed-off-by: Peter Ross <pross@xvid.org>
2021-05-13 09:13:03 +10:00
Michael Niedermayer
9548dc74d8 avformat/mov: Ignore duplicate CoLL
Fixes: memleak
Fixes: 32146/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5377612845285376

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-05-12 23:00:07 +02:00
Michael Niedermayer
299a56c900 avformat/mov: Limit nb_chapter_tracks to input size
Fixes: Timeout (15k loop iterations instead of 400m)
Fixes: 31368/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6601583174483968

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-05-12 23:00:07 +02:00
Michael Niedermayer
578633fc1a avformat/utils: Use 64bit earlier in r_frame_rate check
Fixes: signed integer overflow: 1406796319 * 2 cannot be represented in type 'int'
Fixes: 32777/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-5632576913014784

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-05-12 23:00:07 +02:00
Anton Khirnov
6a9a4f34bd lavf/flvdec: normalize exporting date metadata
Export them in UTC, not the local timezone. This way the output is
the same everywhere. The timezone information stored in the file is
still ignored, since there seems to be no simple way to export it
correctly.

Format them according to ISO 8601, which we generally use for exporting
dates.

Fixes fate-flv-demux, which was broken since
958bea5248 on some platforms.
2021-05-12 20:19:02 +02:00
Zane van Iperen
dcb285d2b7
avformat: add Argonaut Games CVG muxer
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
2021-05-12 20:27:02 +10:00
Zane van Iperen
9789ea59d0
avformat: add Argonaut Games CVG demuxer
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
2021-05-12 20:25:50 +10:00
Anton Khirnov
c6ae560a18 lavf/framecrcenc: do not hash side data
There are no guarantees that all side data types have the same
representation on all platforms.

Tests that change output due to this:

id3v2-priv-remux, cover-art-mp3-id3v2-remux, gapless-mp3: SKIP_SAMPLES,
which is tested by fate-gapless-mp3-side-data

matroska-vp8-alpha-remux: MATROSKA_BLOCKADDITIONAL, which is tested by
remux itself (side data is written into output)

matroska-mastering-display-metadata: MASTERING_DISPLAY_METADATA and
CONTENT_LIGHT_LEVEL, which are tested by ffprobe invocation in the same
test

matroska-spherical-mono-remux: STEREO3D and SPHERICAL, which are tested
by ffprobe invocation in the same test

segment-mp4-to-ts: MPEGTS_STREAM_ID, which is tested by ts remuxing
tests

webm-webvtt-remux: WEBVTT_IDENTIFIER/SETTINGS, which is tested by the
ffprobe invocation in the same test

mxf-d10-user-comments: CPB_PROPERTIES, which is tested by mxf-probe-d10

mov-cover-image: SKIP_SAMPLES, which is tested for mov by
mov-aac-2048-priming

copy-trac3074: AUDIO_SERVICE_TYPE, which is tested by fate-hls-fmp4_ac3
2021-05-09 11:07:20 +02:00
Cameron Cawley
bc86515c4f
avformat/rpl: Support files containing Replay IMA ADPCM audio
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
2021-05-09 17:01:34 +10:00
Jan Ekström
ffd1316e44 avformat/matroskadec: remove special handling of av1c extradata
Libavcodec can now handle the standard AV1CodecConfigurationRecord
extradata as-is.
2021-05-08 15:27:00 +03:00
Jan Ekström
45e3b6a68b avformat/mov: remove special handling of av1c extradata
Libavcodec can now handle the AV1CodecConfigurationRecord structure
as-is when passed as extradata, so the standard behavior of
read-box-into-extradata should suffice, just like with AVC and HEVC.
2021-05-08 15:27:00 +03:00
Limin Wang
eb390d7f9d avformat/hls: use av_strncasecmp()
Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-05-07 23:23:23 +08:00
James Almer
f140239777 avformat: move AVStream.stream_identifier to AVStreamInternal
It's a private field, no reason to have it exposed in a public header.

Signed-off-by: James Almer <jamrial@gmail.com>
2021-05-07 09:27:22 -03:00
James Almer
7489f63281 avformat: move AVStream.codec_info_nb_frames to AVStreamInternal
It's a private field, no reason to have it exposed in a public header.

Signed-off-by: James Almer <jamrial@gmail.com>
2021-05-07 09:27:21 -03:00
James Almer
b9c5fdf602 avformat: move AVStream.{parser,need_parsing} to AVStreamInternal
Those are private fields, no reason to have them exposed in a public
header.

Signed-off-by: James Almer <jamrial@gmail.com>
2021-05-07 09:27:21 -03:00
James Almer
fab2ed4704 avformat: move AVStream.probe_packets to AVStreamInternal
It's a private fields, no reason to have it exposed in a public header.

Signed-off-by: James Almer <jamrial@gmail.com>
2021-05-07 09:27:20 -03:00
James Almer
1262f67cca avformat: move AVStream.last-IP_{pts,duration} to AVStreamInternal
Those are private fields, no reason to have them exposed in a public
header.

Signed-off-by: James Almer <jamrial@gmail.com>
2021-05-07 09:27:20 -03:00
James Almer
74dce63f9a avformat/utils: constrain the lifetime of the pointer returned by avformat_index_get_entry()
This will give us more room to improve the implementation later.

Suggested-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-05-06 15:26:56 -03:00
James Almer
55475b3289 avformat/mov: don't save a copy of the packet's AVBufferRef on DV streams
It's no longer needed.

Signed-off-by: James Almer <jamrial@gmail.com>
2021-05-06 09:44:42 -03:00
James Almer
42895f590a avformat/avidec: don't save a copy of the packet's AVBufferRef on DV streams
It's no longer needed.

Signed-off-by: James Almer <jamrial@gmail.com>
2021-05-06 09:44:42 -03:00
James Almer
57aaeff523 avformat/dv: stop using av_init_packet()
Signed-off-by: James Almer <jamrial@gmail.com>
2021-05-06 09:44:42 -03:00
Zane van Iperen
2329f7f21e
avformat/rpl: cosmetics
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
2021-05-06 11:06:43 +10:00
Gyan Doshi
8ab2bb81b2 avformat/hlsenc: correct log text and supply packet details 2021-05-05 20:26:38 +05:30
Michael Niedermayer
0ff60249a5 avformat/mvdec: Check sample rate in parse_audio_var()
Fixes: signed integer overflow: -635424002382840000 * 16 cannot be represented in type 'long'
Fixes: 33612/clusterfuzz-testcase-minimized-ffmpeg_dem_MV_fuzzer-5704741108711424

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>
2021-05-04 17:55:24 +02:00
Justin Ruggles
c75dfa0435 movenc: add movie_timescale option instead of hardcoding 1000
There are cases where using 1000 as the MP4 timescale is not
accurate enough, for example when one needs sample-accurate audio
handling.

This adds a new AVOption to the MOV/MP4 muxer to override the
movie timescale, but it still defaults to 1000 to maintain current
default behavior.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2021-05-04 15:32:26 +02:00
Andreas Rheinhardt
4796ec5d4e avformat/dump: Remove remnants of codec timebase
Fixes Coverity issue #1477414.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-04-30 10:21:29 +02:00
zheng qian
86a71d897f avformat/mpegtsenc: Fix indentation inside if-clause in mpegts_write_pes()
Fix indentation caused by the added stream_id check.

Signed-off-by: zheng qian <xqq@xqq.im>
Signed-off-by: Marton Balint <cus@passwd.hu>
2021-04-28 21:35:46 +02:00
zheng qian
6ad61e30a1 avformat/mpegtsenc: Fix mpegts_write_pes() for private_stream_2 and other types
According to the PES packet definition defined in Table 2-17 of ISO_IEC_13818-1
specification, some fields like PTS/DTS or pes_extension could only appears if
the stream_id meets the condition:

if (stream_id != 0xBC &&  // program_stream_map
    stream_id != 0xBE &&  // padding_stream
    stream_id != 0xBF &&  // private_stream_2
    stream_id != 0xF0 &&  // ECM
    stream_id != 0xF1 &&  // EMM
    stream_id != 0xFF &&  // program_stream_directory
    stream_id != 0xF2 &&  // DSMCC_stream
    stream_id != 0xF8)    // ITU-T Rec. H.222.1 type E stream

And the following stream_id types don't have fields like PTS/DTS:

else if ( stream_id == program_stream_map
|| stream_id == private_stream_2
|| stream_id == ECM
|| stream_id == EMM
|| stream_id == program_stream_directory
|| stream_id == DSMCC_stream
|| stream_id == ITU-T Rec. H.222.1 type E stream ) {
    for (i = 0; i < PES_packet_length; i++) {
        PES_packet_data_byte
    }
}

Current implementation skipped the check of stream_id causing some kind of
streams like private_stream_2 to be incorrectly written with actually a
private_stream_1-like PES header with PTS/DTS field. For example, Japan DTV
transmits news and alerts through ARIB superimpose that utilizes
private_stream_2 still could not be remuxed correctly for now.

This patch set fixes the remuxing for private_stream_2 and
other stream_id types.

Signed-off-by: zheng qian <xqq@xqq.im>
Signed-off-by: Marton Balint <cus@passwd.hu>
2021-04-28 21:32:22 +02:00
zheng qian
f01286957e avformat/mpegts: Fix indentation for stream_id constants
Signed-off-by: zheng qian <xqq@xqq.im>
Signed-off-by: Marton Balint <cus@passwd.hu>
2021-04-28 21:24:45 +02:00
zheng qian
f4df5039a7 avformat/mpegts: Add missing constants for MPEG-TS stream_id definitions
Signed-off-by: zheng qian <xqq@xqq.im>
Signed-off-by: Marton Balint <cus@passwd.hu>
2021-04-28 21:24:45 +02:00
Marton Balint
3f27021143 avformat/mpegtsenc: factorize determining pes stream id
Signed-off-by: Marton Balint <cus@passwd.hu>
2021-04-28 21:24:44 +02:00
Marton Balint
b9fff6e15e avformat/mpegtsenc: move is_dvb_subtitle/is_dvb_teletext initialization upwards
Signed-off-by: Marton Balint <cus@passwd.hu>
2021-04-28 21:24:44 +02:00
Andreas Rheinhardt
bc70684e74 avformat: Constify all muxer/demuxers
This is possible now that the next-API is gone.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 11:48:06 -03:00
Anton Khirnov
85ba17f36d Bump major versions of all libraries.
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-04-27 11:48:05 -03:00
James Almer
0bf3a7361d avutil: remove deprecated AVClass.child_class_next
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 11:48:04 -03:00
James Almer
3749eede66 avformat: remove deprecated AVStream.codec
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 11:47:24 -03:00
Andreas Rheinhardt
46dac8cf3d avformat/avformat, utils: Make av_find_best_stream const-correct
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:14 -03:00
Andreas Rheinhardt
14fa0a4efb avformat/avformat: Constify AVFormatContext.*_codec pointers
This also allows to exclusively use pointers to const AVCodec in
fftools/ffmpeg_opt.c.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:13 -03:00
Andreas Rheinhardt
ef6a9e5e31 avutil/buffer: Switch AVBuffer API to size_t
Announced in 14040a1d91.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:13 -03:00
Andreas Rheinhardt
e83717e63e avformat: Switch AVChapter.id to 64bits
Announced in e318438f2f.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:10 -03:00
Andreas Rheinhardt
0a071f7124 avformat: Remove deprecated av_demuxer_open()
Deprecate in e37f161e66.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:10 -03:00
Andreas Rheinhardt
e8876bdcf3 avformat: Remove deprecated AVFMT_FLAG_MP4A_LATM flag, latm option
Deprecated in 67747c89ad.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:09 -03:00
Andreas Rheinhardt
e5bcda6473 avformat/dashenc: Remove deprecated min_seg_duration option
Deprecated in 01ba52852d.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:09 -03:00
Andreas Rheinhardt
6f34f03190 avformat/rtsp: Remove deprecated old options, rename stimeout->timeout
Deprecated in ff46124b0d.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:09 -03:00
Andreas Rheinhardt
252500a78f avformat/aviobuf: End grace period of allowing 0 from read_packet
See a606f27f4c.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:09 -03:00
Andreas Rheinhardt
7b6012efaa avformat/mov, movenc: Stop exporting rotation via metadata
Deprecated in ddef3d902f.

(The reference file of the mov-zombie test needed to be updated, because
a rotate metadata tag is no longer exported; the side-data is of course
still present.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:09 -03:00
Andreas Rheinhardt
a3439de874 avformat: Remove remnants of side data merging
Deprecated in d682ae70b4,
ineffective since ca4df37f06.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:09 -03:00
Andreas Rheinhardt
2086d635c3 avformat/hlsenc: Remove deprecated localtime options
Deprecated in fbd8746efa.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:09 -03:00
Andreas Rheinhardt
41181bc4a0 avformat/hlsenc: Remove deprecated wrap option
Deprecated in d96ebc5ef8.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:09 -03:00
Andreas Rheinhardt
dc8e15ef15 avformat/http: Remove deprecated "user-agent" option
Deprecated in 27714b462d.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:09 -03:00
Andreas Rheinhardt
11cb635c84 avformat/avformat: Remove outdated private fields
Affected function pointers (always NULL) in AVInputFormat,
AVOutputFormat as well as private fields of AVStream.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:09 -03:00
Andreas Rheinhardt
30f7021aa0 avformat: Remove deprecated filename field from AVFormatContext
Deprecated in fa8308d3d4.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:09 -03:00
Andreas Rheinhardt
704017d91e avformat: Remove getters and setters
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:09 -03:00