Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#2834 closed defect (fixed)

mpeg2video: Assertion p <= end failed at libavcodec/utils.c:3249 + core dumped

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

Description

Summary of the bug:
I'm getting the following error message when trying to calculate the framemd5 of a MPEG-TS video:

"Assertion p <= end failed at libavcodec/utils.c:3249
Aborted (core dumped)"

How to reproduce:

% ffmpeg -i input.m2t -an -f framemd5 output.framemd5

ffmpeg version N-55222-g18d7074 Copyright (c) 2000-2013 the FFmpeg developers
  built on Aug  4 2013 22:47:14 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
  configuration: --prefix=/usr/local --enable-gpl --enable-nonfree --enable-version3 --enable-postproc --enable-swscale --enable-avfilter --enable-pthreads --enable-bzlib --enable-libmp3lame --enable-libvorbis --enable-libxvid --enable-zlib --enable-libopenjpeg --enable-decoder=png --enable-encoder=png --enable-libfreetype --enable-libschroedinger --enable-libvpx --enable-libvorbis --enable-libx264 --enable-libfaac
  libavutil      52. 40.100 / 52. 40.100
  libavcodec     55. 20.100 / 55. 20.100
  libavformat    55. 13.101 / 55. 13.101
  libavdevice    55.  3.100 / 55.  3.100
  libavfilter     3. 82.100 /  3. 82.100
  libswscale      2.  4.100 /  2.  4.100
  libswresample   0. 17.103 /  0. 17.103
  libpostproc    52.  3.100 / 52.  3.100
Input #0, mpegts, from 'input.m2t':
  Duration: 01:00:40.36, start: 1.400000, bitrate: 27381 kb/s
  Program 1
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #0:0[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p, 1440x1080 [SAR 4:3 DAR 16:9], max. 25000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x101]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 384 kb/s
Output #0, framemd5, to 'output.framemd5':
  Metadata:
    encoder         : Lavf55.13.101
    Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1440x1080 [SAR 4:3 DAR 16:9], q=2-31, 200 kb/s, 25 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg2video -> rawvideo)
Press [q] to stop, [?] for help
Assertion p <= end failed at libavcodec/utils.c:3249
Aborted (core dumped)

Normally I wouldn't report this, because this only happens with one particular file. However, the exact same commandline works perfectly fine on that file using ffmpeg v0.8.5 (ubuntu binary):

% ffmpeg -i input.m2t -an -f framemd5 output.framemd5

ffmpeg version 0.8.5-4:0.8.5-0ubuntu0.12.04.1, Copyright (c) 2000-2012 the Libav developers
  built on Jan 24 2013 18:01:36 with gcc 4.6.3
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
Input #0, mpegts, from 'input.m2t':
  Duration: 01:00:40.36, start: 1.400000, bitrate: 27381 kb/s
  Program 1
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #0.0[0x100]: Video: mpeg2video (Main), yuv420p, 1440x1080 [PAR 4:3 DAR 16:9], 25000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0.1[0x101]: Audio: mp2, 48000 Hz, stereo, s16, 384 kb/s
File 'output.framemd5' already exists. Overwrite ? [y/N] y
[buffer @ 0x20775a0] w:1440 h:1080 pixfmt:yuv420p
Output #0, framemd5, to 'output.framemd5':
  Metadata:
    encoder         : Lavf53.21.1
    Stream #0.0: Video: rawvideo, yuv420p, 1440x1080 [PAR 4:3 DAR 16:9], q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
  Stream #0.0 -> #0.0
Press ctrl-c to stop encoding
[mpeg2video @ 0x20791c0] qscale == 0
[mpeg2video @ 0x20791c0] Warning MVs not available
[mpeg2video @ 0x20791c0] concealing 1800 DC, 1800 AC, 1800 MV errors
frame=  610 fps= 77 q=0.0 Lsize=      32kB time=24.40 bitrate=  10.7kbits/s   
video:1389656kB audio:0kB global headers:0kB muxing overhead -99.997707%

Attachments (1)

broken.m2t (1.9 MB) - added by peter_b 6 years ago.
MPEG-TS stream with error. Calculating framemd5 dumps core.

Download all attachments as: .zip

Change History (5)

Changed 6 years ago by peter_b

MPEG-TS stream with error. Calculating framemd5 dumps core.

comment:1 Changed 6 years ago by cehoyos

  • Component changed from undetermined to avcodec
  • Keywords mpeg2video regression crash abort added; core dumped framemd5 removed
  • Priority changed from normal to important
  • Reproduced by developer set
  • Status changed from new to open
  • Version changed from unspecified to git-master

Regression since 55db06a.

$ ffmpeg -i broken.m2t -f null -
ffmpeg version N-55245-g1ccc215 Copyright (c) 2000-2013 the FFmpeg developers
  built on Aug  5 2013 18:10:39 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl --disable-indev=jack
  libavutil      52. 40.100 / 52. 40.100
  libavcodec     55. 20.100 / 55. 20.100
  libavformat    55. 13.101 / 55. 13.101
  libavdevice    55.  3.100 / 55.  3.100
  libavfilter     3. 82.100 /  3. 82.100
  libswscale      2.  4.100 /  2.  4.100
  libswresample   0. 17.103 /  0. 17.103
  libpostproc    52.  3.100 / 52.  3.100
Input #0, mpegts, from 'broken.m2t':
  Duration: 00:00:00.58, start: 1.416000, bitrate: 27411 kb/s
  Program 1
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #0:0[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p, 1440x1080 [SAR 4:3 DAR 16:9], max. 25000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x101]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 384 kb/s
Output #0, null, to 'pipe:':
  Metadata:
    encoder         : Lavf55.13.101
    Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1440x1080 [SAR 4:3 DAR 16:9], q=2-31, 200 kb/s, 90k tbn, 25 tbc
    Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg2video -> rawvideo)
  Stream #0:1 -> #0:1 (mp2 -> pcm_s16le)
Press [q] to stop, [?] for help
[null @ 0x2e5fec0] Encoder did not produce proper pts, making some up.
Assertion p <= end failed at libavcodec/utils.c:3249
Aborted

comment:2 Changed 6 years ago by cehoyos

  • Summary changed from framemd5: Assertion p <= end failed at libavcodec/utils.c:3249 + core dumped to mpeg2video: Assertion p <= end failed at libavcodec/utils.c:3249 + core dumped

comment:3 Changed 6 years ago by michael

  • Resolution set to fixed
  • Status changed from open to closed

comment:4 Changed 6 years ago by peter_b

Thanks.
I've just checked with "broken.m2t" and it works now.

Just for the sake of completeness, I might note that the same commandline used above now returns a "slice too small" error, while ffmpeg v0.8.6 does not. The testfile "broken.m2t" however, only has 11 frames - so it is insanely short ;)

The initial problem however is solved. Thank you very much!

$ ffmpeg_git -i broken.m2t -an -f framemd5 output.framemd5

ffmpeg version N-55539-g2090451 Copyright (c) 2000-2013 the FFmpeg developers
  built on Aug 14 2013 13:46:48 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
  configuration: --prefix=/usr/local --enable-gpl --enable-nonfree --enable-version3 --enable-postproc --enable-swscale --enable-avfilter --enable-pthreads --enable-bzlib --enable-libmp3lame --enable-libvorbis --enable-libxvid --enable-zlib --enable-libopenjpeg --enable-decoder=png --enable-encoder=png --enable-libfreetype --enable-libschroedinger --enable-libvpx --enable-libvorbis --enable-libx264 --enable-libfaac
  libavutil      52. 42.100 / 52. 42.100
  libavcodec     55. 27.100 / 55. 27.100
  libavformat    55. 13.102 / 55. 13.102
  libavdevice    55.  3.100 / 55.  3.100
  libavfilter     3. 82.100 /  3. 82.100
  libswscale      2.  4.100 /  2.  4.100
  libswresample   0. 17.103 /  0. 17.103
  libpostproc    52.  3.100 / 52.  3.100
Input #0, mpegts, from 'broken.m2t':
  Duration: 00:00:00.58, start: 1.416000, bitrate: 27411 kb/s
  Program 1 
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #0:0[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p, 1440x1080 [SAR 4:3 DAR 16:9], max. 25000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x101]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 384 kb/s
Output #0, framemd5, to 'output.framemd5':
  Metadata:
    encoder         : Lavf55.13.102
    Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1440x1080 [SAR 4:3 DAR 16:9], q=2-31, 200 kb/s, 25 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg2video -> rawvideo)
Press [q] to stop, [?] for help
[mpeg2video @ 0x3517ba0] slice too small
Error while decoding stream #0:0: Invalid data found when processing input
frame=   11 fps=0.0 q=0.0 Lsize=       1kB time=00:00:00.52 bitrate=  13.7kbits/s    
video:25059kB audio:0kB subtitle:0 global headers:0kB muxing overhead -99.996524%
Note: See TracTickets for help on using tickets.