Mercurial > mplayer.hg
comparison libmpcodecs/vd_svq1.c @ 6509:762d3cf8da36
init libavcodec
author | arpi |
---|---|
date | Sat, 22 Jun 2002 23:57:45 +0000 |
parents | f0788e0f7475 |
children | a2086150099b |
comparison
equal
deleted
inserted
replaced
6508:3dcf7fe14bd3 | 6509:762d3cf8da36 |
---|---|
22 // to set/get/query special features/parameters | 22 // to set/get/query special features/parameters |
23 static int control(sh_video_t *sh,int cmd,void* arg,...){ | 23 static int control(sh_video_t *sh,int cmd,void* arg,...){ |
24 return CONTROL_UNKNOWN; | 24 return CONTROL_UNKNOWN; |
25 } | 25 } |
26 | 26 |
27 extern int avcodec_inited; | |
28 | |
27 // init driver | 29 // init driver |
28 static int init(sh_video_t *sh){ | 30 static int init(sh_video_t *sh){ |
31 | |
32 #ifdef USE_LIBAVCODEC | |
33 if(!avcodec_inited){ | |
34 avcodec_init(); | |
35 avcodec_register_all(); | |
36 avcodec_inited=1; | |
37 } | |
38 #endif | |
39 | |
29 if(!mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_YVU9)) return 0; | 40 if(!mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_YVU9)) return 0; |
30 | 41 |
31 sh->context=malloc(sizeof(svq1_t)); | 42 sh->context=malloc(sizeof(svq1_t)); |
32 memset(sh->context,0,sizeof(svq1_t)); | 43 memset(sh->context,0,sizeof(svq1_t)); |
33 | 44 |