Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FFmbc 0.6 rc4 - output to two video files causes Segmentation fault #40

Closed
GoogleCodeExporter opened this issue Jul 22, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link
Contributor

Hi Baptiste,

I'm trying to output to two files at the same time. If I run these two commands 
separately then ffmbc encodes as I expect:

~/src/ffmbc/FFmbc-0.6-rc4b/ffmbc -y -i 576i25/Clock10tone.mov -vf scale=640:480 
-r 25 out1.mp4

~/src/ffmbc/FFmbc-0.6-rc4b/ffmbc -y -i 576i25/Clock10tone.mov -vf scale=320:240 
-r 25 out2.mp4

But if I combine that into one command I (often) get a seg-fault.

~/src/ffmbc/FFmbc-0.6-rc4b/ffmbc -y -i 576i25/Clock10tone.mov -vf scale=640:480 
-r 25 out1.mp4 -vf scale=320:240 -r 25 out2.mp4
FFmpeg version FFmbc-0.6-rc4, Copyright (c) 2000-2011 the FFmpeg developers
  built on Apr 20 2011 12:18:33 with gcc 4.4.3
  configuration: --cpu=i686 --enable-static --extra-cflags='--static -I$PREFIX/include' --extra-libs='-static -L$PREFIX/lib' --prefix= --enable-ffplay --enable-ffprobe --enable-ffserver --enable-gpl --enable-nonfree --enable-pthreads --enable-x11grab --enable-libxvid --enable-libvorbis --enable-libopenjpeg --enable-libspeex --enable-libtheora --enable-libfaac --enable-libgsm --enable-libdirac --enable-libmp3lame --enable-libx264 --enable-libschroedinger --enable-libvpx
  libavutil    50. 38. 0 / 50. 38. 0
  libavcodec   52.112. 1 / 52.112. 1
  libavformat  52. 99. 0 / 52. 99. 0
  libavdevice  52.  2. 3 / 52.  2. 3
  libavfilter   1. 76. 0 /  1. 76. 0
  libswscale    0. 12. 0 /  0. 12. 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '576i25/Clock10tone.mov':
  Metadata:
    major_brand: qt  
    minor_version: 537199360
    compatible_brands: qt  
    creation_time: 2009-07-16 17:23:31
  Duration: 00:00:10.00, start: 0.000000, bitrate: 30334 kb/s
    Stream #0.0(eng): Video: dvvideo, yuv420p, 720x576i bff [PAR 64:45 DAR 16:9], 28800 kb/s, 25.00 fps
    Stream #0.1(eng): Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
[scale @ 0x9e0a0a0] w:720 h:576 fmt:yuv420p -> w:640 h:480 fmt:yuv420p 
flags:0x4 interlaced:0
[scale @ 0x9e20560] w:720 h:576 fmt:yuv420p -> w:320 h:240 fmt:yuv420p 
flags:0x4 interlaced:0
Output #0, mp4, to 'out1.mp4':
  Metadata:
    encoder: FFmbc 0.6
    Stream #0.0(und): Video: mpeg4, yuv420p, 640x480p [PAR 4:3 DAR 16:9], 200 kb/s, 25.00 fps
    Stream #0.1(und): Audio: libfaac, 48000 Hz, 2 channels, s16, 64 kb/s
Output #1, mp4, to 'out2.mp4':
  Metadata:
    encoder: FFmbc 0.6
    Stream #1.0(und): Video: mpeg4, yuv420p, 320x240p [PAR 4:3 DAR 16:9], 200 kb/s, 25.00 fps
    Stream #1.1(und): Audio: libfaac, 48000 Hz, 2 channels, s16, 64 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
  Stream #0.0 -> #1.0
  Stream #0.1 -> #1.1
Press [q] to stop encoding
Segmentation fault

Running that through valgrind it is more likely to work, but sometimes will 
fail like this:

valgrind ~/src/ffmbc/FFmbc-0.6-rc4b/ffmbc_g -y -i 576i25/Clock10tone.mov -vf 
scale=640:480 -r 25 out1.mp4 -vf scale=320:240 -r 25 out2.mp4
[...]
==21667== Invalid read of size 4
==21667==    at 0x8A1FE1F: memcpy (in 
/usr/local/ssd/himslm01/src/ffmbc/FFmbc-0.6-rc4b/ffmbc_g)
==21667==    by 0x85DF1DA: av_image_copy (string3.h:52)
==21667==    by 0x80A0F95: request_frame (vsrc_buffer.c:131)
==21667==    by 0x808F60E: avfilter_request_frame (avfilter.c:362)
==21667==    by 0x808787D: get_filtered_video_frame (cmdutils.c:813)
==21667==    by 0x80816DF: output_packet (ffmbc.c:1850)
==21667==    by 0x8086208: T.733 (ffmbc.c:3070)
==21667==  Address 0x58a2000 is not stack'd, malloc'd or (recently) free'd
==21667== 
==21667== 
==21667== Process terminating with default action of signal 11 (SIGSEGV)
==21667==  Access not within mapped region at address 0x58A2000
==21667==    at 0x8A1FE1F: memcpy (in 
/usr/local/ssd/himslm01/src/ffmbc/FFmbc-0.6-rc4b/ffmbc_g)
==21667==    by 0x85DF1DA: av_image_copy (string3.h:52)
==21667==    by 0x80A0F95: request_frame (vsrc_buffer.c:131)
==21667==    by 0x808F60E: avfilter_request_frame (avfilter.c:362)
==21667==    by 0x808787D: get_filtered_video_frame (cmdutils.c:813)
==21667==    by 0x80816DF: output_packet (ffmbc.c:1850)
==21667==    by 0x8086208: T.733 (ffmbc.c:3070)
==21667==  If you believe this happened as a result of a stack
==21667==  overflow in your program's main thread (unlikely but
==21667==  possible), you can try to increase the size of the
==21667==  main thread stack using the --main-stacksize= flag.
==21667==  The main thread stack size used in this run was 8388608.
==21667== 
==21667== HEAP SUMMARY:
==21667==     in use at exit: 0 bytes in 0 blocks
==21667==   total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==21667== 
==21667== All heap blocks were freed -- no leaks are possible
==21667== 
==21667== For counts of detected and suppressed errors, rerun with: -v
==21667== Use --track-origins=yes to see where uninitialised values come from
==21667== ERROR SUMMARY: 4041 errors from 373 contexts (suppressed: 0 from 0)
Segmentation fault


Original issue reported on code.google.com by mark.him...@gmail.com on 3 May 2011 at 3:51

@GoogleCodeExporter
Copy link
Contributor Author

I should point out that it is the addition of one or more -vf scale filters 
that causes the seg-fault, adding other filters (pad and yadif have been 
tested) don't appear to cause the seg-fault.

Original comment by mark.him...@gmail.com on 3 May 2011 at 4:15

@GoogleCodeExporter
Copy link
Contributor Author

Fixed, I updated the tarball

Original comment by baptiste...@gmail.com on 4 May 2011 at 10:32

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Contributor Author

Confirmed fixed in current 0.6-rc4

Original comment by mark.him...@gmail.com on 6 May 2011 at 12:21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant