summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
* avformat/rpl: Use 64bit in bitrate computation and check itMichael Niedermayer2021-06-05
| | | | | | | | 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>
* avformat/mov: add option to use tfdt for fragment timestamps.Gyan Doshi2021-06-02
|
* avcodec/movenc: fix spelling in warning messageJoel Linn2021-06-01
| | | | hldr -> hdlr
* lavf/dashenc.c: Fix creating audio-only HLS playlistsPrzemysław Sobala2021-06-01
| | | | | | | | 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
* avformat/hls: relay format options to segment demuxerGyan Doshi2021-05-30
| | | | | Signed-off-by: Gyan Doshi <ffmpeg@gyani.pro> Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/movenc: Check pal_size before useMichael Niedermayer2021-05-29
| | | | | | | | | Fixes: assertion failure Fixes: out of array read Fixes: Ticket8190 Fixes: CVE-2020-22015 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/avio: Check av_opt_copy() for failureMichael Niedermayer2021-05-27
| | | | | | Fixes: CID1477416 Unchecked return value Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/moflex: Remove unneeded format variableMichael Niedermayer2021-05-27
| | | | | | Fixes: CID1477423 Uninitialized scalar variable Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avio: do not export avpriv_io_{move,delete}Anton Khirnov2021-05-22
| | | | | They are private and not used by anything outside of lavf. There is no reason for them to be exported.
* avformat/mpegtsenc: add NIT supportUbaldo Porcheddu2021-05-20
| | | | | | | | | | | | | 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>
* avformat/flvdec: use milisecond precision for parsing timestampsMarton Balint2021-05-20
| | | | | | | 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>
* libavformat/hlsenc: fix typos in commentsValerii Zapodovnikov2021-05-20
|
* avformat/fifo: check for flushed packets and timeshiftMichael Niedermayer2021-05-18
| | | | | | | Fixes: CID1464151 Dereference after null check Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/framecrcenc: print basic side data information againJames Almer2021-05-18
| | | | | | This partially reverts c6ae560a18d67b9ddaa25a0338b7fb55e3312e57. Signed-off-by: James Almer <jamrial@gmail.com>
* Revert "avformat/hlsenc: compute video_keyframe_size after write keyframe"Steven Liu2021-05-15
| | | | | | | | | | | This reverts commit b5ca8f2c66954614d81579082025f580efc0cffc. 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>
* avformat/utils: Fix NPD when allocating AVStreamInternal failsAndreas Rheinhardt2021-05-13
| | | | | | | | | | | | 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>
* fix broken links to msdn documentationPeter Ross2021-05-13
| | | | Signed-off-by: Peter Ross <pross@xvid.org>
* avformat/mov: Ignore duplicate CoLLMichael Niedermayer2021-05-12
| | | | | | | | 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>
* avformat/mov: Limit nb_chapter_tracks to input sizeMichael Niedermayer2021-05-12
| | | | | | | | 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>
* avformat/utils: Use 64bit earlier in r_frame_rate checkMichael Niedermayer2021-05-12
| | | | | | | | 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>
* lavf/flvdec: normalize exporting date metadataAnton Khirnov2021-05-12
| | | | | | | | | | | | | 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 958bea5248f87116b0dd080461aa70c14ea86cf0 on some platforms.
* avformat: add Argonaut Games CVG muxerZane van Iperen2021-05-12
| | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat: add Argonaut Games CVG demuxerZane van Iperen2021-05-12
| | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* lavf/framecrcenc: do not hash side dataAnton Khirnov2021-05-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* avformat/rpl: Support files containing Replay IMA ADPCM audioCameron Cawley2021-05-09
| | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat/matroskadec: remove special handling of av1c extradataJan Ekström2021-05-08
| | | | | Libavcodec can now handle the standard AV1CodecConfigurationRecord extradata as-is.
* avformat/mov: remove special handling of av1c extradataJan Ekström2021-05-08
| | | | | | 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.
* avformat/hls: use av_strncasecmp()Limin Wang2021-05-07
| | | | | Reviewed-by: Steven Liu <lq@chinaffmpeg.org> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat: move AVStream.stream_identifier to AVStreamInternalJames Almer2021-05-07
| | | | | | It's a private field, no reason to have it exposed in a public header. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: move AVStream.codec_info_nb_frames to AVStreamInternalJames Almer2021-05-07
| | | | | | It's a private field, no reason to have it exposed in a public header. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: move AVStream.{parser,need_parsing} to AVStreamInternalJames Almer2021-05-07
| | | | | | | Those are private fields, no reason to have them exposed in a public header. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: move AVStream.probe_packets to AVStreamInternalJames Almer2021-05-07
| | | | | | It's a private fields, no reason to have it exposed in a public header. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: move AVStream.last-IP_{pts,duration} to AVStreamInternalJames Almer2021-05-07
| | | | | | | Those are private fields, no reason to have them exposed in a public header. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/utils: constrain the lifetime of the pointer returned by ↵James Almer2021-05-06
| | | | | | | | | 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>
* avformat/mov: don't save a copy of the packet's AVBufferRef on DV streamsJames Almer2021-05-06
| | | | | | It's no longer needed. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/avidec: don't save a copy of the packet's AVBufferRef on DV streamsJames Almer2021-05-06
| | | | | | It's no longer needed. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/dv: stop using av_init_packet()James Almer2021-05-06
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/rpl: cosmeticsZane van Iperen2021-05-06
| | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat/hlsenc: correct log text and supply packet detailsGyan Doshi2021-05-05
|
* avformat/mvdec: Check sample rate in parse_audio_var()Michael Niedermayer2021-05-04
| | | | | | | | | 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>
* movenc: add movie_timescale option instead of hardcoding 1000Justin Ruggles2021-05-04
| | | | | | | | | | | | 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>
* avformat/dump: Remove remnants of codec timebaseAndreas Rheinhardt2021-04-30
| | | | | | | Fixes Coverity issue #1477414. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/mpegtsenc: Fix indentation inside if-clause in mpegts_write_pes()zheng qian2021-04-28
| | | | | | | 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>
* avformat/mpegtsenc: Fix mpegts_write_pes() for private_stream_2 and other typeszheng qian2021-04-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* avformat/mpegts: Fix indentation for stream_id constantszheng qian2021-04-28
| | | | | Signed-off-by: zheng qian <xqq@xqq.im> Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mpegts: Add missing constants for MPEG-TS stream_id definitionszheng qian2021-04-28
| | | | | Signed-off-by: zheng qian <xqq@xqq.im> Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mpegtsenc: factorize determining pes stream idMarton Balint2021-04-28
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mpegtsenc: move is_dvb_subtitle/is_dvb_teletext initialization upwardsMarton Balint2021-04-28
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat: Constify all muxer/demuxersAndreas Rheinhardt2021-04-27
| | | | | | | 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>
* Bump major versions of all libraries.Anton Khirnov2021-04-27
| | | | | Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>