Opened 3 months ago

Last modified 7 weeks ago

#8005 new defect

Assertion fails when reading rtp mpegts streaming using SDP file

Reported by: maf Owned by:
Priority: important Component: avformat
Version: git-master Keywords: sdp mpegts crash abort
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


Summary of the bug:
You get assertion failure when you try to open a RTP mpegts stream using SDP file.

The problem is that function handle_packet() in avformat/mpegts.c is calling avio_tell(). This is incorrect when it is called from avpriv_mpegts_parse_packet(). In this case the "pb" is not the actual input stream. It is the SDP file!

How to reproduce:

ffplay version N-94212-g98b122cdb9 Copyright (c) 2003-2019 the FFmpeg developers

  built with gcc 9.1.1 (GCC) 20190621
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfi
g --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libb
luray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enab
le-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --e
nable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable
-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 -
-enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enab
le-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --en
able-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --en
able-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --e
nable-dxva2 --enable-avisynth --enable-libopenmpt
  libavutil      56. 30.100 / 56. 30.100
  libavcodec     58. 53.101 / 58. 53.101
  libavformat    58. 28.101 / 58. 28.101
  libavdevice    58.  7.100 / 58.  7.100
  libavfilter     7. 56.101 /  7. 56.101
  libswscale      5.  4.101 /  5.  4.101
  libswresample   3.  4.100 /  3.  4.100
  libpostproc    55.  4.100 / 55.  4.100
[udp @ 00000000004ec100] 'circular_buffer_size' option was set but it is not sup
ported on this build (pthread support is required)
[udp @ 00000000004ec200] 'circular_buffer_size' option was set but it is not sup
ported on this build (pthread support is required)
Assertion pos >= 188 failed at src/libavformat/mpegts.c:2653

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

Change History (1)

comment:1 Changed 7 weeks ago by cehoyos

  • Keywords crash abort added; rtp assertion removed
  • Priority changed from normal to important

If this issue is still reproducible with current FFmpeg git head, please provide the complete, uncut console output together with the command line you tested.

Note: See TracTickets for help on using tickets.