Hello all, I need help please. I use ffmpeg in my cpp program. In the main of my main.cpp file I initialize two times codeccontext and filtercontext. Because at one hand, I extract motion vecteur and do somes actions (editing) on them (mvs). And at the second time, I put edited motion vectors in the output file during reeconding. The functions that do the actions (edit) on motions vecteurs are in an other .cpp file (editmv.cpp).The header file of editmv.cpp is included in an other header file witch is included in my main.cpp. but when I run the executable. At the end of the first action witch is the extraction and editing of mvs in the other cpp file, when my program comes back to the main at second time to reencode the video, I get this error : free(): invalid pointer: 0x00007fffffffe001.
Can someone help me, please? This is the valgring command output : ==7937== Invalid free() / delete / delete[] / realloc() ==7937== at 0x4C2C2BC: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==7937== by 0x40C153: __gnu_cxx::new_allocator<int>::deallocate(int*, unsigned long) (new_allocator.h:110) ==7937== by 0x40BD1C: std::allocator_traits<std::allocator<int> >::deallocate(std::allocator<int>&, int*, unsigned long) (alloc_traits.h:514) ==7937== by 0x40B3B3: std::_Vector_base<int, std::allocator<int> >::_M_deallocate(int*, unsigned long) (stl_vector.h:178) ==7937== by 0x40ABC6: std::_Vector_base<int, std::allocator<int> >::~_Vector_base() (stl_vector.h:160) ==7937== by 0x40CA0C: std::vector<int, std::allocator<int> >::~vector() (stl_vector.h:425) ==7937== by 0x70D5A56: StcEmbed::stego_createMessageTable(std::vector<char, std::allocator<char> >) (stcEmbeding.cpp:84) ==7937== by 0x70D584F: StcEmbed::stego_init(char const*) (stcEmbeding.cpp:57) ==7937== by 0x70CCD2E: init (algoLib.cpp:41) ==7937== by 0x409FB3: main (main.cpp:910) ==7937== Address 0xffeffff01 is on thread 1's stack ==7937== in frame #6, created by StcEmbed::stego_createMessageTable(std::vector<char, std::allocator<char> >) (stcEmbeding.cpp:66) ==7937== ==7937== Conditional jump or move depends on uninitialised value(s) ==7937== at 0x70D7F19: std::_Vector_base<char, std::allocator<char> >::_M_deallocate(char*, unsigned long) (stl_vector.h:177) ==7937== by 0x70D74D0: std::_Vector_base<char, std::allocator<char> >::~_Vector_base() (stl_vector.h:160) ==7937== by 0x70D6AEE: std::vector<char, std::allocator<char> >::~vector() (stl_vector.h:425) ==7937== by 0x70D585E: StcEmbed::stego_init(char const*) (stcEmbeding.cpp:57) ==7937== by 0x70CCD2E: init (algoLib.cpp:41) ==7937== by 0x409FB3: main (main.cpp:910) ==7937== ==7937== Conditional jump or move depends on uninitialised value(s) ==7937== at 0x4C2C272: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==7937== by 0x70D8B49: __gnu_cxx::new_allocator<char>::deallocate(char*, unsigned long) (new_allocator.h:110) ==7937== by 0x70D885E: std::allocator_traits<std::allocator<char> >::deallocate(std::allocator<char>&, char*, unsigned long) (alloc_traits.h:514) ==7937== by 0x70D7F31: std::_Vector_base<char, std::allocator<char> >::_M_deallocate(char*, unsigned long) (stl_vector.h:178) ==7937== by 0x70D74D0: std::_Vector_base<char, std::allocator<char> >::~_Vector_base() (stl_vector.h:160) ==7937== by 0x70D6AEE: std::vector<char, std::allocator<char> >::~vector() (stl_vector.h:425) ==7937== by 0x70D585E: StcEmbed::stego_init(char const*) (stcEmbeding.cpp:57) ==7937== by 0x70CCD2E: init (algoLib.cpp:41) ==7937== by 0x409FB3: main (main.cpp:910) ==7937== ==7937== Invalid free() / delete / delete[] / realloc() ==7937== at 0x4C2C2BC: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==7937== by 0x70D8B49: __gnu_cxx::new_allocator<char>::deallocate(char*, unsigned long) (new_allocator.h:110) ==7937== by 0x70D885E: std::allocator_traits<std::allocator<char> >::deallocate(std::allocator<char>&, char*, unsigned long) (alloc_traits.h:514) ==7937== by 0x70D7F31: std::_Vector_base<char, std::allocator<char> >::_M_deallocate(char*, unsigned long) (stl_vector.h:178) ==7937== by 0x70D74D0: std::_Vector_base<char, std::allocator<char> >::~_Vector_base() (stl_vector.h:160) ==7937== by 0x70D6AEE: std::vector<char, std::allocator<char> >::~vector() (stl_vector.h:425) ==7937== by 0x70D585E: StcEmbed::stego_init(char const*) (stcEmbeding.cpp:57) ==7937== by 0x70CCD2E: init (algoLib.cpp:41) ==7937== by 0x409FB3: main (main.cpp:910) ==7937== Address 0xfff0000e0 is on thread 1's stack Regards _______________________________________________ ffmpeg-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
