<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div>Hi,<br><br></div>I ported an application, with ffmpeg, which is working on QNX x86 to QNX armv7. <br><br></div>I cross compiled the ffmpeg on a linux machine with the QNX momentics suite tools. <br>
</div>I can't compile the library directly on the QNX armv7 device so I had to cross compile it.<br><br></div>My configure was following:<br><br>./configure \<br> --enable-gpl \<br> --enable-nonfree \<br> --disable-bzlib \<br>
--disable-ffserver \<br> --enable-cross-compile \<br> --target-os=qnx \<br> --arch=armv7 \<br> --cross-prefix=ntoarmv7- \<br> --enable-libx264 \<br> --extra-cflags="-I../x264 -Wno-deprecated -Wno-deprecated-declarations" \<br>
--extra-ldflags="-L../x264"<br><br></div>It gave one warning - "Compiler does not indicate floating-point ABI".<br><br></div>I did "make all".<br><br></div>When I started the application it gave - (Suspended: Signal 'SIGBUS' received. Description: Bus error.)<br>
<br>17 adts_aac_probe() libavutil\arm\intreadwrite.h:34 0x0028a284 <br>16 av_probe_input_format3() libavformat\utils.c:339 0x00273da4 <br>15 av_probe_input_buffer() libavformat\utils.c:361 0x002749cc <br>14 avformat_open_input() libavformat\utils.c:522 0x00276698 <br>
13 WLCommon::CFrameDecoder_H264_ffmpeg_impl::Startup() C:\DataDisk\Project\AbaltaInternal\WebLink\Source\WebLinkCore\FrameEncoding\FrameDecoder_H264_ffmpeg.cpp:281 0x0012406c <br>....<br><br>This is the function that causes the SIGBUS.<br>
bool CFrameDecoder_H264_ffmpeg_impl::Startup()<br>{<br> bool result = false;<br><br> if (m_initialized && !m_started)<br> {<br> int res;<br> av_register_all();<br> m_videoStrmIdx = -1;<br> m_formatCtx = avformat_alloc_context();<br>
m_ioBuffer = (unsigned char*)av_malloc(8192);<br> m_avioCtx = avio_alloc_context(m_ioBuffer, 8192, 0, this, ReadFunction, NULL, NULL);<br> m_formatCtx->pb = m_avioCtx;<br> ----> res = avformat_open_input(&m_formatCtx, "dummyFilename", NULL, NULL);<br>
...<br><br></div>As far as I know the SIGBUS means misaligned access. The reason could be in our code, but the same code works on Raspberry Pi device with Linux and armv7.<br><br></div>Can you advise me how to approach to this problem? Should I try some --extra-cflags in the configure phase? Should I search the reason in our code?<br>
<br></div>I can provide you with the information from config.log, config.mak or config.h, if needed.<br><br>Thanks,<br></div>Pavel.<br><div><div><div><div><div><br><div><br><br></div></div></div></div></div></div></div>