summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authoralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-05-12 16:02:34 +0000
committeralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-05-12 16:02:34 +0000
commit4e583b98dbdef22b40032d0edb469c7535a30a38 (patch)
tree92f3b5e132863fb0fca0e1fda17fbd18b21eb675 /libmpcodecs
parenta7654868a0aef49d7d69390e0bafddf5fb224cfa (diff)
downloadmpv-4e583b98dbdef22b40032d0edb469c7535a30a38.tar.bz2
mpv-4e583b98dbdef22b40032d0edb469c7535a30a38.tar.xz
dynamic path[] allocation
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10103 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/vd_realvid.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libmpcodecs/vd_realvid.c b/libmpcodecs/vd_realvid.c
index d5c824bc60..fd868d4df2 100644
--- a/libmpcodecs/vd_realvid.c
+++ b/libmpcodecs/vd_realvid.c
@@ -191,7 +191,7 @@ struct rv_init_t {
// init driver
static int init(sh_video_t *sh){
//unsigned int out_fmt;
- char path[4096];
+ char *path;
int result;
// we export codec id and sub-id from demuxer in bitmapinfohdr:
unsigned int* extrahdr=(unsigned int*)(sh->bih+1);
@@ -201,6 +201,8 @@ static int init(sh_video_t *sh){
mp_msg(MSGT_DECVIDEO,MSGL_V,"realvideo codec id: 0x%08X sub-id: 0x%08X\n",extrahdr[1],extrahdr[0]);
+ path = malloc(strlen(REALCODEC_PATH)+strlen(sh->codec->dll)+2);
+ if (!path) return 0;
sprintf(path, REALCODEC_PATH "/%s", sh->codec->dll);
/* first try to load linux dlls, if failed and we're supporting win32 dlls,
@@ -214,8 +216,10 @@ static int init(sh_video_t *sh){
{
mp_msg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_MissingDLLcodec,sh->codec->dll);
mp_msg(MSGT_DECVIDEO,MSGL_HINT,"Read the RealVideo section of the DOCS!\n");
+ free(path);
return 0;
}
+ free(path);
// only I420 supported
// if((sh->format!=0x30335652) && !mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_I420)) return 0;
// init codec: