Opened 10 years ago
Closed 10 years ago
#3584 closed defect (fixed)
Memleak when probing broken transport stream
Reported by: | Carl Eugen Hoyos | Owned by: | Marton Balint |
---|---|---|---|
Priority: | normal | Component: | avformat |
Version: | git-master | Keywords: | mpegts leak |
Cc: | cus@passwd.hu | Blocked By: | |
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | yes |
Description
A user uploaded a transport stream that leaks memory on probing with FFmpeg:
$ valgrind --leak-check=full ./ffmpeg_g -i sf_1d5644675da539e30f3c1ac570e32c77_cut.m2ts ==5543== Memcheck, a memory error detector ==5543== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al. ==5543== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info ==5543== Command: ./ffmpeg_g -i sf_1d5644675da539e30f3c1ac570e32c77_cut.m2ts ==5543== ffmpeg version N-62649-g1ba59b1 Copyright (c) 2000-2014 the FFmpeg developers built on Apr 23 2014 15:36:28 with gcc 4.7 (SUSE Linux) configuration: --enable-gpl libavutil 52. 78.100 / 52. 78.100 libavcodec 55. 58.105 / 55. 58.105 libavformat 55. 37.101 / 55. 37.101 libavdevice 55. 13.100 / 55. 13.100 libavfilter 4. 4.100 / 4. 4.100 libswscale 2. 6.100 / 2. 6.100 libswresample 0. 18.100 / 0. 18.100 libpostproc 52. 3.100 / 52. 3.100 [mpegts @ 0xacaf060] Failed to open codec in av_find_stream_info Last message repeated 1 times [mpegts @ 0xacaf060] PES packet size mismatch [dca @ 0xacd78c0] Not a valid DCA frame [mpegts @ 0xacaf060] PES packet size mismatch Last message repeated 1 times [dca @ 0xacd78c0] Not a valid DCA frame [mpegts @ 0xacaf060] PES packet size mismatch [dca @ 0xacd85c0] error decoding block [mpegts @ 0xacaf060] PES packet size mismatch [dca @ 0xacd78c0] error decoding block [mpegts @ 0xacaf060] PES packet size mismatch [dca @ 0xacd85c0] Invalid bit allocation index [dca @ 0xacd85c0] error decoding block [mpegts @ 0xacaf060] PES packet size mismatch Last message repeated 33 times [mpegts @ 0xacaf060] probed stream 11 failed [mpegts @ 0xacaf060] probed stream 12 failed [mpegts @ 0xacaf060] Invalid timestamps stream=0, pts=52283080, dts=54045045, size=2370 [mpegts @ 0xacaf060] DTS 53605061 < 54056306 out of order [dca @ 0xacd85c0] error decoding block Last message repeated 1 times [dca @ 0xacd78c0] ERROR: block code look-up failed [dca @ 0xacd78c0] error decoding block [mpegts @ 0xacaf060] DTS discontinuity in stream 2: packet 3 with DTS 54019584, packet 4 with DTS 6496473984 [dca @ 0xacd85c0] LFEScaleIndex larger than 127 is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented. [dca @ 0xacd85c0] If you want to help, upload a sample of this file to ftp://upload.ffmpeg.org/MPlayer/incoming/ and contact the ffmpeg-devel mailing list. [dca @ 0xacd85c0] error decoding block [mpegts @ 0xacaf060] Invalid timestamps stream=0, pts=54086336, dts=54095254, size=35607 [dca @ 0xacd78c0] error decoding block [dca @ 0xacd85c0] LFEScaleIndex larger than 127 is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented. [dca @ 0xacd85c0] If you want to help, upload a sample of this file to ftp://upload.ffmpeg.org/MPlayer/incoming/ and contact the ffmpeg-devel mailing list. [dca @ 0xacd85c0] error decoding block [dca @ 0xacd78c0] error decoding block [dca @ 0xacd85c0] error decoding block [mp3 @ 0xafa3140] Header missing [mp3 @ 0xb324d40] Header missing [mpegts @ 0xacaf060] decoding for stream 1 failed [mpegts @ 0xacaf060] decoding for stream 2 failed [mpegts @ 0xacaf060] decoding for stream 9 failed [mpegts @ 0xacaf060] decoding for stream 10 failed [NULL @ 0xacda000] start time for stream 4 is not set in estimate_timings_from_pts [NULL @ 0xacdad80] start time for stream 5 is not set in estimate_timings_from_pts [NULL @ 0xacdc8a0] start time for stream 7 is not set in estimate_timings_from_pts [mpegts @ 0xacaf060] PES packet size mismatch Last message repeated 17 times [mpegts @ 0xacaf060] Could not find codec parameters for stream 1 (Audio: dts ([134][0][0][0] / 0x0086), 48000 Hz, 0 channels, fltp, 1536 kb/s): unspecified number of channels Consider increasing the value for the 'analyzeduration' and 'probesize' options [mpegts @ 0xacaf060] Could not find codec parameters for stream 2 (Audio: dts ([134][0][0][0] / 0x0086), 48000 Hz, 0 channels, fltp, 1536 kb/s): unspecified number of channels Consider increasing the value for the 'analyzeduration' and 'probesize' options [mpegts @ 0xacaf060] Could not find codec parameters for stream 4 (Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)): unspecified size Consider increasing the value for the 'analyzeduration' and 'probesize' options [mpegts @ 0xacaf060] Could not find codec parameters for stream 5 (Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)): unspecified size Consider increasing the value for the 'analyzeduration' and 'probesize' options [mpegts @ 0xacaf060] Could not find codec parameters for stream 7 (Audio: dts ([162][0][0][0] / 0x00A2), 0 channels, fltp): unspecified sample rate Consider increasing the value for the 'analyzeduration' and 'probesize' options [mpegts @ 0xacaf060] Could not find codec parameters for stream 8 (Video: vc1 (VC-1 / 0x312D4356)): unspecified size Consider increasing the value for the 'analyzeduration' and 'probesize' options [mpegts @ 0xacaf060] Could not find codec parameters for stream 9 (Audio: mp3, 0 channels, s16p): unspecified frame size Consider increasing the value for the 'analyzeduration' and 'probesize' options [mpegts @ 0xacaf060] Could not find codec parameters for stream 10 (Audio: mp3, 0 channels, s16p): unspecified frame size Consider increasing the value for the 'analyzeduration' and 'probesize' options [mpegts @ 0xacaf060] Could not find codec parameters for stream 11 (Unknown: none): unknown codec Consider increasing the value for the 'analyzeduration' and 'probesize' options [mpegts @ 0xacaf060] Could not find codec parameters for stream 12 (Unknown: none): unknown codec Consider increasing the value for the 'analyzeduration' and 'probesize' options Input #0, mpegts, from 'sf_1d5644675da539e30f3c1ac570e32c77_cut.m2ts': Duration: 23:11:53.79, start: 600.170667, bitrate: 0 kb/s Program 1 Stream #0:0[0x1011]: Video: vc1 (VC-1 / 0x312D4356), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc Stream #0:1[0x1100]: Audio: dts ([134][0][0][0] / 0x0086), 48000 Hz, 0 channels, fltp, 1536 kb/s Stream #0:2[0x1101]: Audio: dts ([134][0][0][0] / 0x0086), 48000 Hz, 0 channels, fltp, 1536 kb/s Stream #0:3[0x1102]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 224 kb/s Stream #0:4[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090) Stream #0:5[0x1201]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090) Stream #0:6[0x1202]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080 Stream #0:7[0x1a00]: Audio: dts ([162][0][0][0] / 0x00A2), 0 channels, fltp Stream #0:8[0x1b00]: Video: vc1 (VC-1 / 0x312D4356), 23.98 tbr, 90k tbn, 90k tbc No Program Stream #0:9[0x113d]: Audio: mp3, 0 channels, s16p Stream #0:10[0x10b0]: Audio: mp3, 0 channels, s16p Stream #0:11[0xd00]: Unknown: none Stream #0:12[0x1911]: Unknown: none At least one output file must be specified ==5543== ==5543== HEAP SUMMARY: ==5543== in use at exit: 171 bytes in 5 blocks ==5543== total heap usage: 1,486 allocs, 1,481 frees, 9,930,458 bytes allocated ==5543== ==5543== 91 (24 direct, 67 indirect) bytes in 1 blocks are definitely lost in loss record 5 of 5 ==5543== at 0x4C290FE: memalign (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==5543== by 0x4C291A7: posix_memalign (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==5543== by 0xD68B91: av_mallocz (mem.c:95) ==5543== by 0xD5B8A7: av_buffer_alloc (buffer.c:47) ==5543== by 0x5835E5: mpegts_push_data (mpegts.c:964) ==5543== by 0x582343: handle_packet (mpegts.c:2121) ==5543== by 0x582949: handle_packets (mpegts.c:2263) ==5543== by 0x5829D3: mpegts_read_packet (mpegts.c:2495) ==5543== by 0x5EDCF5: ff_read_packet (utils.c:777) ==5543== by 0x5F029F: read_frame_internal (utils.c:1440) ==5543== by 0x5F3E26: avformat_find_stream_info (utils.c:3175) ==5543== by 0x475EA8: open_input_file (ffmpeg_opt.c:861) ==5543== ==5543== LEAK SUMMARY: ==5543== definitely lost: 24 bytes in 1 blocks ==5543== indirectly lost: 67 bytes in 2 blocks ==5543== possibly lost: 0 bytes in 0 blocks ==5543== still reachable: 80 bytes in 2 blocks ==5543== suppressed: 0 bytes in 0 blocks ==5543== Reachable blocks (those to which a pointer was found) are not shown. ==5543== To see them, rerun with: --leak-check=full --show-reachable=yes ==5543== ==5543== For counts of detected and suppressed errors, rerun with: -v ==5543== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 2 from 2)
Attachments (1)
Change History (3)
by , 10 years ago
Attachment: | sf_1d5644675da539e30f3c1ac570e32c77_cut.m2ts added |
---|
comment:1 by , 10 years ago
Analyzed by developer: | set |
---|---|
Cc: | added |
Owner: | set to |
Reproduced by developer: | set |
Status: | new → open |
comment:2 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | open → closed |
Note:
See TracTickets
for help on using tickets.
Fixed by Marton in 6c537510