Opened 4 years ago

Closed 4 years ago

#3547 closed defect (fixed)

Assertion failed when DTS out of order in asfenc.c

Reported by: wim_arbor Owned by:
Priority: important Component: avformat
Version: git-master Keywords: asf crash abort regression
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Summary of the bug:
A transcoding of a ts with a signal loss to asf results in a Assertion asf->packet_timestamp_end >= asf->packet_timestamp_start failed at libavformat/asfenc.c:704 and causing an APPCRASH popup in windows. The last two PTS of the video stream are 4322553629 and 4322551520, which is out of order. Adding -fflags +genpts+igndts still produces the same result.

How to reproduce:

E:\temp>ffmpeg -y -i sat_uplink_signalloss.ts test.asf
ffmpeg version N-62318-ge1c48e3 Copyright (c) 2000-2014 the FFmpeg developers
  built on Apr 10 2014 16:32:53 with gcc 4.8.2 (GCC)
  configuration: --pkg-config=pkg-config --prefix=/home/arbor/software/packages/win32 --enable-memalign-hack --arch=x86 --target-os=mingw32 --cross-prefix=i686-w64-mingw32- --disable-w32threads
  libavutil      52. 75.100 / 52. 75.100
  libavcodec     55. 58.103 / 55. 58.103
  libavformat    55. 36.103 / 55. 36.103
  libavdevice    55. 11.100 / 55. 11.100
  libavfilter     4.  3.100 /  4.  3.100
  libswscale      2.  6.100 /  2.  6.100
  libswresample   0. 18.100 /  0. 18.100
[mpeg2video @ 03728f40] Invalid frame dimensions 0x0.
    Last message repeated 8 times
[mpegts @ 0370be60] PES packet size mismatch
Input #0, mpegts, from 'sat_uplink_signalloss.ts':
  Duration: 00:00:27.46, start: 48025.799111, bitrate: 547 kb/s
  Program 1
    Stream #0:0[0x44]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 128 kb/s
    Stream #0:1[0x45]: Video: mpeg2video (4:2:2) ([2][0][0][0] / 0x0002), yuv422p(tv), 720x576 [SAR 16:15 DAR 4:3], max. 3400 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
Output #0, asf, to 'test.asf':
  Metadata:
    WM/EncodingSettings: Lavf55.36.103
    Stream #0:0: Video: msmpeg4v3 (msmpeg4) (MP43 / 0x3334504D), yuv420p, 720x576 [SAR 16:15 DAR 4:3], q=2-31, 200 kb/s, 1k tbn, 25 tbc
    Stream #0:1: Audio: wmav2 (a[1][0][0] / 0x0161), 48000 Hz, stereo, fltp, 128 kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (mpeg2video -> msmpeg4)
  Stream #0:0 -> #0:1 (mp2 -> wmav2)
Press [q] to stop, [?] for help
[mpegts @ 0370be60] PES packet size mismatchime=00:00:23.21 bitrate= 317.9kbits/s dup=12 drop=0
[mpegts @ 0370be60] DTS 4322551520 < 4322553629 out of order
[mp2 @ 003fa540] incomplete frame
Error while decoding stream #0:0: Invalid data found when processing input
[mpeg2video @ 03728f40] ac-tex damaged at 18 10
[mpeg2video @ 03728f40] Warning MVs not available
[mpeg2video @ 03728f40] concealing 1170 DC, 1170 AC, 1170 MV errors in B frame
Assertion asf->packet_timestamp_end >= asf->packet_timestamp_start failed at libavformat/asfenc.c:704

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

Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.

Attachments (1)

sat_uplink_signalloss.ts (1.8 MB) - added by wim_arbor 4 years ago.
source file

Download all attachments as: .zip

Change History (4)

Changed 4 years ago by wim_arbor

source file

comment:1 Changed 4 years ago by wim_arbor

linux output of same command, added -fflags +genpts+igndts but still the same assertion.

arbor@debian7:~$ bin/ffmpeg -y -fflags +genpts+igndts -i sat_uplink_signalloss.ts test.asf
ffmpeg version N-62321-g4764714 Copyright (c) 2000-2014 the FFmpeg developers
  built on Apr 10 2014 16:57:23 with gcc 4.7 (Debian 4.7.2-5)
  configuration:
  libavutil      52. 75.100 / 52. 75.100
  libavcodec     55. 58.103 / 55. 58.103
  libavformat    55. 36.103 / 55. 36.103
  libavdevice    55. 11.100 / 55. 11.100
  libavfilter     4.  4.100 /  4.  4.100
  libswscale      2.  6.100 /  2.  6.100
  libswresample   0. 18.100 /  0. 18.100
[mpeg2video @ 0x2b25740] Invalid frame dimensions 0x0.
    Last message repeated 8 times
[mpegts @ 0x2b20a00] PES packet size mismatch
Input #0, mpegts, from 'sat_uplink_signalloss.ts':
  Duration: 00:00:27.46, start: 48025.799111, bitrate: 547 kb/s
  Program 1
    Stream #0:0[0x44]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 128 kb/s
    Stream #0:1[0x45]: Video: mpeg2video (4:2:2) ([2][0][0][0] / 0x0002), yuv422p(tv), 720x576 [SAR 16:15 DAR 4:3], max. 3400 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
Output #0, asf, to 'test.asf':
  Metadata:
    WM/EncodingSettings: Lavf55.36.103
    Stream #0:0: Video: msmpeg4v3 (msmpeg4) (MP43 / 0x3334504D), yuv420p, 720x576 [SAR 16:15 DAR 4:3], q=2-31, 200 kb/s, 1k tbn, 25 tbc
    Stream #0:1: Audio: wmav2 (a[1][0][0] / 0x0161), 48000 Hz, stereo, fltp, 128 kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (mpeg2video -> msmpeg4)
  Stream #0:0 -> #0:1 (mp2 -> wmav2)
Press [q] to stop, [?] for help
[mpegts @ 0x2b20a00] PES packet size mismatch
[mpegts @ 0x2b20a00] DTS 4322551520 < 4322553629 out of order
[mp2 @ 0x2b24c20] incomplete frame
Error while decoding stream #0:0: Invalid data found when processing input
[mpeg2video @ 0x2b25740] ac-tex damaged at 18 10
[mpeg2video @ 0x2b25740] Warning MVs not available
[mpeg2video @ 0x2b25740] concealing 1170 DC, 1170 AC, 1170 MV errors in B frame
Assertion asf->packet_timestamp_end >= asf->packet_timestamp_start failed at libavformat/asfenc.c:704
Aborted

comment:2 Changed 4 years ago by cehoyos

  • Keywords regression added
  • Priority changed from normal to important
  • Reproduced by developer set
  • Status changed from new to open

Regression since 3adb5f8d

comment:3 Changed 4 years ago by michael

  • Resolution set to fixed
  • Status changed from open to closed
Note: See TracTickets for help on using tickets.