Files
Velix-MPV-Core/loader/codecpath.c
T
reimar a743c0a738 Split codec path related code into a separate file to fix Windows build.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30930 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-03-18 20:44:01 +00:00

27 lines
496 B
C

/*
* Modified for use with MPlayer, detailed changelog at
* http://svn.mplayerhq.hu/mplayer/trunk/
*/
#include <stdlib.h>
#include <string.h>
#include "config.h"
#include "codecpath.h"
char* def_path = BINARY_CODECS_PATH;
static int needs_free=0;
void SetCodecPath(const char* path)
{
if(needs_free)free(def_path);
if(path==0)
{
def_path = BINARY_CODECS_PATH;
needs_free=0;
return;
}
def_path = malloc(strlen(path)+1);
strcpy(def_path, path);
needs_free=1;
}