[MPlayer-dev-eng] Divide by zero when creating mov

Roberto Ragusa mail at robertoragusa.it
Thu Apr 14 10:46:23 CEST 2011


Hi,

I'm getting some crashes caused by integer (or floating?) divide by zero
when converting some files with mencoder (svn 2011/04/13 + ffmpeg git 2011/04/13).
It points to pts handling.

This is happening on a few different files, so it may be a bug in the code.
It only goes away when replacing "-of lavf" with something else.
Any hint?

$ valgrind /tmp/mencoder -v 24000000U.upl -o tmp.mp4 -of lavf -lavfopts format=mov -vf scale=320:-10,harddup -af channels=1,resample=22050:1:1 -srate 22050 -ovc x264 -x264encopts bitrate=200:frameref=5:bframes=1:me=umh:partitions=all:trellis=1:qp_step=4:qcomp=0.7:direct_pred=auto:keyint=300 -oac faac -faacopts quality=100:mpeg=4:object=2
==29005== Memcheck, a memory error detector.
==29005== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al.
==29005== Using LibVEX rev 1658, a library for dynamic binary translation.
==29005== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP.
==29005== Using valgrind-3.2.1, a dynamic binary instrumentation framework.
==29005== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al.
==29005== For more details, rerun with: -v
==29005==
MEncoder SVN-r33253-4.1.2 (C) 2000-2011 MPlayer Team
3DNow supported but disabled
3DNowExt supported but disabled
get_path('codecs.conf') -> '/home/nica/.mplayer/codecs.conf'
Reading /home/nica/.mplayer/codecs.conf: Can't open '/home/nica/.mplayer/codecs.conf': No such file or directory
Reading /nica/sw/addons/pkgs/mplayer/etc/mplayer/codecs.conf: Can't open '/nica/sw/addons/pkgs/mplayer/etc/mplayer/codecs.conf': No such file or directory
Using built-in default codecs.conf.
init_freetype
get_path('font/font.desc') -> '/home/nica/.mplayer/font/font.desc'
font: can't open file: /home/nica/.mplayer/font/font.desc
font: can't open file: /nica/sw/addons/pkgs/mplayer/share/mplayer/font/font.desc
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
get_path('fonts') -> '/home/nica/.mplayer/fonts'
Configuration: --prefix=/nica/sw/addons/pkgs/mplayer --enable-mp3lame --enable-x264 --enable-faac --extra-libs=-L/nica/sw/addons/pkgs/lame/lib -lmp3lame -L/nica/sw/addons/pkgs/x264/lib -lx264 -L/nica/sw/addons/pkgs/faac/lib -lfaac --extra-cflags=-I/nica/sw/addons/pkgs/lame/include -I/nica/sw/addons/pkgs/x264/include -I/nica/sw/addons/pkgs/faac/include
[file] File size is 78818057 bytes
STREAM: [file] 24000000U.upl
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
success: format: 0  data: 0x0 - 0x4b2ab09
LAVF_check: QuickTime/MPEG-4/Motion JPEG 2000 format
libavformat file format detected.
==> Found video stream: 0
======= VIDEO Format ======
  biSize 88
  biWidth 710
  biHeight 364
  biPlanes 0
  biBitCount 24
  biCompression 875967048='H264'
  biSizeImage 775320
Unknown extra header dump: [1] [4d] [40] [1e] [ff] [e1] [0] [20] [67] [4d] [40] [1e] [ec] [a0] [5a] [17] [f3] [5f] [fe] [0] [10] [0] [12] [d4] [18] [4] [19] [0] [0] [3] [0] [1] [0] [2] [bf] [20] [f] [16] [2d] [96] [1] [0] [5] [68] [ea] [c1] [b2] [c8]
===========================
[lavf] stream 0: video (h264), -vid 0
==> Found audio stream: 1
======= WAVE Format =======
Format Tag: 20557 (0x504D)
Channels: 2
Samplerate: 48000
avg byte/sec: 40700
Block align: 1
bits/sample: 16
cbSize: 2
Unknown extra header dump: [11] [90]
==========================================================================
[lavf] stream 1: audio (aac), -aid 0, -alang und
LAVF: 1 audio and 1 video streams found
LAVF: build 3435008
VIDEO:  [H264]  710x364  24bpp  29.970 fps  1677.3 kbps (204.8 kbyte/s)
[V] filefmt:44  fourcc:0x34363248  size:710x364  fps:29.970  ftime:=0.0334
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
dec_audio: Allocating 192000 + 65536 = 257536 bytes for output buffer.
FFmpeg's libavcodec audio codec
INFO: libavcodec "aac" init OK!
AUDIO: 48000 Hz, 2 ch, s16le, 325.6 kbit/21.20% (ratio: 40700->192000)
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
[file] File size is 0 bytes
STREAM: [file] tmp.mp4
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
** MUXER_LAVF *****************************************************************
REMEMBER: MEncoder's libavformat muxing is presently broken and can generate
INCORRECT files in the presence of B-frames. Moreover, due to bugs MPlayer
will play these INCORRECT files as if nothing were wrong!
*******************************************************************************
OK, exit.
ALLOCATED STREAM N. 1, type=0
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [harddup]
Opening video filter: [scale w=320 h=-10]
SwScale params: 320 x -10 (-1=no scaling)
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
[h264 @ 0xac4420]Unsupported bit depth: 0
INFO: libavcodec init OK!
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
ALLOCATED STREAM N. 2, type=1
Building audio filter chain for 48000Hz/2ch/s16le -> 22050Hz/0ch/??...
[libaf] Adding filter channels
[channels] Changing number of channels to 1
[libaf] Adding filter resample
[resample] Changing sample rate to 22050Hz
[resample] Using integer processing and inexact frequecy conversion.
[resample] New filter designed up: 147 down: 320
[libaf] Adding filter format
[format] Changing sample format from little-endian 16-bit signed int to big-endian 8-bit signed int
[resample] Using integer processing and inexact frequecy conversion.
[format] Changing sample format from little-endian 16-bit signed int to big-endian 8-bit signed int
AE_FAAC, sample_input: 1024, max_bytes_output: 768
Building audio filter chain for 48000Hz/2ch/s16le -> 22050Hz/1ch/s16le...
[resample] Using integer processing and inexact frequecy conversion.
[format] Changing sample format from little-endian 16-bit signed int to big-endian 8-bit signed int
[libaf] Removing filter format
[resample] Using integer processing and inexact frequecy conversion.
[libaf] Reallocating memory in module channels, old len = 0, new len = 5477
[libaf] Reallocating memory in module resample, old len = 0, new len = 2516
Increasing filtered audio buffer size from 0 to 2514
Increasing filtered audio buffer size from 2514 to 2516
Increasing filtered audio buffer size from 2516 to 2518
Unsupported PixelFormat 61
Unsupported PixelFormat 53
[h264 @ 0xac4420]no picture
Pos:   0.0s      1f ( 0%)   0fps Trem:   0min   0mb  A-V:0.000 [0:0] A/Vms 44/33 D/B/S 0/1/0
[h264 @ 0xac4420]no picture

1 duplicate frame(s)!
Muxer frame buffer sending 12 frame(s) to the muxer.
VIDEO CODEC ID: 28
AUDIO CODEC ID: 15002, TAG: 0
MUXER_LAVF(audio stream) frame_size: 1024, scale: 1024, sps: 22050, rate: 22050, ctx->block_align = stream->wf->nBlockAlign; 0=1024 stream->wf->nAvgBytesPerSec:313
Writing header...
[mov @ 0xa4fa20]dimensions not set
==29005==
==29005== Process terminating with default action of signal 8 (SIGFPE): dumping core
==29005==  Integer divide by zero at address 0x404BD0A3F
==29005==    at 0x6103B2: av_frac_add (utils.c:112)
==29005==    by 0x6126F2: compute_pkt_fields2 (utils.c:3026)
==29005==    by 0x6136B1: av_interleaved_write_frame (utils.c:3148)
==29005==    by 0x453333: write_chunk (muxer_lavf.c:271)
==29005==    by 0x4486F4: muxer_flush (muxer.c:109)
==29005==    by 0x4488F2: muxer_write_chunk (muxer.c:167)
==29005==    by 0x443B8A: main (mencoder.c:1516)
==29005==
==29005== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 5 from 1)
==29005== malloc/free: in use at exit: 18,618,594 bytes in 3,294 blocks.
==29005== malloc/free: 3,787 allocs, 493 frees, 24,768,487 bytes allocated.
==29005== For counts of detected errors, rerun with: -v
==29005== searching for pointers to 3,294 not-freed blocks.
==29005== checked 23,487,048 bytes.
==29005==
==29005== LEAK SUMMARY:
==29005==    definitely lost: 228,534 bytes in 57 blocks.
==29005==      possibly lost: 0 bytes in 0 blocks.
==29005==    still reachable: 18,390,060 bytes in 3,237 blocks.
==29005==         suppressed: 0 bytes in 0 blocks.
==29005== Use --leak-check=full to see details of leaked memory.
Floating point exception

-- 
   Roberto Ragusa    mail at robertoragusa.it


More information about the MPlayer-dev-eng mailing list