Michael Niedermayer 5d0dfdadb0 Revert "avformat/mpegts: update stream info when PMT ES stream_type changes"
This fixes mixing up contexts, use of uninitialized data and crashes.
More specifically:

==1001752== Conditional jump or move depends on uninitialised value(s)
==1001752==    at 0xA9ED82: avpriv_h264_has_num_reorder_frames (h264dec.c:64)
==1001752==    by 0x668C7E: has_decode_delay_been_guessed (demux.c:757)
==1001752==    by 0x66AB13: compute_pkt_fields (demux.c:1137)
==1001752==    by 0x66B2E9: parse_packet (demux.c:1265)
==1001752==    by 0x66BD84: read_frame_internal (demux.c:1449)
==1001752==    by 0x67085B: avformat_find_stream_info (demux.c:2692)
==1001752==    by 0x25157C: ifile_open (ffmpeg_demux.c:1814)
==1001752==    by 0x272B15: open_files (ffmpeg_opt.c:1366)
==1001752==    by 0x272D85: ffmpeg_parse_options (ffmpeg_opt.c:1415)
==1001752==    by 0x2925C9: main (ffmpeg.c:991)
==1001752==  Uninitialised value was created by a heap allocation
==1001752==    at 0x483E0F0: memalign (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==1001752==    by 0x483E212: posix_memalign (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==1001752==    by 0x14882CE: av_malloc (mem.c:107)
==1001752==    by 0x1463785: av_buffer_alloc (buffer.c:82)
==1001752==    by 0x146423F: pool_alloc_buffer (buffer.c:369)
==1001752==    by 0x14643C4: av_buffer_pool_get (buffer.c:407)
==1001752==    by 0x752C4B: buffer_pool_get (mpegts.c:1142)
==1001752==    by 0x7538F2: mpegts_push_data (mpegts.c:1407)
==1001752==    by 0x758893: handle_packet (mpegts.c:2909)
==1001752==    by 0x758E90: handle_packets (mpegts.c:3048)
==1001752==    by 0x759B1D: mpegts_read_packet (mpegts.c:3290)
==1001752==    by 0x6687A3: ff_read_packet (demux.c:649)
==1001752==    by 0x66B594: read_frame_internal (demux.c:1346)
==1001752==    by 0x67085B: avformat_find_stream_info (demux.c:2692)
==1001752==    by 0x25157C: ifile_open (ffmpeg_demux.c:1814)
==1001752==    by 0x272B15: open_files (ffmpeg_opt.c:1366)
==1001752==    by 0x272D85: ffmpeg_parse_options (ffmpeg_opt.c:1415)
==1001752==    by 0x2925C9: main (ffmpeg.c:991)

Found-by: Alexander A. Shvedov <shvedov@gmx.com>
CC: Pavel Koshevoy <pkoshevoy@gmail.com>
This reverts commit 0021484d05.
2025-06-11 12:15:25 +02:00
2024-07-24 16:52:39 +02:00
2024-12-07 02:37:17 -05:00
2024-07-24 16:52:26 +02:00
2023-10-29 16:19:39 +01:00
2022-03-17 18:35:41 -03:00
2024-08-02 00:57:11 +02:00
2023-03-01 21:59:10 +01:00
2019-01-31 10:29:16 -09:00
2019-12-28 11:20:48 +01:00
2024-12-07 02:37:17 -05:00
2024-04-15 01:02:08 +02:00

FFmpeg README

FFmpeg is a collection of libraries and tools to process multimedia content such as audio, video, subtitles and related metadata.

Libraries

  • libavcodec provides implementation of a wider range of codecs.
  • libavformat implements streaming protocols, container formats and basic I/O access.
  • libavutil includes hashers, decompressors and miscellaneous utility functions.
  • libavfilter provides means to alter decoded audio and video through a directed graph of connected filters.
  • libavdevice provides an abstraction to access capture and playback devices.
  • libswresample implements audio mixing and resampling routines.
  • libswscale implements color conversion and scaling routines.

Tools

  • ffmpeg is a command line toolbox to manipulate, convert and stream multimedia content.
  • ffplay is a minimalistic multimedia player.
  • ffprobe is a simple analysis tool to inspect multimedia content.
  • Additional small tools such as aviocat, ismindex and qt-faststart.

Documentation

The offline documentation is available in the doc/ directory.

The online documentation is available in the main website and in the wiki.

Examples

Coding examples are available in the doc/examples directory.

License

FFmpeg codebase is mainly LGPL-licensed with optional components licensed under GPL. Please refer to the LICENSE file for detailed information.

Contributing

Patches should be submitted to the ffmpeg-devel mailing list using git format-patch or git send-email. Github pull requests should be avoided because they are not part of our review process and will be ignored.

Description
No description provided
Readme 290 MiB
Languages
C 89.9%
Assembly 8.1%
Makefile 1.3%
C++ 0.3%
Objective-C 0.1%
Other 0.1%