My problem is very strange , and since I cannot send the code, I will try to explain.
This is more like a philosophical problem - I hope someone has the time / knowledge to think about it.
1) I have project.cpp that looks exactly like this:
#include <pthread.h> #include <unistd.h> pthread_t pplayer_thread; void *play(void*); int main(int argc, char **argv) { pthread_create(&pplayer_thread, NULL, play_cb, NULL); usleep(5000000); return 0; }
2) pplayer.cpp looks something like this:
... void *play_cb(void *arg) {
3) not_executed _from_main.cpp looks something like this:
... extern MyClass *myObj; // this is included from .h file ... MyClass *myObj = NULL; ... some_function() { ... myObj = MyClass::createNew(args); ... } ...
All this is due to various other libraries and tons of garbage, but this is mostly important.
-> Problem :
When I launched this, I should see a window playing the video clip using gstreamer for 5 seconds -> BUT, but I hear only the sound!
-> Strange thing :
When I comment out the line:
myObj = MyClass::createNew(args);
and run again -> I also see the gstreamer window (everything is ok)
-> Notes :
this may have something to do with:
- the layout and character process of MyClass and its parent class (my best guess)
- "static" keyword
- "external" keyword
- Mixing C and C ++
-> I ask again :
How does a small change in code that never executes matter?
(please, help)
kliketa
source share