I have a problem with "eject" -functionality crashing randomly. Sometimes I can load and play videos tens of times. Sometimes loading the second or n'th video crashes without any exceptions. I have two classes: Gui and VideoEngine. Gui is a simple qt widget with a rendering area and button for opening new videos to play.
Vlc instance is created only once in VideoEngine constructor:
Code: Select all
VideoEngine::VideoEngine(QObject * parent) : QObject(parent)
{
const char * const vlc_args[] = {
"-I", "dummy",
"--ignore-config",
"--extraintf=logger",
"--verbose=2",
"--plugin-path=C:\\vlc-1.0.3-win32\\vlc-1.0.3\\plugins"
};
libvlc_exception_init(&_vlcexcep);
_vlcinstance=libvlc_new(sizeof(vlc_args) / sizeof(vlc_args[0]), vlc_args,&_vlcexcep);
raise (&_vlcexcep);
_mp = libvlc_media_player_new (_vlcinstance, &_vlcexcep);
raise (&_vlcexcep);
}
Code: Select all
void VideoEngine::initVideo(WId windowId, QString fileName)
{
_m = libvlc_media_new (_vlcinstance, fileName.toAscii(), &_vlcexcep);
raise(&_vlcexcep);
libvlc_media_player_set_media (_mp, _m, &_vlcexcep);
raise(&_vlcexcep);
libvlc_media_release (_m);
#if defined(Q_OS_WIN)
libvlc_media_player_set_drawable(_mp, reinterpret_cast<unsigned int>(windowId), &_vlcexcep );
raise(&_vlcexcep);
libvlc_media_player_play (_mp, &_vlcexcep );
raise(&_vlcexcep);
}
Code: Select all
[0xd7f0a14] main input debug: control type=0
[0xd7f0a14] main input debug: control: stopping input
[0xd7a7074] main decoder debug: thread times: real 0m5.708208s, kernel 0m0.00000
0s, user 0m0.040057s
[0xd7a7074] avcodec decoder debug: ffmpeg codec (Motion JPEG Video) stopped
[0xd7a7074] main decoder debug: removing module "avcodec"
[0xd7a7074] main decoder debug: killing decoder fourcc `MJPG', 0 PES in FIFO
[0xd7e9354] main video output debug: [0] 4 0
[0xd7e9354] main video output debug: [1] 4 0
[0xd7e9354] main video output debug: [2] 4 0
[0xd7e9354] main video output debug: [3] 2 0
[0xd7e9354] main video output debug: [4] 2 0
[0xd7e9354] main video output debug: [5] 2 0
[0xd7e9354] main video output debug: [6] 0 0
[0xd7e9354] main video output debug: [7] 4 0
[0xd7e9354] main video output debug: [8] 2 0
[0xd7e9354] main video output debug: [9] 2 0
[0xd7e9354] main video output debug: [10] 2 0
[0xd7e9354] main video output debug: [11] 2 0
[0xd7e9354] main video output debug: [12] 2 0
[0xd7e9354] main video output debug: [13] 2 1
[0xd7e9354] main video output debug: [14] 4 0
[0xd7e9354] main video output debug: [15] 4 0
[0xd7f0a14] main input debug: saving a free vout
[0xd87e77c] avi stream debug: free chunk avih
[0xd87e77c] avi stream debug: free chunk strh
[0xd87e77c] avi stream debug: free chunk strf
[0xd87e77c] avi stream debug: free chunk LIST
[0xd87e77c] avi stream debug: free chunk LIST
[0xd87e77c] avi stream warning: unknown chunk (not unloaded)
[0xd87e77c] avi stream warning: unknown chunk (not unloaded)
[0xd87e77c] avi stream debug: free chunk LIST
[0xd87e77c] avi stream debug: free chunk idx1
[0xd87e77c] avi stream debug: free chunk RIFF
[0xd87e77c] avi stream debug: free chunk LIST
[0xd87fee4] main demux debug: removing module "avi"
[0xd87e77c] main stream debug: removing module "stream_filter_record"
[0x164dcd94] main access debug: removing module "access_file"
[0xd7f0a14] main input debug: Program doesn't contain anymore ES
[0xd7f0a14] main input debug: thread ended
[0xd7f0a14] main input debug: thread times: real 0m5.768294s, kernel 0m0.000000s
, user 0m0.020028s
[0xd7f0a14] main input debug: TIMER input launching for 'C:///Documents and Sett
ings/Mari/Desktop/testvp/frame_num.avi' : 49.649 ms - Total 49.649 ms / 1 intvls
(Avg 49.649 ms)
[0xd815234] main chroma debug: removing module "swscale"
[0xd7e9354] vout_directx video output debug: DirectXCloseSurface
[0xd7e9354] vout_directx video output debug: DirectXCloseDisplay
[0xd7e9354] vout_directx video output debug: DirectXCloseDisplay clipper
[0xd7e9354] vout_directx video output debug: DirectXCloseDisplay display
[0xd7e9354] vout_directx video output debug: DirectXCloseDDraw
- Mari -