[xiph-commits] r16512 - trunk/ffmpeg2theora/src
j at svn.xiph.org
j at svn.xiph.org
Sun Aug 23 04:06:24 PDT 2009
Author: j
Date: 2009-08-23 04:06:24 -0700 (Sun, 23 Aug 2009)
New Revision: 16512
Modified:
trunk/ffmpeg2theora/src/ffmpeg2theora.c
trunk/ffmpeg2theora/src/ffmpeg2theora.h
Log:
include option to disable source hash
Modified: trunk/ffmpeg2theora/src/ffmpeg2theora.c
===================================================================
--- trunk/ffmpeg2theora/src/ffmpeg2theora.c 2009-08-23 10:55:51 UTC (rev 16511)
+++ trunk/ffmpeg2theora/src/ffmpeg2theora.c 2009-08-23 11:06:24 UTC (rev 16512)
@@ -64,6 +64,7 @@
NOVIDEO_FLAG,
NOSUBTITLES_FLAG,
NOMETADATA_FLAG,
+ NOOSHASH_FLAG,
NOUPSCALING_FLAG,
CROPTOP_FLAG,
CROPBOTTOM_FLAG,
@@ -166,6 +167,7 @@
this->disable_video=0;
this->disable_subtitles=0;
this->disable_metadata=0;
+ this->disable_oshash=0;
this->no_upscaling=0;
this->video_index = -1;
this->audio_index = -1;
@@ -1916,6 +1918,7 @@
" --license License\n"
" --contact Contact link\n"
" --nometadata disables metadata from input\n"
+ " --no-oshash do not include oshash of source file(SOURCE_OSHASH)\n"
"\n"
"Other options:\n"
#ifndef _WIN32
@@ -2000,6 +2003,7 @@
{"novideo",0,&flag,NOVIDEO_FLAG},
{"nosubtitles",0,&flag,NOSUBTITLES_FLAG},
{"nometadata",0,&flag,NOMETADATA_FLAG},
+ {"no-oshash",0,&flag,NOOSHASH_FLAG},
{"no-upscaling",0,&flag,NOUPSCALING_FLAG},
#ifdef HAVE_FRAMEHOOK
{"vhook",required_argument,&flag,VHOOK_FLAG},
@@ -2133,6 +2137,11 @@
convert->disable_metadata = 1;
flag = -1;
break;
+ case NOOSHASH_FLAG:
+ convert->disable_oshash = 1;
+ sprintf(info.oshash,"0");
+ flag = -1;
+ break;
case NOUPSCALING_FLAG:
convert->no_upscaling = 1;
flag = -1;
@@ -2518,11 +2527,13 @@
}
if (av_open_input_file(&convert->context, inputfile_name, input_fmt, 0, formatParams) >= 0) {
if (av_find_stream_info(convert->context) >= 0) {
+ if(!convert->disable_oshash) {
#ifdef WIN32
- sprintf(info.oshash,"%016I64x", gen_oshash(inputfile_name));
+ sprintf(info.oshash,"%016I64x", gen_oshash(inputfile_name));
#else
- sprintf(info.oshash,"%016qx", gen_oshash(inputfile_name));
+ sprintf(info.oshash,"%016qx", gen_oshash(inputfile_name));
#endif
+ }
#ifdef WIN32
if (!strcmp(outputfile_name,"-") || !strcmp(outputfile_name,"/dev/stdout")) {
_setmode(_fileno(stdout), _O_BINARY);
Modified: trunk/ffmpeg2theora/src/ffmpeg2theora.h
===================================================================
--- trunk/ffmpeg2theora/src/ffmpeg2theora.h 2009-08-23 10:55:51 UTC (rev 16511)
+++ trunk/ffmpeg2theora/src/ffmpeg2theora.h 2009-08-23 11:06:24 UTC (rev 16512)
@@ -48,6 +48,7 @@
int disable_subtitles;
int disable_metadata;
+ int disable_oshash;
int videostream;
int picture_width;
More information about the commits
mailing list