Commit f26b6c8f authored by Jan Gerber's avatar Jan Gerber
Browse files

* init framerate

 * remove avpicture_free that causes segfaults
 * add debug option to SConstruct
parent ecfae1bf
......@@ -11,6 +11,7 @@ pkg_name="ffmpeg2theora"
opts = Options()
opts.AddOptions(
BoolOption('static', 'Set to 1 for static linking', 0),
BoolOption('debug', 'Set to 1 to enable debugging', 0),
('prefix', 'install architecture-independent files in', '/usr/local'),
('bindir', 'user executables', 'PREFIX/bin'),
('mandir', 'man documentation', 'PREFIX/man'),
......@@ -42,8 +43,8 @@ env.Append(CCFLAGS=[
env.Append(CCFLAGS = Split('$APPEND_CCFLAGS'))
env.Append(LINKFLAGS = Split('$APPEND_LINKFLAGS'))
#if env['CC'] == 'gcc':
# env.Append(CCFLAGS=["-g", "-O2", "-Wall"])
if env['debug'] and env['CC'] == 'gcc':
env.Append(CCFLAGS=["-g", "-O2", "-Wall"])
def CheckPKGConfig(context, version):
context.Message( 'Checking for pkg-config... ' )
......
......@@ -123,7 +123,6 @@ static AVFrame *frame_alloc (int pix_fmt, int width, int height) {
*/
static void frame_dealloc (AVFrame *frame) {
if (frame) {
avpicture_free((AVPicture*)frame);
av_free(frame);
}
}
......@@ -1041,6 +1040,9 @@ AVRational get_framerate(const char* arg)
const char *p;
AVRational framerate;
framerate.num = -1;
framerate.den = 1;
p = strchr(arg, ':');
if (!p) {
p = strchr(arg, '/');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment