OpenCV the slide bar did not respond

Hi,all
here are my codes!
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include "highgui.h"
#include "cv.h"
int g_slider_position = 0;
CvCapture* g_capture = NULL;

void onTrackbarSlide(int pos){
	cvSetCaptureProperty(
		g_capture,
		CV_CAP_PROP_POS_FRAMES,
		pos 
		);
}
int main(int argc,char* argv[])
{
    cvNamedWindow("Modify me",CV_WINDOW_AUTOSIZE);
    char* filename = "F:\\TDDOWNLOAD\\Movie\\[代码].The.Code.-.Linux.2001.TVRip.DivX.Linux_Documentary.avi";
    CvCapture* g_capture = cvCreateFileCapture(filename);
    IplImage* frame;
    int frames = (int)cvGetCaptureProperty(g_capture,CV_CAP_PROP_FRAME_COUNT);
		if(frames) {
				cvCreateTrackbar(
					 "Position",
					 "Modify me",
					 &g_slider_position,
					 frames,
			        	 onTrackbarSlide
					);
			}
		 while(1) {
        frame = cvQueryFrame(g_capture);
        if(!frame) break;
        cvShowImage("Modify me",frame);
        char c = cvWaitKey(33);
        if(c == 27) break;
    }
    cvReleaseCapture(&g_capture);
    cvDestroyWindow("Modify me");
  return 0;
}


the programme is quite simple. When i ran it,there is a viewer playing the avi video which specified in the code fragment,but the track bar did not respond to any mouse click? What is the matter? Also , some infos appeared on the console,like bleow:

Compiler did not align stack variables. Libavcodec has been miscompiled
and may be very slow or crash. This is not a bug in libavcodec,
but in the compiler. Do not report crashes to FFmpeg developers
.

Can any body help me out ?
Thank in advance !
Topic archived. No new replies allowed.