annotate libmpcodecs/ve.c @ 7353:0cb951ac0133

Use the character substitution code from fntRender() / fntTextWidth() for non-existant characters in fntTextHeight(), too. Otherwise the image height is mis-computed and we allocate an output image that is too small; this could result in malloc heap corruption.
author jkeil
date Tue, 10 Sep 2002 12:44:47 +0000
parents 1972c3475d93
children dacc262f41ba
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5550
7d1dfb59c6c0 encoders
arpi
parents:
diff changeset
1 #include <stdio.h>
7d1dfb59c6c0 encoders
arpi
parents:
diff changeset
2 #include <stdlib.h>
7d1dfb59c6c0 encoders
arpi
parents:
diff changeset
3 #include <string.h>
7d1dfb59c6c0 encoders
arpi
parents:
diff changeset
4
7d1dfb59c6c0 encoders
arpi
parents:
diff changeset
5 #include "../config.h"
7d1dfb59c6c0 encoders
arpi
parents:
diff changeset
6 #include "../mp_msg.h"
7d1dfb59c6c0 encoders
arpi
parents:
diff changeset
7
5607
1972c3475d93 mp_image.h and img_format.h moved to libmpcodecs
arpi
parents: 5577
diff changeset
8 #include "img_format.h"
1972c3475d93 mp_image.h and img_format.h moved to libmpcodecs
arpi
parents: 5577
diff changeset
9 #include "mp_image.h"
5550
7d1dfb59c6c0 encoders
arpi
parents:
diff changeset
10 #include "vf.h"
7d1dfb59c6c0 encoders
arpi
parents:
diff changeset
11
7d1dfb59c6c0 encoders
arpi
parents:
diff changeset
12 extern vf_info_t ve_info_divx4;
7d1dfb59c6c0 encoders
arpi
parents:
diff changeset
13 extern vf_info_t ve_info_lavc;
7d1dfb59c6c0 encoders
arpi
parents:
diff changeset
14 extern vf_info_t ve_info_vfw;
7d1dfb59c6c0 encoders
arpi
parents:
diff changeset
15 extern vf_info_t ve_info_rawrgb;
5577
80eedd3ef6d3 RGB24/YUY2 -> DV encoding, using libdv
arpi
parents: 5550
diff changeset
16 extern vf_info_t ve_info_libdv;
5550
7d1dfb59c6c0 encoders
arpi
parents:
diff changeset
17
7d1dfb59c6c0 encoders
arpi
parents:
diff changeset
18 static vf_info_t* encoder_list[]={
7d1dfb59c6c0 encoders
arpi
parents:
diff changeset
19 #ifdef HAVE_DIVX4ENCORE
7d1dfb59c6c0 encoders
arpi
parents:
diff changeset
20 &ve_info_divx4,
7d1dfb59c6c0 encoders
arpi
parents:
diff changeset
21 #endif
7d1dfb59c6c0 encoders
arpi
parents:
diff changeset
22 #ifdef USE_LIBAVCODEC
7d1dfb59c6c0 encoders
arpi
parents:
diff changeset
23 &ve_info_lavc,
7d1dfb59c6c0 encoders
arpi
parents:
diff changeset
24 #endif
7d1dfb59c6c0 encoders
arpi
parents:
diff changeset
25 #ifdef USE_WIN32DLL
7d1dfb59c6c0 encoders
arpi
parents:
diff changeset
26 &ve_info_vfw,
7d1dfb59c6c0 encoders
arpi
parents:
diff changeset
27 #endif
5577
80eedd3ef6d3 RGB24/YUY2 -> DV encoding, using libdv
arpi
parents: 5550
diff changeset
28 #ifdef HAVE_LIBDV095
80eedd3ef6d3 RGB24/YUY2 -> DV encoding, using libdv
arpi
parents: 5550
diff changeset
29 &ve_info_libdv,
80eedd3ef6d3 RGB24/YUY2 -> DV encoding, using libdv
arpi
parents: 5550
diff changeset
30 #endif
5550
7d1dfb59c6c0 encoders
arpi
parents:
diff changeset
31 &ve_info_rawrgb,
7d1dfb59c6c0 encoders
arpi
parents:
diff changeset
32 NULL
7d1dfb59c6c0 encoders
arpi
parents:
diff changeset
33 };
7d1dfb59c6c0 encoders
arpi
parents:
diff changeset
34
7d1dfb59c6c0 encoders
arpi
parents:
diff changeset
35 vf_instance_t* vf_open_encoder(vf_instance_t* next, char *name, char *args){
7d1dfb59c6c0 encoders
arpi
parents:
diff changeset
36 return vf_open_plugin(encoder_list,next,name,args);
7d1dfb59c6c0 encoders
arpi
parents:
diff changeset
37 }
7d1dfb59c6c0 encoders
arpi
parents:
diff changeset
38