Strange intermittent crashes in bswap_32 (bswap.h)
I have written a player that uses ffmpeg to decode MPEG4. Generally it works fine, but every now and then I get crashes that look like: Instruction at 0x6cc7cd61 referenced memory at 0x01b53000 - could not be read Instruction at 0x6cc7cd61 referenced memory at 0x01b1f000 - could not be read Instruction at 0x6cc7cd61 referenced memory at 0x01b1c000 - could not be read Instruction at 0x6cc77e73 referenced memory at 0x01aff000 - could not be read According to the debugger, in all these cases the inline function bswap_32 is being called (some times from ff_mpeg4_decode_mb and some times from h263_decode_motion) I know this sounds like I'm corrupting memory somewhere but I don't think that I am. My program is multi-threaded. Thread 1 decodes frames and adds them to a FIFO Thread 2 dequeues them, calls img_convert() and displays. Any Ideas? Could this be a ffmpeg re-entrancy problem? thanks, rw --------------------------------- Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1?/min.
Hi On Sun, Sep 17, 2006 at 12:38:55PM -0700, Joe Shlobotnick wrote:
I have written a player that uses ffmpeg to decode MPEG4.
Generally it works fine, but every now and then I get crashes that look like:
Instruction at 0x6cc7cd61 referenced memory at 0x01b53000 - could not be read Instruction at 0x6cc7cd61 referenced memory at 0x01b1f000 - could not be read Instruction at 0x6cc7cd61 referenced memory at 0x01b1c000 - could not be read Instruction at 0x6cc77e73 referenced memory at 0x01aff000 - could not be read
According to the debugger, in all these cases the inline function bswap_32 is being called (some times from ff_mpeg4_decode_mb and some times from h263_decode_motion)
I know this sounds like I'm corrupting memory somewhere but I don't think that I am.
My program is multi-threaded. Thread 1 decodes frames and adds them to a FIFO Thread 2 dequeues them, calls img_convert() and displays.
Any Ideas? Could this be a ffmpeg re-entrancy problem?
are you aware of the following from avcodec.h: (just a wild guess...) ----- /** * Required number of additionally allocated bytes at the end of the input bitstream for decoding. * this is mainly needed because some optimized bitstream readers read * 32 or 64 bit at once and could read over the end<br> * Note, if the first 23 bits of the additional bytes are not 0 then damaged * MPEG bitstreams could cause overread and segfault */ #define FF_INPUT_BUFFER_PADDING_SIZE 8 ----- [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB In the past you could go to a library and read, borrow or copy any book Today you'd get arrested for mere telling someone where the library is
participants (2)
-
michaelni@gmx.at -
wreuvenspam@yahoo.com