Files
FFmpeg/libavformat
Michael Niedermayer 937051872d 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.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-06-11 17:29:40 +02:00
..
2024-03-31 00:08:43 +01:00
2024-08-28 16:27:54 +02:00
2024-09-24 15:37:15 +02:00
2024-03-31 00:08:43 +01:00
2024-09-19 10:01:02 -03:00
2024-09-19 10:01:02 -03:00
2024-03-31 00:08:43 +01:00
2024-03-26 06:36:43 +01:00
2024-03-31 00:08:43 +01:00
2024-05-09 16:17:39 +02:00
2025-01-23 01:20:17 +01:00
2024-05-25 13:51:27 +02:00
2024-03-31 00:08:43 +01:00
2024-09-19 10:01:02 -03:00
2024-03-31 00:08:43 +01:00
2024-03-11 16:52:42 +01:00
2025-01-03 18:28:42 +01:00
2024-06-19 10:12:50 -03:00
2024-09-19 00:24:27 +02:00
2024-03-31 00:08:43 +01:00
2024-03-26 06:36:43 +01:00
2024-06-04 11:46:27 +02:00
2025-05-12 14:28:09 +08:00
2024-07-21 16:41:23 +02:00
2024-04-17 18:31:06 +05:30
2024-05-01 02:57:12 +02:00
2024-04-06 12:59:56 +02:00
2024-04-06 12:59:56 +02:00
2024-04-06 12:59:56 +02:00
2025-02-26 01:26:32 +01:00
2024-07-21 16:41:32 +02:00
2024-03-31 00:08:43 +01:00
2024-03-31 00:08:43 +01:00
2024-03-31 00:08:43 +01:00
2024-03-31 00:08:43 +01:00
2024-06-04 11:46:27 +02:00
2024-03-31 00:08:43 +01:00
2024-03-31 00:08:43 +01:00
2024-09-04 13:01:37 +02:00
2024-03-31 00:08:43 +01:00
2024-07-21 16:41:43 +02:00
2024-03-31 00:08:43 +01:00
2024-09-19 10:01:02 -03:00
2024-03-31 00:08:43 +01:00
2024-07-02 21:57:24 +02:00
2024-03-31 00:08:43 +01:00
2024-03-15 12:51:15 +01:00
2024-03-15 12:51:15 +01:00
2024-03-15 12:51:15 +01:00
2024-03-31 00:08:43 +01:00
2024-03-31 00:08:43 +01:00
2024-08-14 18:20:58 +02:00
2024-07-21 17:02:11 +02:00
2024-03-31 00:08:43 +01:00
2024-03-31 00:08:43 +01:00
2024-03-31 00:08:43 +01:00
2024-07-21 17:02:11 +02:00
2024-07-07 23:36:33 +02:00
2024-03-26 06:36:43 +01:00
2025-01-23 01:20:19 +01:00
2024-03-26 06:36:43 +01:00
2024-07-21 17:02:12 +02:00
2024-03-31 00:08:43 +01:00