[Ffmpeg-cvslog] CVS: ffmpeg COPYING, 1.3, 1.4 Changelog, 1.56, 1.57 Doxyfile, 1.8, 1.9 INSTALL, 1.2, 1.3 Makefile, 1.85, 1.86 README, 1.6, 1.7 berrno.h, 1.2, 1.3 build_avopt, 1.1, 1.2 cmdutils.c, 1.9, 1.10 configure, 1.219, 1.220 cws2fws.c, 1.1, 1.2 ffmpeg.c, 1.355, 1.356 ffplay.c, 1.52, 1.53 ffserver.c, 1.101, 1.102 output_example.c, 1.17, 1.18 pktdumper.c, 1.3, 1.4 xvmc_render.h, 1.1, 1.2

Diego Biurrun CVS diego
Sat Dec 17 19:15:02 CET 2005


Update of /cvsroot/ffmpeg/ffmpeg
In directory mail:/var2/tmp/cvs-serv18206

Modified Files:
	COPYING Changelog Doxyfile INSTALL Makefile README berrno.h 
	build_avopt cmdutils.c configure cws2fws.c ffmpeg.c ffplay.c 
	ffserver.c output_example.c pktdumper.c xvmc_render.h 
Log Message:
COSMETICS: Remove all trailing whitespace.


Index: COPYING
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/COPYING,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- COPYING	25 May 2002 23:01:48 -0000	1.3
+++ COPYING	17 Dec 2005 18:14:25 -0000	1.4
@@ -146,7 +146,7 @@
 on the Library (independent of the use of the Library in a tool for
 writing it).  Whether that is true depends on what the Library does
 and what the program that uses the Library does.
-  
+
   1. You may copy and distribute verbatim copies of the Library's
 complete source code as you receive it, in any medium, provided that
 you conspicuously and appropriately publish on each copy an

Index: Changelog
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/Changelog,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- Changelog	12 Dec 2005 00:53:05 -0000	1.56
+++ Changelog	17 Dec 2005 18:14:25 -0000	1.57
@@ -11,7 +11,7 @@
 - Nullsoft Video (NSV) file demuxer
 - Shorten audio decoder
 - LOCO video decoder
-- Apple Lossless Audio Codec (ALAC) decoder 
+- Apple Lossless Audio Codec (ALAC) decoder
 - Winnov WNV1 video decoder
 - Autodesk Animator Studio Codec (AASC) decoder
 - Indeo 2 video decoder

Index: Doxyfile
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/Doxyfile,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- Doxyfile	15 Jul 2004 15:14:13 -0000	1.8
+++ Doxyfile	17 Dec 2005 18:14:25 -0000	1.9
@@ -14,283 +14,283 @@
 # General configuration options
 #---------------------------------------------------------------------------
 
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
 # by quotes) that should identify the project.
 
 PROJECT_NAME           = ffmpeg
 
-# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
-# This could be handy for archiving the generated documentation or 
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
 # if some version control system is used.
 
-PROJECT_NUMBER         = 
+PROJECT_NUMBER         =
 
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
-# base path where the generated documentation will be put. 
-# If a relative path is entered, it will be relative to the location 
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
 # where doxygen was started. If left blank the current directory will be used.
 
 OUTPUT_DIRECTORY       = doxy
 
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
-# documentation generated by doxygen is written. Doxygen will use this 
-# information to generate all constant output in the proper language. 
-# The default language is English, other supported languages are: 
-# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, 
-# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en 
-# (Japanese with english messages), Korean, Norwegian, Polish, Portuguese, 
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch,
+# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en
+# (Japanese with english messages), Korean, Norwegian, Polish, Portuguese,
 # Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish and Ukrainian.
 
 OUTPUT_LANGUAGE        = English
 
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
-# documentation are documented, even if no documentation was available. 
-# Private class members and static file members will be hidden unless 
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
 # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
 
 EXTRACT_ALL            = YES
 
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
 # will be included in the documentation.
 
 EXTRACT_PRIVATE        = YES
 
-# If the EXTRACT_STATIC tag is set to YES all static members of a file 
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
 # will be included in the documentation.
 
 EXTRACT_STATIC         = YES
 
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
-# defined locally in source files will be included in the documentation. 
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
+# defined locally in source files will be included in the documentation.
 # If set to NO only classes defined in header files are included.
 
 EXTRACT_LOCAL_CLASSES  = YES
 
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
-# undocumented members of documented classes, files or namespaces. 
-# If set to NO (the default) these members will be included in the 
-# various overviews, but no documentation section is generated. 
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
 # This option has no effect if EXTRACT_ALL is enabled.
 
 HIDE_UNDOC_MEMBERS     = NO
 
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
-# undocumented classes that are normally visible in the class hierarchy. 
-# If set to NO (the default) these class will be included in the various 
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these class will be included in the various
 # overviews. This option has no effect if EXTRACT_ALL is enabled.
 
 HIDE_UNDOC_CLASSES     = NO
 
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
-# friend (class|struct|union) declarations. 
-# If set to NO (the default) these declarations will be included in the 
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
+# friend (class|struct|union) declarations.
+# If set to NO (the default) these declarations will be included in the
 # documentation.
 
 HIDE_FRIEND_COMPOUNDS  = NO
 
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
-# documentation blocks found inside the body of a function. 
-# If set to NO (the default) these blocks will be appended to the 
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
+# documentation blocks found inside the body of a function.
+# If set to NO (the default) these blocks will be appended to the
 # function's detailed documentation block.
 
 HIDE_IN_BODY_DOCS      = NO
 
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
-# include brief member descriptions after the members that are listed in 
-# the file and class documentation (similar to JavaDoc). 
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
 # Set to NO to disable this.
 
 BRIEF_MEMBER_DESC      = YES
 
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
-# the brief description of a member or function before the detailed description. 
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
 # brief descriptions will be completely suppressed.
 
 REPEAT_BRIEF           = YES
 
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
-# Doxygen will generate a detailed section even if there is only a brief 
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
 # description.
 
 ALWAYS_DETAILED_SEC    = NO
 
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited 
-# members of a class in the documentation of that class as if those members were 
-# ordinary class members. Constructors, destructors and assignment operators of 
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited
+# members of a class in the documentation of that class as if those members were
+# ordinary class members. Constructors, destructors and assignment operators of
 # the base classes will not be shown.
 
 INLINE_INHERITED_MEMB  = NO
 
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
-# path before files name in the file list and in the header files. If set 
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
 # to NO the shortest path that makes the file name unique will be used.
 
 FULL_PATH_NAMES        = YES
 
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
-# can be used to strip a user defined part of the path. Stripping is 
-# only done if one of the specified strings matches the left-hand part of 
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
 # the path. It is allowed to use relative paths in the argument list.
 
 STRIP_FROM_PATH        = .
 
-# The INTERNAL_DOCS tag determines if documentation 
-# that is typed after a \internal command is included. If the tag is set 
-# to NO (the default) then the documentation will be excluded. 
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
 # Set it to YES to include the internal documentation.
 
 INTERNAL_DOCS          = NO
 
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
-# file names in lower case letters. If set to YES upper case letters are also 
-# allowed. This is useful if you have classes or files whose names only differ 
-# in case and if your file system supports case sensitive file names. Windows 
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower case letters. If set to YES upper case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
 # users are adviced to set this option to NO.
 
 CASE_SENSE_NAMES       = YES
 
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
-# (but less readable) file names. This can be useful is your file systems 
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+# (but less readable) file names. This can be useful is your file systems
 # doesn't support long names like on DOS, Mac, or CD-ROM.
 
 SHORT_NAMES            = NO
 
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
-# will show members with their full class and namespace scopes in the 
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
 # documentation. If set to YES the scope will be hidden.
 
 HIDE_SCOPE_NAMES       = NO
 
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
-# will generate a verbatim copy of the header file for each class for 
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
 # which an include is specified. Set to NO to disable this.
 
 VERBATIM_HEADERS       = YES
 
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
-# will put list of the files that are included by a file in the documentation 
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put list of the files that are included by a file in the documentation
 # of that file.
 
 SHOW_INCLUDE_FILES     = YES
 
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
-# will interpret the first line (until the first dot) of a JavaDoc-style 
-# comment as the brief description. If set to NO, the JavaDoc 
-# comments  will behave just like the Qt-style comments (thus requiring an 
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments  will behave just like the Qt-style comments (thus requiring an
 # explict @brief command for a brief description.
 
 JAVADOC_AUTOBRIEF      = YES
 
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
-# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
-# comments) as a brief description. This used to be the default behaviour. 
-# The new default is to treat a multi-line C++ comment block as a detailed 
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
+# treat a multi-line C++ special comment block (i.e. a block of //! or ///
+# comments) as a brief description. This used to be the default behaviour.
+# The new default is to treat a multi-line C++ comment block as a detailed
 # description. Set this tag to YES if you prefer the old behaviour instead.
 
 MULTILINE_CPP_IS_BRIEF = NO
 
-# If the DETAILS_AT_TOP tag is set to YES then Doxygen 
+# If the DETAILS_AT_TOP tag is set to YES then Doxygen
 # will output the detailed description near the top, like JavaDoc.
-# If set to NO, the detailed description appears after the member 
+# If set to NO, the detailed description appears after the member
 # documentation.
 
 DETAILS_AT_TOP         = NO
 
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
-# member inherits the documentation from any documented member that it 
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
 # reimplements.
 
 INHERIT_DOCS           = YES
 
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
 # is inserted in the documentation for inline members.
 
 INLINE_INFO            = YES
 
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
-# will sort the (detailed) documentation of file and class members 
-# alphabetically by member name. If set to NO the members will appear in 
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
 # declaration order.
 
 SORT_MEMBER_DOCS       = YES
 
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
-# tag is set to YES, then doxygen will reuse the documentation of the first 
-# member in the group (if any) for the other members of the group. By default 
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
 # all members of a group must be documented explicitly.
 
 DISTRIBUTE_GROUP_DOC   = NO
 
-# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
 # Doxygen uses this value to replace tabs by spaces in code fragments.
 
 TAB_SIZE               = 8
 
-# The GENERATE_TODOLIST tag can be used to enable (YES) or 
-# disable (NO) the todo list. This list is created by putting \todo 
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
 # commands in the documentation.
 
 GENERATE_TODOLIST      = YES
 
-# The GENERATE_TESTLIST tag can be used to enable (YES) or 
-# disable (NO) the test list. This list is created by putting \test 
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
 # commands in the documentation.
 
 GENERATE_TESTLIST      = YES
 
-# The GENERATE_BUGLIST tag can be used to enable (YES) or 
-# disable (NO) the bug list. This list is created by putting \bug 
+# The GENERATE_BUGLIST tag can be used to enable (YES) or
+# disable (NO) the bug list. This list is created by putting \bug
 # commands in the documentation.
 
 GENERATE_BUGLIST       = YES
 
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
-# disable (NO) the deprecated list. This list is created by putting 
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
+# disable (NO) the deprecated list. This list is created by putting
 # \deprecated commands in the documentation.
 
 GENERATE_DEPRECATEDLIST= YES
 
-# This tag can be used to specify a number of aliases that acts 
-# as commands in the documentation. An alias has the form "name=value". 
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
-# put the command \sideeffect (or @sideeffect) in the documentation, which 
-# will result in a user defined paragraph with heading "Side Effects:". 
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user defined paragraph with heading "Side Effects:".
 # You can put \n's in the value part of an alias to insert newlines.
 
-ALIASES                = 
+ALIASES                =
 
-# The ENABLED_SECTIONS tag can be used to enable conditional 
+# The ENABLED_SECTIONS tag can be used to enable conditional
 # documentation sections, marked by \if sectionname ... \endif.
 
-ENABLED_SECTIONS       = 
+ENABLED_SECTIONS       =
 
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
-# the initial value of a variable or define consist of for it to appear in 
-# the documentation. If the initializer consists of more lines than specified 
-# here it will be hidden. Use a value of 0 to hide initializers completely. 
-# The appearance of the initializer of individual variables and defines in the 
-# documentation can be controlled using \showinitializer or \hideinitializer 
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
+# the initial value of a variable or define consist of for it to appear in
+# the documentation. If the initializer consists of more lines than specified
+# here it will be hidden. Use a value of 0 to hide initializers completely.
+# The appearance of the initializer of individual variables and defines in the
+# documentation can be controlled using \showinitializer or \hideinitializer
 # command in the documentation regardless of this setting.
 
 MAX_INITIALIZER_LINES  = 30
 
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources 
-# only. Doxygen will then generate output that is more tailored for C. 
-# For instance some of the names that are used will be different. The list 
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C.
+# For instance some of the names that are used will be different. The list
 # of all members will be omitted, etc.
 
 OPTIMIZE_OUTPUT_FOR_C  = YES
 
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources 
-# only. Doxygen will then generate output that is more tailored for Java. 
-# For instance namespaces will be presented as packages, qualified scopes 
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources
+# only. Doxygen will then generate output that is more tailored for Java.
+# For instance namespaces will be presented as packages, qualified scopes
 # will look different, etc.
 
 OPTIMIZE_OUTPUT_JAVA   = NO
 
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
-# at the bottom of the documentation of classes and structs. If set to YES the 
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
+# at the bottom of the documentation of classes and structs. If set to YES the
 # list will mention the files that were used to generate the documentation.
 
 SHOW_USED_FILES        = YES
@@ -299,116 +299,116 @@
 # configuration options related to warning and progress messages
 #---------------------------------------------------------------------------
 
-# The QUIET tag can be used to turn on/off the messages that are generated 
+# The QUIET tag can be used to turn on/off the messages that are generated
 # by doxygen. Possible values are YES and NO. If left blank NO is used.
 
 QUIET                  = NO
 
-# The WARNINGS tag can be used to turn on/off the warning messages that are 
-# generated by doxygen. Possible values are YES and NO. If left blank 
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
 # NO is used.
 
 WARNINGS               = YES
 
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
 # automatically be disabled.
 
 WARN_IF_UNDOCUMENTED   = YES
 
-# The WARN_FORMAT tag determines the format of the warning messages that 
-# doxygen can produce. The string should contain the $file, $line, and $text 
-# tags, which will be replaced by the file and line number from which the 
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
 # warning originated and the warning text.
 
 WARN_FORMAT            = "$file:$line: $text"
 
-# The WARN_LOGFILE tag can be used to specify a file to which warning 
-# and error messages should be written. If left blank the output is written 
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
 # to stderr.
 
-WARN_LOGFILE           = 
+WARN_LOGFILE           =
 
 #---------------------------------------------------------------------------
 # configuration options related to the input files
 #---------------------------------------------------------------------------
 
-# The INPUT tag can be used to specify the files and/or directories that contain 
-# documented source files. You may enter file names like "myfile.cpp" or 
-# directories like "/usr/src/myproject". Separate the files or directories 
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
 # with spaces.
 
-INPUT                  = 
+INPUT                  =
 
-# If the value of the INPUT tag contains directories, you can use the 
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
-# blank the following patterns are tested: 
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp 
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank the following patterns are tested:
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp
 # *.h++ *.idl *.odl
 
-FILE_PATTERNS          = 
+FILE_PATTERNS          =
 
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
-# should be searched for input files as well. Possible values are YES and NO. 
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
 # If left blank NO is used.
 
 RECURSIVE              = YES
 
-# The EXCLUDE tag can be used to specify files and/or directories that should 
-# excluded from the INPUT source files. This way you can easily exclude a 
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
 # subdirectory from a directory tree whose root is specified with the INPUT tag.
 
-EXCLUDE                = 
+EXCLUDE                =
 
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories 
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories
 # that are symbolic links (a Unix filesystem feature) are excluded from the input.
 
 EXCLUDE_SYMLINKS       = NO
 
-# If the value of the INPUT tag contains directories, you can use the 
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
 # certain files from those directories.
 
-EXCLUDE_PATTERNS       = 
+EXCLUDE_PATTERNS       =
 
-# The EXAMPLE_PATH tag can be used to specify one or more files or 
-# directories that contain example code fragments that are included (see 
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
 # the \include command).
 
-EXAMPLE_PATH           = 
+EXAMPLE_PATH           =
 
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
 # blank all files are included.
 
-EXAMPLE_PATTERNS       = 
+EXAMPLE_PATTERNS       =
 
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
-# searched for input files to be used with the \include or \dontinclude 
-# commands irrespective of the value of the RECURSIVE tag. 
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude
+# commands irrespective of the value of the RECURSIVE tag.
 # Possible values are YES and NO. If left blank NO is used.
 
 EXAMPLE_RECURSIVE      = NO
 
-# The IMAGE_PATH tag can be used to specify one or more files or 
-# directories that contain image that are included in the documentation (see 
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
 # the \image command).
 
-IMAGE_PATH             = 
+IMAGE_PATH             =
 
-# The INPUT_FILTER tag can be used to specify a program that doxygen should 
-# invoke to filter for each input file. Doxygen will invoke the filter program 
-# by executing (via popen()) the command <filter> <input-file>, where <filter> 
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
-# input file. Doxygen will then use the output that the filter program writes 
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command <filter> <input-file>, where <filter>
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
+# input file. Doxygen will then use the output that the filter program writes
 # to standard output.
 
-INPUT_FILTER           = 
+INPUT_FILTER           =
 
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
-# INPUT_FILTER) will be used to filter the input files when producing source 
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
 # files to browse (i.e. when SOURCE_BROWSER is set to YES).
 
 FILTER_SOURCE_FILES    = NO
@@ -417,30 +417,30 @@
 # configuration options related to source browsing
 #---------------------------------------------------------------------------
 
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
 # be generated. Documented entities will be cross-referenced with these sources.
 
 SOURCE_BROWSER         = YES
 
-# Setting the INLINE_SOURCES tag to YES will include the body 
+# Setting the INLINE_SOURCES tag to YES will include the body
 # of functions and classes directly in the documentation.
 
 INLINE_SOURCES         = NO
 
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
-# doxygen to hide any special comment blocks from generated source code 
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
 # fragments. Normal C and C++ comments will always remain visible.
 
 STRIP_CODE_COMMENTS    = YES
 
-# If the REFERENCED_BY_RELATION tag is set to YES (the default) 
-# then for each documented function all documented 
+# If the REFERENCED_BY_RELATION tag is set to YES (the default)
+# then for each documented function all documented
 # functions referencing it will be listed.
 
 REFERENCED_BY_RELATION = YES
 
-# If the REFERENCES_RELATION tag is set to YES (the default) 
-# then for each documented function all documented entities 
+# If the REFERENCES_RELATION tag is set to YES (the default)
+# then for each documented function all documented entities
 # called/used by that function will be listed.
 
 REFERENCES_RELATION    = NO
@@ -449,132 +449,132 @@
 # configuration options related to the alphabetical class index
 #---------------------------------------------------------------------------
 
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
-# of all compounds will be generated. Enable this if the project 
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+# of all compounds will be generated. Enable this if the project
 # contains a lot of classes, structs, unions or interfaces.
 
 ALPHABETICAL_INDEX     = YES
 
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
 # in which this list will be split (can be a number in the range [1..20])
 
 COLS_IN_ALPHA_INDEX    = 5
 
-# In case all classes in a project start with a common prefix, all 
-# classes will be put under the same header in the alphabetical index. 
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
 # should be ignored while generating the index headers.
 
-IGNORE_PREFIX          = 
+IGNORE_PREFIX          =
 
 #---------------------------------------------------------------------------
 # configuration options related to the HTML output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
 # generate HTML output.
 
 GENERATE_HTML          = YES
 
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
 # put in front of it. If left blank `html' will be used as the default path.
 
 HTML_OUTPUT            = html
 
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
 # doxygen will generate files with .html extension.
 
 HTML_FILE_EXTENSION    = .html
 
-# The HTML_HEADER tag can be used to specify a personal HTML header for 
-# each generated HTML page. If it is left blank doxygen will generate a 
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
 # standard header.
 
-HTML_HEADER            = 
+HTML_HEADER            =
 
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
-# each generated HTML page. If it is left blank doxygen will generate a 
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
 # standard footer.
 
-HTML_FOOTER            = 
+HTML_FOOTER            =
 
-# The HTML_STYLESHEET tag can be used to specify a user defined cascading 
-# style sheet that is used by each HTML page. It can be used to 
-# fine-tune the look of the HTML output. If the tag is left blank doxygen 
+# The HTML_STYLESHEET tag can be used to specify a user defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If the tag is left blank doxygen
 # will generate a default style sheet
 
-HTML_STYLESHEET        = 
+HTML_STYLESHEET        =
 
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
-# files or namespaces will be aligned in HTML using tables. If set to 
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
+# files or namespaces will be aligned in HTML using tables. If set to
 # NO a bullet list will be used.
 
 HTML_ALIGN_MEMBERS     = YES
 
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
-# will be generated that can be used as input for tools like the 
-# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) 
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
 # of the generated HTML documentation.
 
 GENERATE_HTMLHELP      = NO
 
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
-# be used to specify the file name of the resulting .chm file. You 
-# can add a path in front of the file if the result should not be 
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
+# be used to specify the file name of the resulting .chm file. You
+# can add a path in front of the file if the result should not be
 # written to the html output dir.
 
-CHM_FILE               = 
+CHM_FILE               =
 
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
-# be used to specify the location (absolute path including file name) of 
-# the HTML help compiler (hhc.exe). If non empty doxygen will try to run 
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
+# be used to specify the location (absolute path including file name) of
+# the HTML help compiler (hhc.exe). If non empty doxygen will try to run
 # the html help compiler on the generated index.hhp.
 
-HHC_LOCATION           = 
+HHC_LOCATION           =
 
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
-# controls if a separate .chi index file is generated (YES) or that 
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+# controls if a separate .chi index file is generated (YES) or that
 # it should be included in the master .chm file (NO).
 
 GENERATE_CHI           = NO
 
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
-# controls whether a binary table of contents is generated (YES) or a 
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
+# controls whether a binary table of contents is generated (YES) or a
 # normal table of contents (NO) in the .chm file.
 
 BINARY_TOC             = NO
 
-# The TOC_EXPAND flag can be set to YES to add extra items for group members 
+# The TOC_EXPAND flag can be set to YES to add extra items for group members
 # to the contents of the Html help documentation and to the tree view.
 
 TOC_EXPAND             = NO
 
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
-# top of each HTML page. The value NO (the default) enables the index and 
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
+# top of each HTML page. The value NO (the default) enables the index and
 # the value YES disables it.
 
 DISABLE_INDEX          = NO
 
-# This tag can be used to set the number of enum values (range [1..20]) 
+# This tag can be used to set the number of enum values (range [1..20])
 # that doxygen will group on one line in the generated HTML documentation.
 
 ENUM_VALUES_PER_LINE   = 4
 
 # If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
-# generated containing a tree-like index structure (just like the one that 
-# is generated for HTML Help). For this to work a browser that supports 
-# JavaScript and frames is required (for instance Mozilla, Netscape 4.0+, 
-# or Internet explorer 4.0+). Note that for large projects the tree generation 
-# can take a very long time. In such cases it is better to disable this feature. 
+# generated containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript and frames is required (for instance Mozilla, Netscape 4.0+,
+# or Internet explorer 4.0+). Note that for large projects the tree generation
+# can take a very long time. In such cases it is better to disable this feature.
 # Windows users are probably better off using the HTML help feature.
 
 GENERATE_TREEVIEW      = NO
 
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
-# used to set the initial width (in pixels) of the frame in which the tree 
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
 # is shown.
 
 TREEVIEW_WIDTH         = 250
@@ -583,68 +583,68 @@
 # configuration options related to the LaTeX output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
 # generate Latex output.
 
 GENERATE_LATEX         = YES
 
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
 # put in front of it. If left blank `latex' will be used as the default path.
 
 LATEX_OUTPUT           = latex
 
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
 # invoked. If left blank `latex' will be used as the default command name.
 
 LATEX_CMD_NAME         = latex
 
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
-# generate index for LaTeX. If left blank `makeindex' will be used as the 
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
+# generate index for LaTeX. If left blank `makeindex' will be used as the
 # default command name.
 
 MAKEINDEX_CMD_NAME     = makeindex
 
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
-# LaTeX documents. This may be useful for small projects and may help to 
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
 # save some trees in general.
 
 COMPACT_LATEX          = NO
 
-# The PAPER_TYPE tag can be used to set the paper type that is used 
-# by the printer. Possible values are: a4, a4wide, letter, legal and 
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, a4wide, letter, legal and
 # executive. If left blank a4wide will be used.
 
 PAPER_TYPE             = a4wide
 
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
 # packages that should be included in the LaTeX output.
 
-EXTRA_PACKAGES         = 
+EXTRA_PACKAGES         =
 
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
-# the generated latex document. The header should contain everything until 
-# the first chapter. If it is left blank doxygen will generate a 
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
 # standard header. Notice: only use this tag if you know what you are doing!
 
-LATEX_HEADER           = 
+LATEX_HEADER           =
 
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
-# contain links (just like the HTML output) instead of page references 
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
 # This makes the output suitable for online browsing using a pdf viewer.
 
 PDF_HYPERLINKS         = NO
 
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
-# plain latex in the generated Makefile. Set this option to YES to get a 
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
 # higher quality PDF documentation.
 
 USE_PDFLATEX           = NO
 
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
-# command to the generated LaTeX files. This will instruct LaTeX to keep 
-# running if errors occur, instead of asking the user for help. 
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
 # This option is also used when generating formulas in HTML.
 
 LATEX_BATCHMODE        = NO
@@ -653,68 +653,68 @@
 # configuration options related to the RTF output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
-# The RTF output is optimised for Word 97 and may not look very pretty with 
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+# The RTF output is optimised for Word 97 and may not look very pretty with
 # other RTF readers or editors.
 
 GENERATE_RTF           = NO
 
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
 # put in front of it. If left blank `rtf' will be used as the default path.
 
 RTF_OUTPUT             = rtf
 
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
-# RTF documents. This may be useful for small projects and may help to 
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+# RTF documents. This may be useful for small projects and may help to
 # save some trees in general.
 
 COMPACT_RTF            = NO
 
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
-# will contain hyperlink fields. The RTF file will 
-# contain links (just like the HTML output) instead of page references. 
-# This makes the output suitable for online browsing using WORD or other 
-# programs which support those fields. 
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+# will contain hyperlink fields. The RTF file will
+# contain links (just like the HTML output) instead of page references.
+# This makes the output suitable for online browsing using WORD or other
+# programs which support those fields.
 # Note: wordpad (write) and others do not support links.
 
 RTF_HYPERLINKS         = NO
 
-# Load stylesheet definitions from file. Syntax is similar to doxygen's 
-# config file, i.e. a series of assigments. You only have to provide 
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# config file, i.e. a series of assigments. You only have to provide
 # replacements, missing definitions are set to their default value.
 
-RTF_STYLESHEET_FILE    = 
+RTF_STYLESHEET_FILE    =
 
-# Set optional variables used in the generation of an rtf document. 
+# Set optional variables used in the generation of an rtf document.
 # Syntax is similar to doxygen's config file.
 
-RTF_EXTENSIONS_FILE    = 
+RTF_EXTENSIONS_FILE    =
 
 #---------------------------------------------------------------------------
 # configuration options related to the man page output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
 # generate man pages
 
 GENERATE_MAN           = NO
 
-# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
 # put in front of it. If left blank `man' will be used as the default path.
 
 MAN_OUTPUT             = man
 
-# The MAN_EXTENSION tag determines the extension that is added to 
+# The MAN_EXTENSION tag determines the extension that is added to
 # the generated man pages (default is the subroutine's section .3)
 
 MAN_EXTENSION          = .3
 
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
-# then it will generate one additional man file for each entity 
-# documented in the real man page(s). These additional files 
-# only source the real man page, but without them the man command 
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
+# then it will generate one additional man file for each entity
+# documented in the real man page(s). These additional files
+# only source the real man page, but without them the man command
 # would be unable to find the correct page. The default is NO.
 
 MAN_LINKS              = NO
@@ -723,34 +723,34 @@
 # configuration options related to the XML output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_XML tag is set to YES Doxygen will 
-# generate an XML file that captures the structure of 
-# the code including all documentation. Note that this 
-# feature is still experimental and incomplete at the 
+# If the GENERATE_XML tag is set to YES Doxygen will
+# generate an XML file that captures the structure of
+# the code including all documentation. Note that this
+# feature is still experimental and incomplete at the
 # moment.
 
 GENERATE_XML           = NO
 
-# The XML_SCHEMA tag can be used to specify an XML schema, 
-# which can be used by a validating XML parser to check the 
+# The XML_SCHEMA tag can be used to specify an XML schema,
+# which can be used by a validating XML parser to check the
 # syntax of the XML files.
 
-XML_SCHEMA             = 
+XML_SCHEMA             =
 
-# The XML_DTD tag can be used to specify an XML DTD, 
-# which can be used by a validating XML parser to check the 
+# The XML_DTD tag can be used to specify an XML DTD,
+# which can be used by a validating XML parser to check the
 # syntax of the XML files.
 
-XML_DTD                = 
+XML_DTD                =
 
 #---------------------------------------------------------------------------
 # configuration options for the AutoGen Definitions output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
-# generate an AutoGen Definitions (see autogen.sf.net) file 
-# that captures the structure of the code including all 
-# documentation. Note that this feature is still experimental 
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
+# generate an AutoGen Definitions (see autogen.sf.net) file
+# that captures the structure of the code including all
+# documentation. Note that this feature is still experimental
 # and incomplete at the moment.
 
 GENERATE_AUTOGEN_DEF   = NO
@@ -759,280 +759,280 @@
 # configuration options related to the Perl module output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
-# generate a Perl module file that captures the structure of 
-# the code including all documentation. Note that this 
-# feature is still experimental and incomplete at the 
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will
+# generate a Perl module file that captures the structure of
+# the code including all documentation. Note that this
+# feature is still experimental and incomplete at the
 # moment.
 
 GENERATE_PERLMOD       = NO
 
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able
 # to generate PDF and DVI output from the Perl module output.
 
 PERLMOD_LATEX          = NO
 
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
-# nicely formatted so it can be parsed by a human reader.  This is useful 
-# if you want to understand what is going on.  On the other hand, if this 
-# tag is set to NO the size of the Perl module output will be much smaller 
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
+# nicely formatted so it can be parsed by a human reader.  This is useful
+# if you want to understand what is going on.  On the other hand, if this
+# tag is set to NO the size of the Perl module output will be much smaller
 # and Perl will parse it just the same.
 
 PERLMOD_PRETTY         = YES
 
-# The names of the make variables in the generated doxyrules.make file 
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
-# This is useful so different doxyrules.make files included by the same 
+# The names of the make variables in the generated doxyrules.make file
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
+# This is useful so different doxyrules.make files included by the same
 # Makefile don't overwrite each other's variables.
 
-PERLMOD_MAKEVAR_PREFIX = 
+PERLMOD_MAKEVAR_PREFIX =
 
 #---------------------------------------------------------------------------
-# Configuration options related to the preprocessor   
+# Configuration options related to the preprocessor
 #---------------------------------------------------------------------------
 
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
-# evaluate all C-preprocessor directives found in the sources and include 
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
 # files.
 
 ENABLE_PREPROCESSING   = YES
 
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
-# names in the source code. If set to NO (the default) only conditional 
-# compilation will be performed. Macro expansion can be done in a controlled 
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
 # way by setting EXPAND_ONLY_PREDEF to YES.
 
 MACRO_EXPANSION        = YES
 
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
-# then the macro expansion is limited to the macros specified with the 
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
 # PREDEFINED and EXPAND_AS_PREDEFINED tags.
 
 EXPAND_ONLY_PREDEF     = YES
 
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
 # in the INCLUDE_PATH (see below) will be search if a #include is found.
 
 SEARCH_INCLUDES        = YES
 
-# The INCLUDE_PATH tag can be used to specify one or more directories that 
-# contain include files that are not input files but should be processed by 
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
 # the preprocessor.
 
-INCLUDE_PATH           = 
+INCLUDE_PATH           =
 
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
-# patterns (like *.h and *.hpp) to filter out the header-files in the 
-# directories. If left blank, the patterns specified with FILE_PATTERNS will 
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
 # be used.
 
-INCLUDE_FILE_PATTERNS  = 
+INCLUDE_FILE_PATTERNS  =
 
-# The PREDEFINED tag can be used to specify one or more macro names that 
-# are defined before the preprocessor is started (similar to the -D option of 
-# gcc). The argument of the tag is a list of macros of the form: name 
-# or name=definition (no spaces). If the definition and the = are 
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
 # omitted =1 is assumed.
 
 PREDEFINED             = __attribute__(x)="" "RENAME(x)=x ## _TMPL" "DEF(x)=x ## _TMPL" \
                          HAVE_BUILTIN_VECTOR HAVE_AV_CONFIG_H HAVE_MMX HAVE_MMX2 HAVE_3DNOW \
                          ATTR_ALIGN(x)=""
 
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
-# this tag can be used to specify a list of macro names that should be expanded. 
-# The macro definition that is found in the sources will be used. 
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
+# this tag can be used to specify a list of macro names that should be expanded.
+# The macro definition that is found in the sources will be used.
 # Use the PREDEFINED tag if you want to use a different macro definition.
 
 #EXPAND_AS_DEFINED      = FF_COMMON_FRAME
 EXPAND_AS_DEFINED      = declare_idct(idct, table, idct_row_head, idct_row, idct_row_tail, idct_row_mid)
 
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
-# doxygen's preprocessor will remove all function-like macros that are alone 
-# on a line, have an all uppercase name, and do not end with a semicolon. Such 
-# function macros are typically used for boiler-plate code, and will confuse the 
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
+# doxygen's preprocessor will remove all function-like macros that are alone
+# on a line, have an all uppercase name, and do not end with a semicolon. Such
+# function macros are typically used for boiler-plate code, and will confuse the
 # parser if not removed.
 
 SKIP_FUNCTION_MACROS   = YES
 
 #---------------------------------------------------------------------------
-# Configuration::addtions related to external references   
+# Configuration::addtions related to external references
 #---------------------------------------------------------------------------
 
 # The TAGFILES tag can be used to specify one or more tagfiles.
 
-TAGFILES               = 
+TAGFILES               =
 
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create
 # a tag file that is based on the input files it reads.
 
-GENERATE_TAGFILE       = 
+GENERATE_TAGFILE       =
 
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
-# in the class index. If set to NO only the inherited external classes 
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed
+# in the class index. If set to NO only the inherited external classes
 # will be listed.
 
 ALLEXTERNALS           = NO
 
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
-# in the modules index. If set to NO, only the current project's groups will 
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will
 # be listed.
 
 EXTERNAL_GROUPS        = YES
 
-# The PERL_PATH should be the absolute path and name of the perl script 
+# The PERL_PATH should be the absolute path and name of the perl script
 # interpreter (i.e. the result of `which perl').
 
 PERL_PATH              = /usr/bin/perl
 
 #---------------------------------------------------------------------------
-# Configuration options related to the dot tool   
+# Configuration options related to the dot tool
 #---------------------------------------------------------------------------
 
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
-# generate a inheritance diagram (in Html, RTF and LaTeX) for classes with base or 
-# super classes. Setting the tag to NO turns the diagrams off. Note that this 
-# option is superceded by the HAVE_DOT option below. This is only a fallback. It is 
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
+# generate a inheritance diagram (in Html, RTF and LaTeX) for classes with base or
+# super classes. Setting the tag to NO turns the diagrams off. Note that this
+# option is superceded by the HAVE_DOT option below. This is only a fallback. It is
 # recommended to install and use dot, since it yield more powerful graphs.
 
 CLASS_DIAGRAMS         = YES
 
-# If set to YES, the inheritance and collaboration graphs will hide 
-# inheritance and usage relations if the target is undocumented 
+# If set to YES, the inheritance and collaboration graphs will hide
+# inheritance and usage relations if the target is undocumented
 # or is not a class.
 
 HIDE_UNDOC_RELATIONS   = YES
 
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
-# available from the path. This tool is part of Graphviz, a graph visualization 
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
 # have no effect if this option is set to NO (the default)
 
 HAVE_DOT               = NO
 
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect inheritance relations. Setting this tag to YES will force the 
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect inheritance relations. Setting this tag to YES will force the
 # the CLASS_DIAGRAMS tag to NO.
 
 CLASS_GRAPH            = YES
 
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect implementation dependencies (inheritance, containment, and 
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect implementation dependencies (inheritance, containment, and
 # class references variables) of the class with other documented classes.
 
 COLLABORATION_GRAPH    = YES
 
-# If set to YES, the inheritance and collaboration graphs will show the 
+# If set to YES, the inheritance and collaboration graphs will show the
 # relations between templates and their instances.
 
 TEMPLATE_RELATIONS     = YES
 
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
-# tags are set to YES then doxygen will generate a graph for each documented 
-# file showing the direct and indirect include dependencies of the file with 
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
+# tags are set to YES then doxygen will generate a graph for each documented
+# file showing the direct and indirect include dependencies of the file with
 # other documented files.
 
 INCLUDE_GRAPH          = YES
 
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
-# documented header file showing the documented files that directly or 
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
+# documented header file showing the documented files that directly or
 # indirectly include this file.
 
 INCLUDED_BY_GRAPH      = YES
 
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
 # will graphical hierarchy of all classes instead of a textual one.
 
 GRAPHICAL_HIERARCHY    = YES
 
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
 # generated by dot. Possible values are png, jpg, or gif
 # If left blank png will be used.
 
 DOT_IMAGE_FORMAT       = png
 
-# The tag DOT_PATH can be used to specify the path where the dot tool can be 
+# The tag DOT_PATH can be used to specify the path where the dot tool can be
 # found. If left blank, it is assumed the dot tool can be found on the path.
 
-DOT_PATH               = 
+DOT_PATH               =
 
-# The DOTFILE_DIRS tag can be used to specify one or more directories that 
-# contain dot files that are included in the documentation (see the 
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the
 # \dotfile command).
 
-DOTFILE_DIRS           = 
+DOTFILE_DIRS           =
 
-# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width 
-# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
-# this value, doxygen will try to truncate the graph, so that it fits within 
-# the specified constraint. Beware that most browsers cannot cope with very 
+# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than
+# this value, doxygen will try to truncate the graph, so that it fits within
+# the specified constraint. Beware that most browsers cannot cope with very
 # large images.
 
 MAX_DOT_GRAPH_WIDTH    = 1024
 
-# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height 
-# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
-# this value, doxygen will try to truncate the graph, so that it fits within 
-# the specified constraint. Beware that most browsers cannot cope with very 
+# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than
+# this value, doxygen will try to truncate the graph, so that it fits within
+# the specified constraint. Beware that most browsers cannot cope with very
 # large images.
 
 MAX_DOT_GRAPH_HEIGHT   = 1024
 
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
-# generate a legend page explaining the meaning of the various boxes and 
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
+# generate a legend page explaining the meaning of the various boxes and
 # arrows in the dot generated graphs.
 
 GENERATE_LEGEND        = YES
 
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
-# remove the intermedate dot files that are used to generate 
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
+# remove the intermedate dot files that are used to generate
 # the various graphs.
 
 DOT_CLEANUP            = YES
 
 #---------------------------------------------------------------------------
-# Configuration::addtions related to the search engine   
+# Configuration::addtions related to the search engine
 #---------------------------------------------------------------------------
 
-# The SEARCHENGINE tag specifies whether or not a search engine should be 
+# The SEARCHENGINE tag specifies whether or not a search engine should be
 # used. If set to NO the values of all tags below this one will be ignored.
 
 SEARCHENGINE           = NO
 
-# The CGI_NAME tag should be the name of the CGI script that 
-# starts the search engine (doxysearch) with the correct parameters. 
+# The CGI_NAME tag should be the name of the CGI script that
+# starts the search engine (doxysearch) with the correct parameters.
 # A script with this name will be generated by doxygen.
 
 CGI_NAME               = search.cgi
 
-# The CGI_URL tag should be the absolute URL to the directory where the 
-# cgi binaries are located. See the documentation of your http daemon for 
+# The CGI_URL tag should be the absolute URL to the directory where the
+# cgi binaries are located. See the documentation of your http daemon for
 # details.
 
-CGI_URL                = 
+CGI_URL                =
 
-# The DOC_URL tag should be the absolute URL to the directory where the 
-# documentation is located. If left blank the absolute path to the 
+# The DOC_URL tag should be the absolute URL to the directory where the
+# documentation is located. If left blank the absolute path to the
 # documentation, with file:// prepended to it, will be used.
 
-DOC_URL                = 
+DOC_URL                =
 
-# The DOC_ABSPATH tag should be the absolute path to the directory where the 
-# documentation is located. If left blank the directory on the local machine 
+# The DOC_ABSPATH tag should be the absolute path to the directory where the
+# documentation is located. If left blank the directory on the local machine
 # will be used.
 
-DOC_ABSPATH            = 
+DOC_ABSPATH            =
 
-# The BIN_ABSPATH tag must point to the directory where the doxysearch binary 
+# The BIN_ABSPATH tag must point to the directory where the doxysearch binary
 # is installed.
 
 BIN_ABSPATH            = /usr/local/bin/
 
-# The EXT_DOC_PATHS tag can be used to specify one or more paths to 
-# documentation generated for other projects. This allows doxysearch to search 
+# The EXT_DOC_PATHS tag can be used to specify one or more paths to
+# documentation generated for other projects. This allows doxysearch to search
 # the documentation for these projects as well.
 
-EXT_DOC_PATHS          = 
+EXT_DOC_PATHS          =

Index: INSTALL
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/INSTALL,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- INSTALL	25 May 2002 22:21:14 -0000	1.2
+++ INSTALL	17 Dec 2005 18:14:25 -0000	1.3
@@ -1,6 +1,6 @@
 
 1) Type './configure' create the configuration (use './configure
---help' to have the configure options). 
+--help' to have the configure options).
 
 'configure' can be launched from another directory than the ffmpeg
 sources to put the objects at that place. In that case, use an

Index: Makefile
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/Makefile,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -d -r1.85 -r1.86
--- Makefile	18 Oct 2005 20:11:41 -0000	1.85
+++ Makefile	17 Dec 2005 18:14:25 -0000	1.86
@@ -7,7 +7,7 @@
 VPATH=$(SRC_PATH)
 
 CFLAGS=$(OPTFLAGS) -I. -I$(SRC_PATH) -I$(SRC_PATH)/libavutil -I$(SRC_PATH)/libavcodec -I$(SRC_PATH)/libavformat -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
-LDFLAGS+= -g 
+LDFLAGS+= -g
 
 ifeq ($(TARGET_GPROF),yes)
 CFLAGS+=-p
@@ -75,7 +75,7 @@
 	$(STRIP) $@
 
 ffserver$(EXESUF): ffserver.o .libs
-	$(CC) $(LDFLAGS) $(FFSLDFLAGS) -o $@ ffserver.o $(FFLIBS) $(EXTRALIBS) 
+	$(CC) $(LDFLAGS) $(FFSLDFLAGS) -o $@ ffserver.o $(FFLIBS) $(EXTRALIBS)
 
 ffplay_g$(EXESUF): ffplay.o cmdutils.o .libs
 	$(CC) $(LDFLAGS) -o $@ ffplay.o cmdutils.o $(FFLIBS) $(EXTRALIBS) $(SDL_LIBS)
@@ -94,10 +94,10 @@
 	$(CC) $(SRC_PATH)/cws2fws.c -o cws2fws$(EXESUF) -lz
 
 ffplay.o: ffplay.c
-	$(CC) $(CFLAGS) $(SDL_CFLAGS) -c -o $@ $< 
+	$(CC) $(CFLAGS) $(SDL_CFLAGS) -c -o $@ $<
 
 %.o: %.c
-	$(CC) $(CFLAGS) -c -o $@ $< 
+	$(CC) $(CFLAGS) -c -o $@ $<
 
 videohook: .libs
 	$(MAKE) -C vhook all

Index: README
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/README,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- README	16 Apr 2003 22:43:26 -0000	1.6
+++ README	17 Dec 2005 18:14:25 -0000	1.7
@@ -11,7 +11,7 @@
 
 * Read the file COPYING. ffmpeg and the associated libraries EXCEPT
   liba52 and libpostproc are licensed under the Lesser GNU General
-  Public License. 
+  Public License.
 
 * liba52 and libpostproc are distributed under the GNU General Public
   License and their compilation and use is optional in ffmpeg.

Index: berrno.h
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/berrno.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- berrno.h	20 Jul 2002 20:05:49 -0000	1.2
+++ berrno.h	17 Dec 2005 18:14:25 -0000	1.3
@@ -8,37 +8,37 @@
 
 #ifdef ENOENT
 #undef ENOENT
-#endif 
+#endif
 #define ENOENT 2
 
 #ifdef EINTR
 #undef EINTR
-#endif 
+#endif
 #define EINTR  4
 
 #ifdef EIO
 #undef EIO
-#endif 
+#endif
 #define EIO    5
 
 #ifdef EAGAIN
 #undef EAGAIN
-#endif 
+#endif
 #define EAGAIN 11
 
 #ifdef ENOMEM
 #undef ENOMEM
-#endif 
+#endif
 #define ENOMEM 12
 
 #ifdef EINVAL
 #undef EINVAL
-#endif 
+#endif
 #define EINVAL 22
 
 #ifdef EPIPE
 #undef EPIPE
-#endif 
+#endif
 #define EPIPE  32
 
 #endif /* BERRNO_H */

Index: build_avopt
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/build_avopt,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- build_avopt	6 Sep 2005 12:53:52 -0000	1.1
+++ build_avopt	17 Dec 2005 18:14:25 -0000	1.2
@@ -7,4 +7,3 @@
  sed 's/TYPE_AVRATIONAL/TYPE_RATIONAL/g'|\
  sed 's/FLOAT_M/FLT_M/g'|\
  sed 's/FF_OPT_TYPE_CHAR/FF_OPT_TYPE_STRING/g'
- 
\ No newline at end of file

Index: cmdutils.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/cmdutils.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- cmdutils.c	12 Dec 2005 01:51:38 -0000	1.9
+++ cmdutils.c	17 Dec 2005 18:14:25 -0000	1.10
@@ -64,7 +64,7 @@
     optindex = 1;
     while (optindex < argc) {
         opt = argv[optindex++];
-        
+
         if (opt[0] == '-' && opt[1] != '\0') {
             po= find_option(options, opt + 1);
             if (!po->name)
@@ -111,7 +111,7 @@
         fprintf(stderr, "%s: Incorrect image filename syntax.\n"
                 "Use '%%d' to specify the image number:\n"
                 "  for img1.jpg, img2.jpg, ..., use 'img%%d.jpg';\n"
-                "  for img001.jpg, img002.jpg, ..., use 'img%%03d.jpg'.\n", 
+                "  for img001.jpg, img002.jpg, ..., use 'img%%03d.jpg'.\n",
                 filename);
         break;
     case AVERROR_INVALIDDATA:

Index: configure
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/configure,v
retrieving revision 1.219
retrieving revision 1.220
diff -u -d -r1.219 -r1.220
--- configure	11 Dec 2005 00:45:33 -0000	1.219
+++ configure	17 Dec 2005 18:14:25 -0000	1.220
@@ -555,7 +555,7 @@
   --enable-amr_nb-fixed) amr_nb_fixed="yes"
   ;;
   --enable-amr_wb) amr_wb="yes"
-  ;; 
+  ;;
   --enable-amr_if2) amr_if2="yes"
   ;;
   --enable-sunmlib) sunmlib="yes"
@@ -629,13 +629,13 @@
         echo "libdts is under GPL and --enable-gpl is not specified."
         fail="yes"
     fi
-    
+
     if test "$faad" != "no" -o "$faadbin" != "no"; then
         cat > $TMPC << EOF
             #include <faad.h>
             int main( void ) { return 0; }
 EOF
-    
+
         if $cc $CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
             cat > $TMPC << EOF
                 #include <faad.h>
@@ -654,7 +654,7 @@
             echo "FAAD test failed."
         fi
     fi
-   
+
 
     if test "$fail" = "yes"; then
         exit 1
@@ -673,7 +673,7 @@
 # check iwmmxt support
 if test $iwmmxt = "default" -a $cpu = "armv4l"; then
     cat > $TMPC << EOF
-        int main(void) { 
+        int main(void) {
         __asm__ __volatile__ ("wunpckelub wr6, wr4");
         }
 EOF
@@ -692,7 +692,7 @@
     else
 	gcc_version="`$cc -v 2>&1 | grep version | cut -d ' ' -f3-`"
 	case "$gcc_version" in
-	    *2.95*) 
+	    *2.95*)
 		CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer"
 		;;
 	    *[34].*)
@@ -784,7 +784,7 @@
     esac
 fi
 
-# AltiVec flags: The FSF version of GCC differs from the Apple version 
+# AltiVec flags: The FSF version of GCC differs from the Apple version
 if test $cpu = "powerpc"; then
     if test $altivec = "yes"; then
         if test -n "`$cc -v 2>&1 | grep version | grep Apple`"; then
@@ -1009,7 +1009,7 @@
 # currently only used on i386 for MMX builtins
 cat > $TMPC << EOF
 #include <xmmintrin.h>
-int main(void) { 
+int main(void) {
 #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
 return 0;
 #else
@@ -1812,7 +1812,7 @@
 Name: libavutil
 Description: FFmpeg utility library
 Version: $lavu_version
-Requires: 
+Requires:
 Conflicts:
 Libs: -L\${libdir} -lavutil
 Cflags: -I\${includedir} -I\${includedir}/ffmpeg
@@ -1827,7 +1827,7 @@
 Name: libavutil
 Description: FFmpeg utility library
 Version: $lavu_version
-Requires: 
+Requires:
 Conflicts:
 Libs: \${libdir}/${LIBPREF}avutil${LIBSUF}
 Cflags: -I\${includedir}
@@ -1906,7 +1906,7 @@
 Name: libpostproc
 Description: FFmpeg post processing library
 Version: $lavc_version
-Requires: 
+Requires:
 Conflicts:
 Libs: -L\${libdir} -lpostproc
 Cflags: -I\${includedir} -I\${includedir}/postproc
@@ -1921,7 +1921,7 @@
 Name: libpostproc
 Description: FFmpeg post processing library
 Version: $lavc_version
-Requires: 
+Requires:
 Conflicts:
 Libs: \${libdir}/${LIBPREF}postproc${LIBSUF}
 Cflags: -I\${includedir}

Index: cws2fws.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/cws2fws.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- cws2fws.c	16 Oct 2004 11:08:49 -0000	1.1
+++ cws2fws.c	17 Dec 2005 18:14:26 -0000	1.2
@@ -28,7 +28,7 @@
 	printf("Usage: %s <infile.swf> <outfile.swf>\n", argv[0]);
 	exit(1);
     }
-    
+
     fd_in = open(argv[1], O_RDONLY);
     if (fd_in < 0)
     {
@@ -43,7 +43,7 @@
 	close(fd_in);
 	exit(1);
     }
-    
+
     if (read(fd_in, &buf_in, 8) != 8)
     {
 	printf("Header error\n");
@@ -51,7 +51,7 @@
 	close(fd_out);
 	exit(1);
     }
-    
+
     if (buf_in[0] != 'C' || buf_in[1] != 'W' || buf_in[2] != 'S')
     {
 	printf("Not a compressed flash file\n");
@@ -61,7 +61,7 @@
     fstat(fd_in, &statbuf);
     comp_len = statbuf.st_size;
     uncomp_len = buf_in[4] | (buf_in[5] << 8) | (buf_in[6] << 16) | (buf_in[7] << 24);
-    
+
     printf("Compressed size: %d Uncompressed size: %d\n", comp_len-4, uncomp_len-4);
 
     // write out modified header
@@ -72,20 +72,20 @@
     zstream.zfree = NULL;
     zstream.opaque = NULL;
     inflateInit(&zstream);
-    
+
     for (i = 0; i < comp_len-4;)
     {
 	int ret, len = read(fd_in, &buf_in, 1024);
 
 	dbgprintf("read %d bytes\n", len);
-	
+
 	last_out = zstream.total_out;
-	
+
 	zstream.next_in = &buf_in[0];
 	zstream.avail_in = len;
 	zstream.next_out = &buf_out[0];
 	zstream.avail_out = 1024;
-		
+
 	ret = inflate(&zstream, Z_SYNC_FLUSH);
 	if (ret == Z_STREAM_END || ret == Z_BUF_ERROR)
 	    break;
@@ -95,16 +95,16 @@
 	    inflateEnd(&zstream);
 	    exit(1);
 	}
-	
+
 	dbgprintf("a_in: %d t_in: %d a_out: %d t_out: %d -- %d out\n",
 	    zstream.avail_in, zstream.total_in, zstream.avail_out, zstream.total_out,
 	    zstream.total_out-last_out);
-	
+
 	write(fd_out, &buf_out, zstream.total_out-last_out);
 
 	i += len;
     }
-    
+
     if (zstream.total_out != uncomp_len-8)
     {
 	printf("Size mismatch (%d != %d), updating header...\n",
@@ -114,11 +114,11 @@
 	buf_in[1] = (zstream.total_out+8 >> 8) & 0xff;
 	buf_in[2] = (zstream.total_out+8 >> 16) & 0xff;
 	buf_in[3] = (zstream.total_out+8 >> 24) & 0xff;
-	
+
 	lseek(fd_out, 4, SEEK_SET);
 	write(fd_out, &buf_in, 4);
     }
-    
+
     inflateEnd(&zstream);
     close(fd_in);
     close(fd_out);

Index: ffmpeg.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/ffmpeg.c,v
retrieving revision 1.355
retrieving revision 1.356
diff -u -d -r1.355 -r1.356
--- ffmpeg.c	12 Dec 2005 01:56:45 -0000	1.355
+++ ffmpeg.c	17 Dec 2005 18:14:26 -0000	1.356
@@ -1,5 +1,5 @@
 /*
- * FFmpeg main 
+ * FFmpeg main
  * Copyright (c) 2000-2003 Fabrice Bellard
  *
  * This library is free software; you can redistribute it and/or
@@ -269,13 +269,13 @@
     int video_crop;          /* video_resample and video_crop are mutually exclusive */
     int topBand;             /* cropping area sizes */
     int leftBand;
-    
+
     int video_pad;           /* video_resample and video_pad are mutually exclusive */
     int padtop;              /* padding area sizes */
     int padbottom;
     int padleft;
     int padright;
-    
+
     /* audio only */
     int audio_resample;
     ReSampleContext *resample; /* for audio resampling */
@@ -342,7 +342,7 @@
     tty.c_cflag |= CS8;
     tty.c_cc[VMIN] = 1;
     tty.c_cc[VTIME] = 0;
-    
+
     tcsetattr (0, TCSANOW, &tty);
 
     signal(SIGINT , sigterm_handler); /* Interrupt (ANSI).  */
@@ -441,8 +441,8 @@
 
 #define MAX_AUDIO_PACKET_SIZE (128 * 1024)
 
-static void do_audio_out(AVFormatContext *s, 
-                         AVOutputStream *ost, 
+static void do_audio_out(AVFormatContext *s,
+                         AVOutputStream *ost,
                          AVInputStream *ist,
                          unsigned char *buf, int size)
 {
@@ -463,7 +463,7 @@
         return;               /* Should signal an error ! */
 
     if(audio_sync_method){
-        double delta = get_sync_ipts(ost) * enc->sample_rate - ost->sync_opts 
+        double delta = get_sync_ipts(ost) * enc->sample_rate - ost->sync_opts
                 - fifo_size(&ost->fifo, ost->fifo.rptr)/(ost->st->codec->channels * 2);
         double idelta= delta*ist->st->codec->sample_rate / enc->sample_rate;
         int byte_delta= ((int)idelta)*2*ist->st->codec->channels;
@@ -504,14 +504,14 @@
 //                fprintf(stderr, "drift:%f len:%d opts:%lld ipts:%lld fifo:%d\n", delta, -1, ost->sync_opts, (int64_t)(get_sync_ipts(ost) * enc->sample_rate), fifo_size(&ost->fifo, ost->fifo.rptr)/(ost->st->codec->channels * 2));
                 av_resample_compensate(*(struct AVResampleContext**)ost->resample, comp, enc->sample_rate);
             }
-        } 
+        }
     }else
         ost->sync_opts= lrintf(get_sync_ipts(ost) * enc->sample_rate)
                         - fifo_size(&ost->fifo, ost->fifo.rptr)/(ost->st->codec->channels * 2); //FIXME wrong
 
     if (ost->audio_resample) {
         buftmp = audio_buf;
-        size_out = audio_resample(ost->resample, 
+        size_out = audio_resample(ost->resample,
                                   (short *)buftmp, (short *)buf,
                                   size / (ist->st->codec->channels * 2));
         size_out = size_out * enc->channels * 2;
@@ -523,17 +523,17 @@
     /* now encode as many frames as possible */
     if (enc->frame_size > 1) {
         /* output resampled raw samples */
-        fifo_write(&ost->fifo, buftmp, size_out, 
+        fifo_write(&ost->fifo, buftmp, size_out,
                    &ost->fifo.wptr);
 
         frame_bytes = enc->frame_size * 2 * enc->channels;
-        
-        while (fifo_read(&ost->fifo, audio_buf, frame_bytes, 
+
+        while (fifo_read(&ost->fifo, audio_buf, frame_bytes,
                      &ost->fifo.rptr) == 0) {
             AVPacket pkt;
             av_init_packet(&pkt);
 
-            ret = avcodec_encode_audio(enc, audio_out, audio_out_size, 
+            ret = avcodec_encode_audio(enc, audio_out, audio_out_size,
                                        (short *)audio_buf);
             audio_size += ret;
             pkt.stream_index= ost->index;
@@ -543,7 +543,7 @@
                 pkt.pts= av_rescale_q(enc->coded_frame->pts, enc->time_base, ost->st->time_base);
             pkt.flags |= PKT_FLAG_KEY;
             av_interleaved_write_frame(s, &pkt);
-            
+
             ost->sync_opts += enc->frame_size;
         }
     } else {
@@ -577,7 +577,7 @@
             size_out = size_out >> 1;
             break;
         }
-        ret = avcodec_encode_audio(enc, audio_out, size_out, 
+        ret = avcodec_encode_audio(enc, audio_out, size_out,
 				   (short *)buftmp);
         audio_size += ret;
         pkt.stream_index= ost->index;
@@ -608,12 +608,12 @@
         buf = av_malloc(size);
         if (!buf)
             return;
-        
+
         picture2 = &picture_tmp;
         avpicture_fill(picture2, buf, dec->pix_fmt, dec->width, dec->height);
 
         if (do_deinterlace){
-            if(avpicture_deinterlace(picture2, picture, 
+            if(avpicture_deinterlace(picture2, picture,
                                      dec->pix_fmt, dec->width, dec->height) < 0) {
                 /* if error, do not deinterlace */
                 av_free(buf);
@@ -621,7 +621,7 @@
                 picture2 = picture;
             }
         } else {
-            if (img_convert(picture2, dec->pix_fmt, picture, 
+            if (img_convert(picture2, dec->pix_fmt, picture,
                             dec->pix_fmt, dec->width, dec->height) < 0) {
                 /* if error, do not copy */
                 av_free(buf);
@@ -647,15 +647,15 @@
 /* Expects img to be yuv420 */
 static void fill_pad_region(AVPicture* img, int height, int width,
         int padtop, int padbottom, int padleft, int padright, int *color) {
-  
+
     int i, y, shift;
     uint8_t *optr;
-    
+
     for (i = 0; i < 3; i++) {
         shift = (i == 0) ? 0 : 1;
-        
+
         if (padtop || padleft) {
-            memset(img->data[i], color[i], (((img->linesize[i] * padtop) + 
+            memset(img->data[i], color[i], (((img->linesize[i] * padtop) +
                             padleft) >> shift));
         }
 
@@ -668,7 +668,7 @@
                 optr += img->linesize[i];
             }
         }
-      
+
         if (padbottom || padright) {
             optr = img->data[i] + (((img->linesize[i] * (height - padbottom)) - padright) >> shift);
             memset(optr, color[i], (((img->linesize[i] * padbottom) + padright) >> shift));
@@ -676,8 +676,8 @@
     }
 }
 
-static void do_subtitle_out(AVFormatContext *s, 
-                            AVOutputStream *ost, 
+static void do_subtitle_out(AVFormatContext *s,
+                            AVOutputStream *ost,
                             AVInputStream *ist,
                             AVSubtitle *sub,
                             int64_t pts)
@@ -708,9 +708,9 @@
         nb = 1;
 
     for(i = 0; i < nb; i++) {
-        subtitle_out_size = avcodec_encode_subtitle(enc, subtitle_out, 
+        subtitle_out_size = avcodec_encode_subtitle(enc, subtitle_out,
                                                     subtitle_out_max_size, sub);
-        
+
         av_init_packet(&pkt);
         pkt.stream_index = ost->index;
         pkt.data = subtitle_out;
@@ -731,8 +731,8 @@
 static int bit_buffer_size= 1024*256;
 static uint8_t *bit_buffer= NULL;
 
-static void do_video_out(AVFormatContext *s, 
-                         AVOutputStream *ost, 
+static void do_video_out(AVFormatContext *s,
+                         AVOutputStream *ost,
                          AVInputStream *ist,
                          AVFrame *in_picture,
                          int *frame_size)
@@ -743,7 +743,7 @@
     uint8_t *buf = NULL, *buf1 = NULL;
     AVCodecContext *enc, *dec;
     enum PixelFormat target_pixfmt;
-    
+
     avcodec_get_frame_defaults(&picture_format_temp);
     avcodec_get_frame_defaults(&picture_crop_temp);
 
@@ -777,7 +777,7 @@
         ost->sync_opts= lrintf(get_sync_ipts(ost) / av_q2d(enc->time_base));
 
     nb_frames= FFMIN(nb_frames, max_frames[CODEC_TYPE_VIDEO] - ost->frame_number);
-    if (nb_frames <= 0) 
+    if (nb_frames <= 0)
         return;
 
     /* convert pixel format if needed */
@@ -793,9 +793,9 @@
             return;
         formatted_picture = &picture_format_temp;
         avpicture_fill((AVPicture*)formatted_picture, buf, target_pixfmt, dec->width, dec->height);
-        
-        if (img_convert((AVPicture*)formatted_picture, target_pixfmt, 
-                        (AVPicture *)in_picture, dec->pix_fmt, 
+
+        if (img_convert((AVPicture*)formatted_picture, target_pixfmt,
+                        (AVPicture *)in_picture, dec->pix_fmt,
                         dec->width, dec->height) < 0) {
 
             if (verbose >= 0)
@@ -813,16 +813,16 @@
     if (ost->video_resample) {
         final_picture = &ost->pict_tmp;
         img_resample(ost->img_resample_ctx, (AVPicture*)final_picture, (AVPicture*)formatted_picture);
-       
+
         if (ost->padtop || ost->padbottom || ost->padleft || ost->padright) {
             fill_pad_region((AVPicture*)final_picture, enc->height, enc->width,
                     ost->padtop, ost->padbottom, ost->padleft, ost->padright,
                     padcolor);
         }
-        
+
 	if (enc->pix_fmt != PIX_FMT_YUV420P) {
             int size;
-	    
+
 	    av_free(buf);
             /* create temporary picture */
             size = avpicture_get_size(enc->pix_fmt, enc->width, enc->height);
@@ -831,9 +831,9 @@
                 return;
             final_picture = &picture_format_temp;
             avpicture_fill((AVPicture*)final_picture, buf, enc->pix_fmt, enc->width, enc->height);
-        
-            if (img_convert((AVPicture*)final_picture, enc->pix_fmt, 
-                            (AVPicture*)&ost->pict_tmp, PIX_FMT_YUV420P, 
+
+            if (img_convert((AVPicture*)final_picture, enc->pix_fmt,
+                            (AVPicture*)&ost->pict_tmp, PIX_FMT_YUV420P,
                             enc->width, enc->height) < 0) {
 
                 if (verbose >= 0)
@@ -865,9 +865,9 @@
             uint8_t *optr, *iptr;
             int shift = (i == 0) ? 0 : 1;
             int y, yheight;
-            
+
             /* set offset to start writing image into */
-            optr = final_picture->data[i] + (((final_picture->linesize[i] * 
+            optr = final_picture->data[i] + (((final_picture->linesize[i] *
                             ost->padtop) + ost->padleft) >> shift);
             iptr = formatted_picture->data[i];
 
@@ -883,7 +883,7 @@
         fill_pad_region((AVPicture*)final_picture, enc->height, enc->width,
                 ost->padtop, ost->padbottom, ost->padleft, ost->padright,
                 padcolor);
-        
+
         if (enc->pix_fmt != PIX_FMT_YUV420P) {
             int size;
 
@@ -896,8 +896,8 @@
             final_picture = &picture_format_temp;
             avpicture_fill((AVPicture*)final_picture, buf, enc->pix_fmt, enc->width, enc->height);
 
-            if (img_convert((AVPicture*)final_picture, enc->pix_fmt, 
-                        (AVPicture*)&ost->pict_tmp, PIX_FMT_YUV420P, 
+            if (img_convert((AVPicture*)final_picture, enc->pix_fmt,
+                        (AVPicture*)&ost->pict_tmp, PIX_FMT_YUV420P,
                         enc->width, enc->height) < 0) {
 
                 if (verbose >= 0)
@@ -956,7 +956,7 @@
             big_picture.pts= ost->sync_opts;
 //            big_picture.pts= av_rescale(ost->sync_opts, AV_TIME_BASE*(int64_t)enc->time_base.num, enc->time_base.den);
 //av_log(NULL, AV_LOG_DEBUG, "%lld -> encoder\n", ost->sync_opts);
-            ret = avcodec_encode_video(enc, 
+            ret = avcodec_encode_video(enc,
                                        bit_buffer, bit_buffer_size,
                                        &big_picture);
             //enc->frame_number = enc->real_pict_num;
@@ -965,7 +965,7 @@
                 pkt.size= ret;
                 if(enc->coded_frame && enc->coded_frame->pts != AV_NOPTS_VALUE)
                     pkt.pts= av_rescale_q(enc->coded_frame->pts, enc->time_base, ost->st->time_base);
-/*av_log(NULL, AV_LOG_DEBUG, "encoder -> %lld/%lld\n", 
+/*av_log(NULL, AV_LOG_DEBUG, "encoder -> %lld/%lld\n",
    pkt.pts != AV_NOPTS_VALUE ? av_rescale(pkt.pts, enc->time_base.den, AV_TIME_BASE*(int64_t)enc->time_base.num) : -1,
    pkt.dts != AV_NOPTS_VALUE ? av_rescale(pkt.dts, enc->time_base.den, AV_TIME_BASE*(int64_t)enc->time_base.num) : -1);*/
 
@@ -995,7 +995,7 @@
     return -10.0*log(d)/log(10.0);
 }
 
-static void do_video_stats(AVFormatContext *os, AVOutputStream *ost, 
+static void do_video_stats(AVFormatContext *os, AVOutputStream *ost,
                            int frame_size)
 {
     static FILE *fvstats=NULL;
@@ -1006,7 +1006,7 @@
     int frame_number;
     int64_t ti;
     double ti1, bitrate, avg_bitrate;
-    
+
     if (!fvstats) {
         today2 = time(NULL);
         today = localtime(&today2);
@@ -1019,7 +1019,7 @@
             exit(1);
         }
     }
-    
+
     ti = MAXINT64;
     enc = ost->st->codec;
     if (enc->codec_type == CODEC_TYPE_VIDEO) {
@@ -1027,18 +1027,18 @@
         fprintf(fvstats, "frame= %5d q= %2.1f ", frame_number, enc->coded_frame->quality/(float)FF_QP2LAMBDA);
         if (enc->flags&CODEC_FLAG_PSNR)
             fprintf(fvstats, "PSNR= %6.2f ", psnr(enc->coded_frame->error[0]/(enc->width*enc->height*255.0*255.0)));
-        
+
         fprintf(fvstats,"f_size= %6d ", frame_size);
         /* compute pts value */
         ti1 = ost->sync_opts * av_q2d(enc->time_base);
         if (ti1 < 0.01)
             ti1 = 0.01;
-    
+
         bitrate = (frame_size * 8) / av_q2d(enc->time_base) / 1000.0;
         avg_bitrate = (double)(video_size * 8) / ti1 / 1000.0;
         fprintf(fvstats, "s_size= %8.0fkB time= %0.3f br= %7.1fkbits/s avg_br= %7.1fkbits/s ",
             (double)video_size / 1024, ti1, bitrate, avg_bitrate);
-        fprintf(fvstats,"type= %c\n", av_get_pict_type_char(enc->coded_frame->pict_type));        
+        fprintf(fvstats,"type= %c\n", av_get_pict_type_char(enc->coded_frame->pict_type));
     }
 }
 
@@ -1054,7 +1054,7 @@
     int frame_number, vid, i;
     double bitrate, ti1, pts;
     static int64_t last_time = -1;
-    
+
     if (!is_last_report) {
         int64_t cur_time;
         /* display the report every 0.5 seconds */
@@ -1062,7 +1062,7 @@
         if (last_time == -1) {
             last_time = cur_time;
             return;
-        } 
+        }
         if ((cur_time - last_time) < 500000)
             return;
         last_time = cur_time;
@@ -1072,7 +1072,7 @@
     oc = output_files[0];
 
     total_size = url_ftell(&oc->pb);
-    
+
     buf[0] = '\0';
     ti1 = 1e10;
     vid = 0;
@@ -1120,24 +1120,24 @@
     }
     if (ti1 < 0.01)
         ti1 = 0.01;
-    
+
     if (verbose || is_last_report) {
         bitrate = (double)(total_size * 8) / ti1 / 1000.0;
-        
-        snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), 
+
+        snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
             "size=%8.0fkB time=%0.1f bitrate=%6.1fkbits/s",
             (double)total_size / 1024, ti1, bitrate);
 
 	if (verbose > 1)
 	  snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), " dup=%d drop=%d",
 		  nb_frames_dup, nb_frames_drop);
-        
+
         if (verbose >= 0)
             fprintf(stderr, "%s    \r", buf);
 
         fflush(stderr);
     }
-        
+
     if (is_last_report && verbose >= 0){
         int64_t raw= audio_size + video_size + extra_size;
         fprintf(stderr, "\n");
@@ -1167,7 +1167,7 @@
     static short *samples= NULL;
     AVSubtitle subtitle, *subtitle_to_free;
     int got_subtitle;
-    
+
     if(!pkt){
         ist->pts= ist->next_pts; // needed for last packet if vsync=0
     } else if (pkt->dts != AV_NOPTS_VALUE) { //FIXME seems redundant, as libavformat does this too
@@ -1175,7 +1175,7 @@
     } else {
 //        assert(ist->pts == ist->next_pts);
     }
-    
+
     if (pkt == NULL) {
         /* EOF handling */
         ptr = NULL;
@@ -1194,7 +1194,7 @@
         if (ist->decoding_needed) {
             switch(ist->st->codec->codec_type) {
             case CODEC_TYPE_AUDIO:{
-                if(pkt) 
+                if(pkt)
                     samples= av_fast_realloc(samples, &samples_size, FFMAX(pkt->size, AVCODEC_MAX_AUDIO_FRAME_SIZE));
                     /* XXX: could avoid copy if PCM 16 bits with same
                        endianness as CPU */
@@ -1211,7 +1211,7 @@
                     continue;
                 }
                 data_buf = (uint8_t *)samples;
-                ist->next_pts += ((int64_t)AV_TIME_BASE/2 * data_size) / 
+                ist->next_pts += ((int64_t)AV_TIME_BASE/2 * data_size) /
                     (ist->st->codec->sample_rate * ist->st->codec->channels);
                 break;}
             case CODEC_TYPE_VIDEO:
@@ -1219,24 +1219,24 @@
                     /* XXX: allocate picture correctly */
                     avcodec_get_frame_defaults(&picture);
 
-                    ret = avcodec_decode_video(ist->st->codec, 
+                    ret = avcodec_decode_video(ist->st->codec,
                                                &picture, &got_picture, ptr, len);
                     ist->st->quality= picture.quality;
-                    if (ret < 0) 
+                    if (ret < 0)
                         goto fail_decode;
                     if (!got_picture) {
                         /* no picture yet */
                         goto discard_packet;
                     }
                     if (ist->st->codec->time_base.num != 0) {
-                        ist->next_pts += ((int64_t)AV_TIME_BASE * 
+                        ist->next_pts += ((int64_t)AV_TIME_BASE *
                                           ist->st->codec->time_base.num) /
                             ist->st->codec->time_base.den;
                     }
                     len = 0;
                     break;
             case CODEC_TYPE_SUBTITLE:
-                ret = avcodec_decode_subtitle(ist->st->codec, 
+                ret = avcodec_decode_subtitle(ist->st->codec,
                                               &subtitle, &got_subtitle, ptr, len);
                 if (ret < 0)
                     goto fail_decode;
@@ -1252,12 +1252,12 @@
         } else {
                 switch(ist->st->codec->codec_type) {
                 case CODEC_TYPE_AUDIO:
-                    ist->next_pts += ((int64_t)AV_TIME_BASE * ist->st->codec->frame_size) / 
+                    ist->next_pts += ((int64_t)AV_TIME_BASE * ist->st->codec->frame_size) /
                         (ist->st->codec->sample_rate * ist->st->codec->channels);
                     break;
                 case CODEC_TYPE_VIDEO:
                     if (ist->st->codec->time_base.num != 0) {
-                        ist->next_pts += ((int64_t)AV_TIME_BASE * 
+                        ist->next_pts += ((int64_t)AV_TIME_BASE *
                                           ist->st->codec->time_base.num) /
                             ist->st->codec->time_base.den;
                     }
@@ -1271,7 +1271,7 @@
 
             buffer_to_free = NULL;
             if (ist->st->codec->codec_type == CODEC_TYPE_VIDEO) {
-                pre_process_video_frame(ist, (AVPicture *)&picture, 
+                pre_process_video_frame(ist, (AVPicture *)&picture,
                                         &buffer_to_free);
             }
 
@@ -1312,7 +1312,7 @@
                 }
             }
 #endif
-            /* if output time reached then transcode raw format, 
+            /* if output time reached then transcode raw format,
 	       encode packets and output them */
             if (start_time == 0 || ist->pts >= start_time)
                 for(i=0;i<nb_ostreams;i++) {
@@ -1323,9 +1323,9 @@
                         os = output_files[ost->file_index];
 
 #if 0
-                        printf("%d: got pts=%0.3f %0.3f\n", i, 
-                               (double)pkt->pts / AV_TIME_BASE, 
-                               ((double)ist->pts / AV_TIME_BASE) - 
+                        printf("%d: got pts=%0.3f %0.3f\n", i,
+                               (double)pkt->pts / AV_TIME_BASE,
+                               ((double)ist->pts / AV_TIME_BASE) -
                                ((double)ost->st->pts.val * ost->st->time_base.num / ost->st->time_base.den));
 #endif
                         /* set the input output pts pairs */
@@ -1356,10 +1356,10 @@
 
                             /* no reencoding needed : output the packet directly */
                             /* force the input stream PTS */
-                        
+
                             avcodec_get_frame_defaults(&avframe);
                             ost->st->codec->coded_frame= &avframe;
-                            avframe.key_frame = pkt->flags & PKT_FLAG_KEY; 
+                            avframe.key_frame = pkt->flags & PKT_FLAG_KEY;
 
                             if(ost->st->codec->codec_type == CODEC_TYPE_AUDIO)
                                 audio_size += data_size;
@@ -1409,13 +1409,13 @@
  discard_packet:
     if (pkt == NULL) {
         /* EOF handling */
-  
+
         for(i=0;i<nb_ostreams;i++) {
             ost = ost_table[i];
             if (ost->source_index == ist_index) {
                 AVCodecContext *enc= ost->st->codec;
                 os = output_files[ost->file_index];
-                
+
                 if(ost->st->codec->codec_type == CODEC_TYPE_AUDIO && enc->frame_size <=1)
                     continue;
                 if(ost->st->codec->codec_type == CODEC_TYPE_VIDEO && (os->oformat->flags & AVFMT_RAWPICTURE))
@@ -1426,9 +1426,9 @@
                         AVPacket pkt;
                         av_init_packet(&pkt);
                         pkt.stream_index= ost->index;
- 
+
                         switch(ost->st->codec->codec_type) {
-                        case CODEC_TYPE_AUDIO:        
+                        case CODEC_TYPE_AUDIO:
                             ret = avcodec_encode_audio(enc, bit_buffer, bit_buffer_size, NULL);
                             audio_size += ret;
                             pkt.flags |= PKT_FLAG_KEY;
@@ -1445,7 +1445,7 @@
                         default:
                             ret=-1;
                         }
-                            
+
                         if(ret<=0)
                             break;
                         pkt.data= bit_buffer;
@@ -1458,7 +1458,7 @@
             }
         }
     }
- 
+
     return 0;
  fail_decode:
     return -1;
@@ -1486,7 +1486,7 @@
     file_table= (AVInputFile*) av_mallocz(nb_input_files * sizeof(AVInputFile));
     if (!file_table)
         goto fail;
-        
+
     /* input stream init */
     j = 0;
     for(i=0;i<nb_input_files;i++) {
@@ -1500,7 +1500,7 @@
     ist_table = av_mallocz(nb_istreams * sizeof(AVInputStream *));
     if (!ist_table)
         goto fail;
-    
+
     for(i=0;i<nb_istreams;i++) {
         ist = av_mallocz(sizeof(AVInputStream));
         if (!ist)
@@ -1540,7 +1540,7 @@
     for(i=0;i<nb_stream_maps;i++) {
         int fi = stream_maps[i].file_index;
         int si = stream_maps[i].stream_index;
-        
+
         if (fi < 0 || fi > nb_input_files - 1 ||
             si < 0 || si > file_table[fi].nb_streams - 1) {
             fprintf(stderr,"Could not find input stream #%d.%d\n", fi, si);
@@ -1554,7 +1554,7 @@
             exit(1);
         }
     }
-    
+
     ost_table = av_mallocz(sizeof(AVOutputStream *) * nb_ostreams);
     if (!ost_table)
         goto fail;
@@ -1564,7 +1564,7 @@
             goto fail;
         ost_table[i] = ost;
     }
-    
+
     n = 0;
     for(k=0;k<nb_output_files;k++) {
         os = output_files[k];
@@ -1575,9 +1575,9 @@
             ost->index = i;
             ost->st = os->streams[i];
             if (nb_stream_maps > 0) {
-                ost->source_index = file_table[stream_maps[n-1].file_index].ist_index + 
+                ost->source_index = file_table[stream_maps[n-1].file_index].ist_index +
                     stream_maps[n-1].stream_index;
-                    
+
                 /* Sanity check that the stream types match */
                 if (ist_table[ost->source_index]->st->codec->codec_type != ost->st->codec->codec_type) {
                     fprintf(stderr, "Codec type mismatch for mapping #%d.%d -> #%d.%d\n",
@@ -1585,20 +1585,20 @@
                         ost->file_index, ost->index);
                     exit(1);
                 }
-                
+
             } else {
                 /* get corresponding input stream index : we select the first one with the right type */
                 found = 0;
                 for(j=0;j<nb_istreams;j++) {
                     ist = ist_table[j];
-                    if (ist->discard && 
+                    if (ist->discard &&
                         ist->st->codec->codec_type == ost->st->codec->codec_type) {
                         ost->source_index = j;
                         found = 1;
                         break;
                     }
                 }
-                
+
                 if (!found) {
                     /* try again and reuse existing stream */
                     for(j=0;j<nb_istreams;j++) {
@@ -1662,7 +1662,7 @@
             case CODEC_TYPE_AUDIO:
                 if (fifo_init(&ost->fifo, 2 * MAX_AUDIO_PACKET_SIZE))
                     goto fail;
-                
+
                 if (codec->channels == icodec->channels &&
                     codec->sample_rate == icodec->sample_rate) {
                     ost->audio_resample = 0;
@@ -1680,7 +1680,7 @@
                             ost->audio_resample = 1;
                         }
                     } else {
-                        ost->audio_resample = 1; 
+                        ost->audio_resample = 1;
                     }
                 }
                 if(audio_sync_method>1)
@@ -1703,7 +1703,7 @@
                     frame_topBand == 0 &&
                     frame_bottomBand == 0 &&
                     frame_leftBand == 0 &&
-                    frame_rightBand == 0 && 
+                    frame_rightBand == 0 &&
                     frame_padtop == 0 &&
                     frame_padbottom == 0 &&
                     frame_padleft == 0 &&
@@ -1721,7 +1721,7 @@
                     ost->video_crop = 1;
                     ost->topBand = frame_topBand;
                     ost->leftBand = frame_leftBand;
-                } else if ((codec->width == icodec->width + 
+                } else if ((codec->width == icodec->width +
                                 (frame_padleft + frame_padright)) &&
                         (codec->height == icodec->height +
                                 (frame_padtop + frame_padbottom))) {
@@ -1744,19 +1744,19 @@
                                          codec->width, codec->height ) )
                         goto fail;
 
-                    ost->img_resample_ctx = img_resample_full_init( 
+                    ost->img_resample_ctx = img_resample_full_init(
                                       codec->width, codec->height,
                                       icodec->width, icodec->height,
                                       frame_topBand, frame_bottomBand,
-                            frame_leftBand, frame_rightBand, 
-                            frame_padtop, frame_padbottom, 
+                            frame_leftBand, frame_rightBand,
+                            frame_padtop, frame_padbottom,
                             frame_padleft, frame_padright);
-                    
+
                     ost->padtop = frame_padtop;
                     ost->padleft = frame_padleft;
                     ost->padbottom = frame_padbottom;
                     ost->padright = frame_padright;
-                   
+
                 }
                 ost->encoding_needed = 1;
                 ist->decoding_needed = 1;
@@ -1770,15 +1770,15 @@
                 break;
             }
             /* two pass mode */
-            if (ost->encoding_needed && 
+            if (ost->encoding_needed &&
                 (codec->flags & (CODEC_FLAG_PASS1 | CODEC_FLAG_PASS2))) {
                 char logfilename[1024];
                 FILE *f;
                 int size;
                 char *logbuffer;
-                
-                snprintf(logfilename, sizeof(logfilename), "%s-%d.log", 
-                         pass_logfilename ? 
+
+                snprintf(logfilename, sizeof(logfilename), "%s-%d.log",
+                         pass_logfilename ?
                          pass_logfilename : DEFAULT_PASS_LOGFILENAME, i);
                 if (codec->flags & CODEC_FLAG_PASS1) {
                     f = fopen(logfilename, "w");
@@ -1834,7 +1834,7 @@
             fprintf(stderr, "  Stream #%d.%d -> #%d.%d",
                     ist_table[ost->source_index]->file_index,
                     ist_table[ost->source_index]->index,
-                    ost->file_index, 
+                    ost->file_index,
                     ost->index);
             if (ost->sync_ist != ist_table[ost->source_index])
                 fprintf(stderr, " [sync #%d.%d]",
@@ -1851,12 +1851,12 @@
             AVCodec *codec;
             codec = avcodec_find_encoder(ost->st->codec->codec_id);
             if (!codec) {
-                fprintf(stderr, "Unsupported codec for output stream #%d.%d\n", 
+                fprintf(stderr, "Unsupported codec for output stream #%d.%d\n",
                         ost->file_index, ost->index);
                 exit(1);
             }
             if (avcodec_open(ost->st->codec, codec) < 0) {
-                fprintf(stderr, "Error while opening codec for output stream #%d.%d - maybe incorrect parameters such as bit_rate, rate, width or height\n", 
+                fprintf(stderr, "Error while opening codec for output stream #%d.%d - maybe incorrect parameters such as bit_rate, rate, width or height\n",
                         ost->file_index, ost->index);
                 exit(1);
             }
@@ -1871,12 +1871,12 @@
             AVCodec *codec;
             codec = avcodec_find_decoder(ist->st->codec->codec_id);
             if (!codec) {
-                fprintf(stderr, "Unsupported codec (id=%d) for input stream #%d.%d\n", 
+                fprintf(stderr, "Unsupported codec (id=%d) for input stream #%d.%d\n",
                         ist->st->codec->codec_id, ist->file_index, ist->index);
                 exit(1);
             }
             if (avcodec_open(ist->st->codec, codec) < 0) {
-                fprintf(stderr, "Error while opening codec for input stream #%d.%d\n", 
+                fprintf(stderr, "Error while opening codec for input stream #%d.%d\n",
                         ist->file_index, ist->index);
                 exit(1);
             }
@@ -1891,7 +1891,7 @@
 	is = input_files[ist->file_index];
         ist->pts = 0;
         ist->next_pts = av_rescale_q(ist->st->start_time, ist->st->time_base, AV_TIME_BASE_Q);
-        if(ist->st->start_time == AV_NOPTS_VALUE) 
+        if(ist->st->start_time == AV_NOPTS_VALUE)
             ist->next_pts=0;
         if(input_files_ts_offset[ist->file_index])
             ist->next_pts= AV_NOPTS_VALUE;
@@ -1919,8 +1919,8 @@
             fprintf(stderr, "Invalid input file index %d map_meta_data(%d,%d)\n", in_file_index, out_file_index, in_file_index);
             ret = -EINVAL;
             goto fail;
-        }		
-		 
+        }
+
         out_file = output_files[out_file_index];
         in_file = input_files[in_file_index];
 
@@ -1933,7 +1933,7 @@
         out_file->track = in_file->track;
         strcpy(out_file->genre, in_file->genre);
     }
-	
+
     /* open files and write file headers */
     for(i=0;i<nb_output_files;i++) {
         os = output_files[i];
@@ -2067,7 +2067,7 @@
 
     discard_packet:
         av_free_packet(&pkt);
-        
+
         /* dump report by using the output first video and audio streams */
         print_report(output_files, ost_table, nb_ostreams, 0);
     }
@@ -2099,7 +2099,7 @@
             avcodec_close(ost->st->codec);
         }
     }
-    
+
     /* close each decoder */
     for(i=0;i<nb_istreams;i++) {
         ist = ist_table[i];
@@ -2109,7 +2109,7 @@
     }
 
     /* finished ! */
-    
+
     ret = 0;
  fail1:
     av_freep(&bit_buffer);
@@ -2173,7 +2173,7 @@
 static void opt_image_format(const char *arg)
 {
     AVImageFormat *f;
-    
+
     for(f = first_image_format; f != NULL; f = f->next) {
         if (!strcmp(arg, f->name))
             break;
@@ -2269,7 +2269,7 @@
 
 static void opt_frame_crop_top(const char *arg)
 {
-    frame_topBand = atoi(arg); 
+    frame_topBand = atoi(arg);
     if (frame_topBand < 0) {
         fprintf(stderr, "Incorrect top crop size\n");
         exit(1);
@@ -2294,7 +2294,7 @@
     }
     if ((frame_bottomBand % 2) != 0) {
         fprintf(stderr, "Bottom crop size must be a multiple of 2\n");
-        exit(1);        
+        exit(1);
     }
     if ((frame_bottomBand) >= frame_height){
     	fprintf(stderr, "Vertical crop dimensions are outside the range of the original image.\nRemember to crop first and scale second.\n");
@@ -2330,7 +2330,7 @@
     }
     if ((frame_rightBand % 2) != 0) {
         fprintf(stderr, "Right crop size must be a multiple of 2\n");
-        exit(1);        
+        exit(1);
     }
     if ((frame_rightBand) >= frame_width){
     	fprintf(stderr, "Horizontal crop dimensions are outside the range of the original image.\nRemember to crop first and scale second.\n");
@@ -2373,8 +2373,8 @@
        how colors are expressed in html tags (but without the #) */
     int rgb = strtol(arg, NULL, 16);
     int r,g,b;
-    
-    r = (rgb >> 16); 
+
+    r = (rgb >> 16);
     g = ((rgb >> 8) & 255);
     b = (rgb & 255);
 
@@ -2385,7 +2385,7 @@
 
 static void opt_frame_pad_top(const char *arg)
 {
-    frame_padtop = atoi(arg); 
+    frame_padtop = atoi(arg);
     if (frame_padtop < 0) {
         fprintf(stderr, "Incorrect top pad size\n");
         exit(1);
@@ -2398,7 +2398,7 @@
 
 static void opt_frame_pad_bottom(const char *arg)
 {
-    frame_padbottom = atoi(arg); 
+    frame_padbottom = atoi(arg);
     if (frame_padbottom < 0) {
         fprintf(stderr, "Incorrect bottom pad size\n");
         exit(1);
@@ -2412,7 +2412,7 @@
 
 static void opt_frame_pad_left(const char *arg)
 {
-    frame_padleft = atoi(arg); 
+    frame_padleft = atoi(arg);
     if (frame_padleft < 0) {
         fprintf(stderr, "Incorrect left pad size\n");
         exit(1);
@@ -2426,7 +2426,7 @@
 
 static void opt_frame_pad_right(const char *arg)
 {
-    frame_padright = atoi(arg); 
+    frame_padright = atoi(arg);
     if (frame_padright < 0) {
         fprintf(stderr, "Incorrect right pad size\n");
         exit(1);
@@ -2448,7 +2448,7 @@
     int x = 0, y = 0;
     double ar = 0;
     const char *p;
-    
+
     p = strchr(arg, ':');
     if (p) {
         x = strtol(arg, (char **)&arg, 10);
@@ -2819,7 +2819,7 @@
 {
     AVMetaDataMap *m;
     const char *p;
-	
+
     p = arg;
     m = &meta_data_maps[nb_meta_data_maps++];
 
@@ -2860,7 +2860,7 @@
     if (!strcmp(filename, "-"))
         filename = "pipe:";
 
-    using_stdin |= !strncmp(filename, "pipe:", 5) || 
+    using_stdin |= !strncmp(filename, "pipe:", 5) ||
                    !strcmp( filename, "/dev/stdin" );
 
     /* get default parameters from command line */
@@ -2890,7 +2890,7 @@
 
     if(genpts)
         ic->flags|= AVFMT_FLAG_GENPTS;
-    
+
     /* If not enough info to get the stream parameters, we decode the
        first frames to get it. (used in mpeg case for example) */
     ret = av_find_stream_info(ic);
@@ -2908,7 +2908,7 @@
     if (start_time != 0) {
         ret = av_seek_frame(ic, -1, timestamp, AVSEEK_FLAG_BACKWARD);
         if (ret < 0) {
-            fprintf(stderr, "%s: could not seek to position %0.3f\n", 
+            fprintf(stderr, "%s: could not seek to position %0.3f\n",
                     filename, (double)timestamp / AV_TIME_BASE);
         }
         /* reset seek info */
@@ -2956,7 +2956,7 @@
             if(me_threshold)
                 enc->debug |= FF_DEBUG_MV;
 
-            if (enc->time_base.den != rfps || enc->time_base.num != rfps_base) { 
+            if (enc->time_base.den != rfps || enc->time_base.num != rfps_base) {
 
                 if (verbose >= 0)
                     fprintf(stderr,"\nSeems that stream %d comes from film source: %2.2f (%d/%d) -> %2.2f (%d/%d)\n",
@@ -2984,7 +2984,7 @@
             av_abort();
         }
     }
-    
+
     input_files[nb_input_files] = ic;
     input_files_ts_offset[nb_input_files] = input_ts_offset - (copy_ts ? 0 : timestamp);
     /* dump the file content */
@@ -2998,7 +2998,7 @@
 
     grab_device = NULL;
     video_channel = 0;
-    
+
     rate_emu = 0;
 }
 
@@ -3044,7 +3044,7 @@
     AVStream *st;
     AVCodecContext *video_enc;
     int codec_id;
-    
+
     st = av_new_stream(oc, oc->nb_streams);
     if (!st) {
         fprintf(stderr, "Could not alloc stream\n");
@@ -3054,12 +3054,12 @@
     if(thread_count>1)
         avcodec_thread_init(st->codec, thread_count);
 #endif
-    
+
     video_enc = st->codec;
-    
+
     if(video_codec_tag)
         video_enc->codec_tag= video_codec_tag;
-    
+
     if(   (video_global_header&1)
        || (video_global_header==0 && (oc->oformat->flags & AVFMT_GLOBALHEADER))){
         video_enc->flags |= CODEC_FLAG_GLOBAL_HEADER;
@@ -3077,25 +3077,25 @@
         char *p;
         int i;
         AVCodec *codec;
-        
+
         codec_id = av_guess_codec(oc->oformat, NULL, oc->filename, NULL, CODEC_TYPE_VIDEO);
         if (video_codec_id != CODEC_ID_NONE)
             codec_id = video_codec_id;
-                
+
         video_enc->codec_id = codec_id;
         codec = avcodec_find_encoder(codec_id);
-        
+
         for(i=0; i<opt_name_count; i++){
              AVOption *opt;
              double d= av_get_double(avctx_opts, opt_names[i], &opt);
              if(d==d && (opt->flags&AV_OPT_FLAG_VIDEO_PARAM) && (opt->flags&AV_OPT_FLAG_ENCODING_PARAM))
                  av_set_double(video_enc, opt_names[i], d);
         }
-                
+
         video_enc->bit_rate = video_bit_rate;
         video_enc->bit_rate_tolerance = video_bit_rate_tolerance;
-        video_enc->time_base.den = frame_rate; 
-        video_enc->time_base.num = frame_rate_base; 
+        video_enc->time_base.den = frame_rate;
+        video_enc->time_base.num = frame_rate_base;
         if(codec && codec->supported_framerates){
             const AVRational *p= codec->supported_framerates;
             AVRational req= (AVRational){frame_rate, frame_rate_base};
@@ -3112,7 +3112,7 @@
             video_enc->time_base.den= best->num;
             video_enc->time_base.num= best->den;
         }
-                
+
         video_enc->width = frame_width + frame_padright + frame_padleft;
         video_enc->height = frame_height + frame_padtop + frame_padbottom;
         video_enc->sample_aspect_ratio = av_d2q(frame_aspect_ratio*frame_height/frame_width, 255);
@@ -3134,7 +3134,7 @@
             video_enc->gop_size = 0;
         if (video_qscale || same_quality) {
             video_enc->flags |= CODEC_FLAG_QSCALE;
-            video_enc->global_quality= 
+            video_enc->global_quality=
                 st->quality = FF_QP2LAMBDA * video_qscale;
         }
 
@@ -3144,7 +3144,7 @@
             video_enc->inter_matrix = inter_matrix;
 
         video_enc->pre_me = pre_me;
-                
+
         if (b_frames) {
             video_enc->max_b_frames = b_frames;
             video_enc->b_frame_strategy = b_strategy;
@@ -3171,8 +3171,8 @@
                 fprintf(stderr, "error parsing rc_override\n");
                 exit(1);
             }
-            video_enc->rc_override= 
-                av_realloc(video_enc->rc_override, 
+            video_enc->rc_override=
+                av_realloc(video_enc->rc_override,
                            sizeof(RcOverride)*(i+1));
             video_enc->rc_override[i].start_frame= start;
             video_enc->rc_override[i].end_frame  = end;
@@ -3217,10 +3217,10 @@
             video_enc->rtp_mode= 1;
             video_enc->rtp_payload_size= packet_size;
         }
-            
+
         if (do_psnr)
             video_enc->flags|= CODEC_FLAG_PSNR;
-            
+
         video_enc->me_method = me_method;
 
         /* two pass mode */
@@ -3244,7 +3244,7 @@
     AVStream *st;
     AVCodecContext *audio_enc;
     int codec_id, i;
-            
+
     st = av_new_stream(oc, oc->nb_streams);
     if (!st) {
         fprintf(stderr, "Could not alloc stream\n");
@@ -3254,13 +3254,13 @@
     if(thread_count>1)
         avcodec_thread_init(st->codec, thread_count);
 #endif
-    
+
     audio_enc = st->codec;
     audio_enc->codec_type = CODEC_TYPE_AUDIO;
-    
+
     if(audio_codec_tag)
         audio_enc->codec_tag= audio_codec_tag;
-    
+
     if (oc->oformat->flags & AVFMT_GLOBALHEADER) {
         audio_enc->flags |= CODEC_FLAG_GLOBAL_HEADER;
         avctx_opts->flags|= CODEC_FLAG_GLOBAL_HEADER;
@@ -3270,18 +3270,18 @@
         audio_enc->channels = audio_channels;
     } else {
         codec_id = av_guess_codec(oc->oformat, NULL, oc->filename, NULL, CODEC_TYPE_AUDIO);
-       
+
         for(i=0; i<opt_name_count; i++){
             AVOption *opt;
             double d= av_get_double(avctx_opts, opt_names[i], &opt);
             if(d==d && (opt->flags&AV_OPT_FLAG_AUDIO_PARAM) && (opt->flags&AV_OPT_FLAG_ENCODING_PARAM))
                 av_set_double(audio_enc, opt_names[i], d);
         }
-       
+
         if (audio_codec_id != CODEC_ID_NONE)
             codec_id = audio_codec_id;
         audio_enc->codec_id = codec_id;
-        
+
         audio_enc->bit_rate = audio_bit_rate;
         if (audio_qscale > QSCALE_NONE) {
             audio_enc->flags |= CODEC_FLAG_QSCALE;
@@ -3317,7 +3317,7 @@
     AVStream *st;
     AVCodecContext *subtitle_enc;
     int i;
-            
+
     if (nb_output_files <= 0) {
         fprintf(stderr, "At least one output file must be specified\n");
         exit(1);
@@ -3395,11 +3395,11 @@
             exit(1);
         }
     }
-    
+
     oc->oformat = file_oformat;
     pstrcpy(oc->filename, sizeof(oc->filename), filename);
 
-    if (!strcmp(file_oformat->name, "ffm") && 
+    if (!strcmp(file_oformat->name, "ffm") &&
         strstart(filename, "http:", NULL)) {
         /* special case for files sent to ffserver: we get the stream
            parameters from ffserver */
@@ -3428,11 +3428,11 @@
         if (video_disable) {
             use_video = 0;
         }
-        
+
         if (use_video) {
             new_video_stream(oc);
         }
-    
+
         if (use_audio) {
             new_audio_stream(oc);
         }
@@ -3443,7 +3443,7 @@
         }
 
         oc->timestamp = rec_timestamp;
-	    
+
 	if (str_title)
             pstrcpy(oc->title, sizeof(oc->title), str_title);
         if (str_author)
@@ -3466,12 +3466,12 @@
 
     if (!(oc->oformat->flags & AVFMT_NOFILE)) {
         /* test if it already exists to avoid loosing precious files */
-        if (!file_overwrite && 
+        if (!file_overwrite &&
             (strchr(filename, ':') == NULL ||
              strstart(filename, "file:", NULL))) {
             if (url_exist(filename)) {
                 int c;
-                
+
                 if ( !using_stdin ) {
                     fprintf(stderr,"File '%s' already exists. Overwrite ? [y/N] ", filename);
                     fflush(stderr);
@@ -3487,7 +3487,7 @@
 				}
             }
         }
-        
+
         /* open the file */
         if (url_fopen(&oc->pb, filename, URL_WRONLY) < 0) {
             fprintf(stderr, "Could not open '%s'\n", filename);
@@ -3523,7 +3523,7 @@
     AVFormatContext *ic;
     AVFormatParameters vp1, *vp = &vp1;
     AVFormatParameters ap1, *ap = &ap1;
-    
+
     /* see if audio/video inputs are needed */
     has_video = 0;
     has_audio = 0;
@@ -3547,7 +3547,7 @@
                     vp->width = enc->width;
                 if (enc->height > vp->height)
                     vp->height = enc->height;
-                
+
                 if (vp->time_base.num*(int64_t)enc->time_base.den > enc->time_base.num*(int64_t)vp->time_base.den){
                     vp->time_base = enc->time_base;
                 }
@@ -3558,12 +3558,12 @@
             }
         }
     }
-    
+
     if (has_video == 0 && has_audio == 0) {
         fprintf(stderr, "Output file must have at least one audio or video stream\n");
         exit(1);
     }
-    
+
     if (has_video) {
         AVInputFormat *fmt1;
         fmt1 = av_find_input_format(video_grab_format);
@@ -3674,18 +3674,18 @@
         if(name==NULL)
             break;
         last_name= name;
-        
+
         printf(
-            " %s%s %-15s %s\n", 
-            decode ? "D":" ", 
-            encode ? "E":" ", 
+            " %s%s %-15s %s\n",
+            decode ? "D":" ",
+            encode ? "E":" ",
             name,
             long_name ? long_name:" ");
     }
     printf("\n");
 
     printf("Image formats (filename extensions, if any, follow):\n");
-    for(image_fmt = first_image_format; image_fmt != NULL; 
+    for(image_fmt = first_image_format; image_fmt != NULL;
         image_fmt = image_fmt->next) {
         printf(
             " %s%s %-6s %s\n",
@@ -3720,7 +3720,7 @@
         if(p2==NULL)
             break;
         last_name= p2->name;
-        
+
         switch(p2->type) {
         case CODEC_TYPE_VIDEO:
             type_str = "V";
@@ -3736,9 +3736,9 @@
             break;
         }
         printf(
-            " %s%s%s%s%s%s %s", 
-            decode ? "D": (/*p2->decoder ? "d":*/" "), 
-            encode ? "E":" ", 
+            " %s%s%s%s%s%s %s",
+            decode ? "D": (/*p2->decoder ? "d":*/" "),
+            encode ? "E":" ",
             type_str,
             cap & CODEC_CAP_DRAW_HORIZ_BAND ? "S":" ",
             cap & CODEC_CAP_DR1 ? "D":" ",
@@ -3754,17 +3754,17 @@
     for(up = first_protocol; up != NULL; up = up->next)
         printf(" %s:", up->name);
     printf("\n");
-    
+
     printf("Frame size, frame rate abbreviations:\n ntsc pal qntsc qpal sntsc spal film ntsc-film sqcif qcif cif 4cif\n");
     printf("Motion estimation methods:\n");
     pp = motion_str;
     while (*pp) {
         printf(" %s", *pp);
-        if ((pp - motion_str + 1) == ME_ZERO) 
+        if ((pp - motion_str + 1) == ME_ZERO)
             printf("(fastest)");
-        else if ((pp - motion_str + 1) == ME_FULL) 
+        else if ((pp - motion_str + 1) == ME_FULL)
             printf("(slowest)");
-        else if ((pp - motion_str + 1) == ME_EPZS) 
+        else if ((pp - motion_str + 1) == ME_EPZS)
             printf("(default)");
         pp++;
     }
@@ -3880,7 +3880,7 @@
 
         audio_bit_rate = 224000;
         audio_sample_rate = 44100;
-        
+
         mux_packet_size= 2324;
         mux_rate= 2352 * 75 * 8;
 
@@ -3953,7 +3953,7 @@
 {
     fprintf(stderr, "ffmpeg      " FFMPEG_VERSION "\n"
            "libavcodec  %d\n"
-           "libavformat %d\n", 
+           "libavformat %d\n",
            avcodec_build(), LIBAVFORMAT_BUILD);
     exit(1);
 }
@@ -3962,13 +3962,13 @@
     AVOption *o= av_set_string(avctx_opts, opt, arg);
     if(!o)
         return -1;
-        
+
 //    av_log(NULL, AV_LOG_ERROR, "%s:%s: %f 0x%0X\n", opt, arg, av_get_double(avctx_opts, opt, NULL), (int)av_get_int(avctx_opts, opt, NULL));
 
     //FIXME we should always use avctx_opts, ... for storing options so there wont be any need to keep track of whats set over this
     opt_names= av_realloc(opt_names, sizeof(void*)*(opt_name_count+1));
     opt_names[opt_name_count++]= o->name;
-    
+
     /* disable generate of real time pts in ffm (need to be supressed anyway) */
     if(avctx_opts->flags & CODEC_FLAG_BITEXACT)
         ffm_nopts = 1;
@@ -3999,11 +3999,11 @@
     { "author", HAS_ARG | OPT_STRING, {(void*)&str_author}, "set the author", "string" },
     { "copyright", HAS_ARG | OPT_STRING, {(void*)&str_copyright}, "set the copyright", "string" },
     { "comment", HAS_ARG | OPT_STRING, {(void*)&str_comment}, "set the comment", "string" },
-    { "benchmark", OPT_BOOL | OPT_EXPERT, {(void*)&do_benchmark}, 
+    { "benchmark", OPT_BOOL | OPT_EXPERT, {(void*)&do_benchmark},
       "add timings for benchmarking" },
-    { "dump", OPT_BOOL | OPT_EXPERT, {(void*)&do_pkt_dump}, 
+    { "dump", OPT_BOOL | OPT_EXPERT, {(void*)&do_pkt_dump},
       "dump each input packet" },
-    { "hex", OPT_BOOL | OPT_EXPERT, {(void*)&do_hex_dump}, 
+    { "hex", OPT_BOOL | OPT_EXPERT, {(void*)&do_hex_dump},
       "when dumping packets, also dump the payload" },
     { "re", OPT_BOOL | OPT_EXPERT, {(void*)&rate_emu}, "read input at native frame rate", "" },
     { "loop", OPT_BOOL | OPT_EXPERT, {(void*)&loop_input}, "loop (current only works with images)" },
@@ -4065,7 +4065,7 @@
     { "minrate", HAS_ARG | OPT_VIDEO, {(void*)opt_video_bitrate_min}, "set min video bitrate tolerance (in kbit/s)", "bitrate" },
     { "bufsize", HAS_ARG | OPT_VIDEO, {(void*)opt_video_buffer_size}, "set ratecontrol buffer size (in kByte)", "size" },
     { "vcodec", HAS_ARG | OPT_VIDEO, {(void*)opt_video_codec}, "force video codec ('copy' to copy stream)", "codec" },
-    { "me", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_motion_estimation}, "set motion estimation method", 
+    { "me", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_motion_estimation}, "set motion estimation method",
       "method" },
     { "me_threshold", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_me_threshold}, "motion estimaton threshold",  "" },
     { "mb_threshold", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_mb_threshold}, "macroblock threshold",  "" },
@@ -4075,14 +4075,14 @@
     { "ps", HAS_ARG | OPT_EXPERT, {(void*)opt_packet_size}, "set packet size in bits", "size" },
     { "error", HAS_ARG | OPT_EXPERT, {(void*)opt_error_rate}, "error rate", "rate" },
     { "strict", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_strict}, "how strictly to follow the standards", "strictness" },
-    { "sameq", OPT_BOOL | OPT_VIDEO, {(void*)&same_quality}, 
+    { "sameq", OPT_BOOL | OPT_VIDEO, {(void*)&same_quality},
       "use same video quality as source (implies VBR)" },
     { "pass", HAS_ARG | OPT_VIDEO, {(void*)&opt_pass}, "select the pass number (1 or 2)", "n" },
     { "passlogfile", HAS_ARG | OPT_STRING | OPT_VIDEO, {(void*)&pass_logfilename}, "select two pass log file name", "file" },
-    { "deinterlace", OPT_BOOL | OPT_EXPERT | OPT_VIDEO, {(void*)&do_deinterlace}, 
+    { "deinterlace", OPT_BOOL | OPT_EXPERT | OPT_VIDEO, {(void*)&do_deinterlace},
       "deinterlace pictures" },
     { "psnr", OPT_BOOL | OPT_EXPERT | OPT_VIDEO, {(void*)&do_psnr}, "calculate PSNR of compressed frames" },
-    { "vstats", OPT_BOOL | OPT_EXPERT | OPT_VIDEO, {(void*)&do_vstats}, "dump video coding statistics to file" }, 
+    { "vstats", OPT_BOOL | OPT_EXPERT | OPT_VIDEO, {(void*)&do_vstats}, "dump video coding statistics to file" },
     { "vhook", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)add_frame_hooker}, "insert video processing module", "module" },
     { "intra_matrix", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_intra_matrix}, "specify intra matrix coeffs", "matrix" },
     { "inter_matrix", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_inter_matrix}, "specify inter matrix coeffs", "matrix" },
@@ -4114,18 +4114,18 @@
     { "scodec", HAS_ARG | OPT_SUBTITLE, {(void*)opt_subtitle_codec}, "force subtitle codec ('copy' to copy stream)", "codec" },
     { "newsubtitle", OPT_SUBTITLE, {(void*)opt_new_subtitle_stream}, "add a new subtitle stream to the current output stream" },
     { "slang", HAS_ARG | OPT_STRING | OPT_SUBTITLE, {(void *)&subtitle_language}, "set the ISO 639 language code (3 letters) of the current subtitle stream" , "code" },
-    
+
     /* grab options */
     { "vd", HAS_ARG | OPT_EXPERT | OPT_VIDEO | OPT_GRAB, {(void*)opt_video_device}, "set video grab device", "device" },
     { "vc", HAS_ARG | OPT_EXPERT | OPT_VIDEO | OPT_GRAB, {(void*)opt_video_channel}, "set video grab channel (DV1394 only)", "channel" },
     { "tvstd", HAS_ARG | OPT_EXPERT | OPT_VIDEO | OPT_GRAB, {(void*)opt_video_standard}, "set television standard (NTSC, PAL (SECAM))", "standard" },
     { "ad", HAS_ARG | OPT_EXPERT | OPT_AUDIO | OPT_GRAB, {(void*)opt_audio_device}, "set audio device", "device" },
 
-    /* G.2 grab options */ 
+    /* G.2 grab options */
     { "grab", HAS_ARG | OPT_EXPERT | OPT_GRAB, {(void*)opt_grab}, "request grabbing using", "format" },
     { "gd", HAS_ARG | OPT_EXPERT | OPT_VIDEO | OPT_GRAB, {(void*)opt_grab_device}, "set grab device", "device" },
- 
-    /* muxer options */   
+
+    /* muxer options */
     { "muxrate", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&mux_rate}, "set mux rate", "rate" },
     { "packetsize", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&mux_packet_size}, "set packet size", "size" },
     { "muxdelay", OPT_FLOAT | HAS_ARG | OPT_EXPERT, {(void*)&mux_max_delay}, "set the maximum demux-decode delay", "seconds" },
@@ -4152,7 +4152,7 @@
     show_banner();
 #ifdef CONFIG_GPL
     printf(
-    "This program is free software; you can redistribute it and/or modify\n"   
+    "This program is free software; you can redistribute it and/or modify\n"
     "it under the terms of the GNU General Public License as published by\n"
     "the Free Software Foundation; either version 2 of the License, or\n"
     "(at your option) any later version.\n"
@@ -4195,28 +4195,28 @@
     show_help_options(options, "Main options:\n",
                       OPT_EXPERT | OPT_AUDIO | OPT_VIDEO, 0);
     show_help_options(options, "\nVideo options:\n",
-                      OPT_EXPERT | OPT_AUDIO | OPT_VIDEO | OPT_GRAB, 
+                      OPT_EXPERT | OPT_AUDIO | OPT_VIDEO | OPT_GRAB,
                       OPT_VIDEO);
     show_help_options(options, "\nAdvanced Video options:\n",
-                      OPT_EXPERT | OPT_AUDIO | OPT_VIDEO | OPT_GRAB, 
+                      OPT_EXPERT | OPT_AUDIO | OPT_VIDEO | OPT_GRAB,
                       OPT_VIDEO | OPT_EXPERT);
     show_help_options(options, "\nAudio options:\n",
-                      OPT_EXPERT | OPT_AUDIO | OPT_VIDEO | OPT_GRAB, 
+                      OPT_EXPERT | OPT_AUDIO | OPT_VIDEO | OPT_GRAB,
                       OPT_AUDIO);
     show_help_options(options, "\nAdvanced Audio options:\n",
-                      OPT_EXPERT | OPT_AUDIO | OPT_VIDEO | OPT_GRAB, 
+                      OPT_EXPERT | OPT_AUDIO | OPT_VIDEO | OPT_GRAB,
                       OPT_AUDIO | OPT_EXPERT);
     show_help_options(options, "\nSubtitle options:\n",
-                      OPT_SUBTITLE | OPT_GRAB, 
+                      OPT_SUBTITLE | OPT_GRAB,
                       OPT_SUBTITLE);
     show_help_options(options, "\nAudio/Video grab options:\n",
-                      OPT_GRAB, 
+                      OPT_GRAB,
                       OPT_GRAB);
     show_help_options(options, "\nAdvanced options:\n",
-                      OPT_EXPERT | OPT_AUDIO | OPT_VIDEO | OPT_GRAB, 
+                      OPT_EXPERT | OPT_AUDIO | OPT_VIDEO | OPT_GRAB,
                       OPT_EXPERT);
     av_opt_show(avctx_opts, NULL);
-                         
+
     exit(1);
 }
 
@@ -4231,14 +4231,14 @@
     int64_t ti;
 
     av_register_all();
-    
+
     avctx_opts= avcodec_alloc_context();
 
     if (argc <= 1)
         show_help();
     else
         show_banner();
-    
+
     /* parse options */
     parse_options(argc, argv, options);
 
@@ -4247,14 +4247,14 @@
         fprintf(stderr, "Must supply at least one output file\n");
         exit(1);
     }
-    
+
     if (nb_input_files == 0) {
         input_sync = 1;
         prepare_grab();
     }
 
     ti = getutime();
-    av_encode(output_files, nb_output_files, input_files, nb_input_files, 
+    av_encode(output_files, nb_output_files, input_files, nb_input_files,
               stream_maps, nb_stream_maps);
     ti = getutime() - ti;
     if (do_benchmark) {
@@ -4281,7 +4281,7 @@
         av_free(intra_matrix);
     if(inter_matrix)
         av_free(inter_matrix);
-    
+
 #ifdef POWERPC_PERFORMANCE_REPORT
     extern void powerpc_display_perf_report(void);
     powerpc_display_perf_report();

Index: ffplay.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/ffplay.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- ffplay.c	20 Sep 2005 18:47:08 -0000	1.52
+++ ffplay.c	17 Dec 2005 18:14:26 -0000	1.53
@@ -32,14 +32,14 @@
 #define INCL_DOS
  #include <os2.h>
  #include <stdio.h>
- 
+
  void MorphToPM()
  {
    PPIB pib;
    PTIB tib;
- 
+
    DosGetInfoBlocks(&tib, &pib);
- 
+
    // Change flag from VIO to PM:
    if (pib->pib_ultype==2) pib->pib_ultype = 3;
  }
@@ -122,11 +122,11 @@
     int dtg_active_format;
 
     int audio_stream;
-    
+
     int av_sync_type;
     double external_clock; /* external clock base */
     int64_t external_clock_time;
-    
+
     double audio_clock;
     double audio_diff_cum; /* used for AV difference average computation */
     double audio_diff_avg_coef;
@@ -137,18 +137,18 @@
     int audio_hw_buf_size;
     /* samples output by the codec. we reserve more space for avsync
        compensation */
-    uint8_t audio_buf[(AVCODEC_MAX_AUDIO_FRAME_SIZE * 3) / 2]; 
+    uint8_t audio_buf[(AVCODEC_MAX_AUDIO_FRAME_SIZE * 3) / 2];
     unsigned int audio_buf_size; /* in bytes */
     int audio_buf_index; /* in bytes */
     AVPacket audio_pkt;
     uint8_t *audio_pkt_data;
     int audio_pkt_size;
-    
+
     int show_audio; /* if true, display audio samples */
     int16_t sample_array[SAMPLE_ARRAY_SIZE];
     int sample_array_index;
     int last_i_start;
-    
+
     SDL_Thread *subtitle_tid;
     int subtitle_stream;
     int subtitle_stream_changed;
@@ -158,11 +158,11 @@
     int subpq_size, subpq_rindex, subpq_windex;
     SDL_mutex *subpq_mutex;
     SDL_cond *subpq_cond;
-        
+
     double frame_timer;
     double frame_last_pts;
     double frame_last_delay;
-    double video_clock;                          ///<pts of last decoded frame / predicted pts of next decoded frame 
+    double video_clock;                          ///<pts of last decoded frame / predicted pts of next decoded frame
     int video_stream;
     AVStream *video_st;
     PacketQueue videoq;
@@ -172,7 +172,7 @@
     int pictq_size, pictq_rindex, pictq_windex;
     SDL_mutex *pictq_mutex;
     SDL_cond *pictq_cond;
-    
+
     SDL_mutex *video_decoder_mutex;
     SDL_mutex *audio_decoder_mutex;
     SDL_mutex *subtitle_decoder_mutex;
@@ -264,7 +264,7 @@
     /* duplicate the packet */
     if (av_dup_packet(pkt) < 0)
         return -1;
-    
+
     pkt1 = av_malloc(sizeof(AVPacketList));
     if (!pkt1)
         return -1;
@@ -294,7 +294,7 @@
     SDL_LockMutex(q->mutex);
 
     q->abort_request = 1;
-    
+
     SDL_CondSignal(q->cond);
 
     SDL_UnlockMutex(q->mutex);
@@ -313,7 +313,7 @@
             ret = -1;
             break;
         }
-            
+
         pkt1 = q->first_pkt;
         if (pkt1) {
             q->first_pkt = pkt1->next;
@@ -336,7 +336,7 @@
     return ret;
 }
 
-static inline void fill_rectangle(SDL_Surface *screen, 
+static inline void fill_rectangle(SDL_Surface *screen,
                                   int x, int y, int w, int h, int color)
 {
     SDL_Rect rect;
@@ -366,19 +366,19 @@
     h2 = s->height - (y + h);
     if (h2 < 0)
         h2 = 0;
-    fill_rectangle(screen, 
-                   s->xleft, s->ytop, 
-                   w1, s->height, 
+    fill_rectangle(screen,
+                   s->xleft, s->ytop,
+                   w1, s->height,
                    color);
-    fill_rectangle(screen, 
-                   s->xleft + s->width - w2, s->ytop, 
-                   w2, s->height, 
+    fill_rectangle(screen,
+                   s->xleft + s->width - w2, s->ytop,
+                   w2, s->height,
                    color);
-    fill_rectangle(screen, 
-                   s->xleft + w1, s->ytop, 
-                   s->width - w1 - w2, h1, 
+    fill_rectangle(screen,
+                   s->xleft + w1, s->ytop,
+                   s->width - w1 - w2, h1,
                    color);
-    fill_rectangle(screen, 
+    fill_rectangle(screen,
                    s->xleft + w1, s->ytop + s->height - h2,
                    s->width - w1 - w2, h2,
                    color);
@@ -450,12 +450,12 @@
     wrap3 = rect->linesize;
     p = rect->bitmap;
     pal = rect->rgba_palette;  /* Now in YCrCb! */
-    
+
     if (rect->y & 1) {
         lum += rect->x;
         cb += skip2;
         cr += skip2;
-    
+
         if (rect->x & 1) {
             YUVA_IN(y, u, v, a, p, pal);
             lum[0] = ALPHA_BLEND(a, lum[0], y, 0);
@@ -500,7 +500,7 @@
         lum += rect->x;
         cb += skip2;
         cr += skip2;
-    
+
         if (rect->x & 1) {
             YUVA_IN(y, u, v, a, p, pal);
             u1 = u;
@@ -586,7 +586,7 @@
         lum += rect->x;
         cb += skip2;
         cr += skip2;
-    
+
         if (rect->x & 1) {
             YUVA_IN(y, u, v, a, p, pal);
             lum[0] = ALPHA_BLEND(a, lum[0], y, 0);
@@ -628,15 +628,15 @@
 static void free_subpicture(SubPicture *sp)
 {
     int i;
-    
+
     for (i = 0; i < sp->sub.num_rects; i++)
     {
         av_free(sp->sub.rects[i].bitmap);
         av_free(sp->sub.rects[i].rgba_palette);
     }
-    
+
     av_free(sp->sub.rects);
-    
+
     memset(&sp->sub, 0, sizeof(AVSubtitle));
 }
 
@@ -653,13 +653,13 @@
     vp = &is->pictq[is->pictq_rindex];
     if (vp->bmp) {
         /* XXX: use variable in the frame */
-        if (is->video_st->codec->sample_aspect_ratio.num == 0) 
+        if (is->video_st->codec->sample_aspect_ratio.num == 0)
             aspect_ratio = 0;
         else
-            aspect_ratio = av_q2d(is->video_st->codec->sample_aspect_ratio) 
+            aspect_ratio = av_q2d(is->video_st->codec->sample_aspect_ratio)
                 * is->video_st->codec->width / is->video_st->codec->height;;
         if (aspect_ratio <= 0.0)
-            aspect_ratio = (float)is->video_st->codec->width / 
+            aspect_ratio = (float)is->video_st->codec->width /
                 (float)is->video_st->codec->height;
         /* if an active format is indicated, then it overrides the
            mpeg format */
@@ -745,8 +745,8 @@
         SDL_DisplayYUVOverlay(vp->bmp, &rect);
     } else {
 #if 0
-        fill_rectangle(screen, 
-                       is->xleft, is->ytop, is->width, is->height, 
+        fill_rectangle(screen,
+                       is->xleft, is->ytop, is->width, is->height,
                        QERGB(0x00, 0x00, 0x00));
 #endif
     }
@@ -755,7 +755,7 @@
 static inline int compute_mod(int a, int b)
 {
     a = a % b;
-    if (a >= 0) 
+    if (a >= 0)
         return a;
     else
         return a + b;
@@ -766,7 +766,7 @@
     int i, i_start, x, y1, y, ys, delay, n, nb_display_channels;
     int ch, channels, h, h2, bgcolor, fgcolor;
     int16_t time_diff;
-    
+
     /* compute display index : center on currently output samples */
     channels = s->audio_st->codec->channels;
     nb_display_channels = channels;
@@ -774,14 +774,14 @@
         n = 2 * channels;
         delay = audio_write_get_buf_size(s);
         delay /= n;
-        
+
         /* to be more precise, we take into account the time spent since
            the last buffer computation */
         if (audio_callback_time) {
             time_diff = av_gettime() - audio_callback_time;
             delay += (time_diff * s->audio_st->codec->sample_rate) / 1000000;
         }
-        
+
         delay -= s->width / 2;
         if (delay < s->width)
             delay = s->width;
@@ -792,8 +792,8 @@
     }
 
     bgcolor = SDL_MapRGB(screen->format, 0x00, 0x00, 0x00);
-    fill_rectangle(screen, 
-                   s->xleft, s->ytop, s->width, s->height, 
+    fill_rectangle(screen,
+                   s->xleft, s->ytop, s->width, s->height,
                    bgcolor);
 
     fgcolor = SDL_MapRGB(screen->format, 0xff, 0xff, 0xff);
@@ -813,8 +813,8 @@
             } else {
                 ys = y1;
             }
-            fill_rectangle(screen, 
-                           s->xleft + x, ys, 1, y, 
+            fill_rectangle(screen,
+                           s->xleft + x, ys, 1, y,
                            fgcolor);
             i += channels;
             if (i >= SAMPLE_ARRAY_SIZE)
@@ -826,8 +826,8 @@
 
     for(ch = 1;ch < nb_display_channels; ch++) {
         y = s->ytop + ch * h;
-        fill_rectangle(screen, 
-                       s->xleft, y, s->width, 1, 
+        fill_rectangle(screen,
+                       s->xleft, y, s->width, 1,
                        fgcolor);
     }
     SDL_UpdateRect(screen, s->xleft, s->ytop, s->width, s->height);
@@ -836,7 +836,7 @@
 /* display the current picture, if any */
 static void video_display(VideoState *is)
 {
-    if (is->audio_st && is->show_audio) 
+    if (is->audio_st && is->show_audio)
         video_audio_display(is);
     else if (is->video_st)
         video_image_display(is);
@@ -866,7 +866,7 @@
     hw_buf_size = audio_write_get_buf_size(is);
     bytes_per_sec = 0;
     if (is->audio_st) {
-        bytes_per_sec = is->audio_st->codec->sample_rate * 
+        bytes_per_sec = is->audio_st->codec->sample_rate *
             2 * is->audio_st->codec->channels;
     }
     if (bytes_per_sec)
@@ -971,7 +971,7 @@
                    duplicating or deleting a frame */
                 ref_clock = get_master_clock(is);
                 diff = vp->pts - ref_clock;
-                
+
                 /* skip or repeat frame. We take into account the
                    delay to compute the threshold. I still don't know
                    if it is the best guess */
@@ -998,21 +998,21 @@
             schedule_refresh(is, (int)(actual_delay * 1000 + 0.5));
 
 #if defined(DEBUG_SYNC)
-            printf("video: delay=%0.3f actual_delay=%0.3f pts=%0.3f A-V=%f\n", 
+            printf("video: delay=%0.3f actual_delay=%0.3f pts=%0.3f A-V=%f\n",
                    delay, actual_delay, vp->pts, -diff);
 #endif
 
             if(is->subtitle_st) {
                 if (is->subtitle_stream_changed) {
                     SDL_LockMutex(is->subpq_mutex);
-                    
+
                     while (is->subpq_size) {
                         free_subpicture(&is->subpq[is->subpq_rindex]);
-                    
+
                         /* update queue size and signal for next picture */
                         if (++is->subpq_rindex == SUBPICTURE_QUEUE_SIZE)
                             is->subpq_rindex = 0;
-                                
+
                         is->subpq_size--;
                     }
                     is->subtitle_stream_changed = 0;
@@ -1048,11 +1048,11 @@
 
             /* display picture */
             video_display(is);
-            
+
             /* update queue size and signal for next picture */
             if (++is->pictq_rindex == VIDEO_PICTURE_QUEUE_SIZE)
                 is->pictq_rindex = 0;
-            
+
             SDL_LockMutex(is->pictq_mutex);
             is->pictq_size--;
             SDL_CondSignal(is->pictq_cond);
@@ -1065,7 +1065,7 @@
 
         /* if only audio stream, then display the audio bars (better
            than nothing, just to test the implementation */
-        
+
         /* display picture */
         video_display(is);
     } else {
@@ -1076,7 +1076,7 @@
         int64_t cur_time;
         int aqsize, vqsize, sqsize;
         double av_diff;
-        
+
         cur_time = av_gettime();
         if (!last_time || (cur_time - last_time) >= 500 * 1000) {
             aqsize = 0;
@@ -1091,7 +1091,7 @@
             av_diff = 0;
             if (is->audio_st && is->video_st)
                 av_diff = get_audio_clock(is) - get_video_clock(is);
-            printf("%7.2f A-V:%7.3f aq=%5dKB vq=%5dKB sq=%5dB    \r", 
+            printf("%7.2f A-V:%7.3f aq=%5dKB vq=%5dKB sq=%5dB    \r",
                    get_master_clock(is), av_diff, aqsize / 1024, vqsize / 1024, sqsize);
             fflush(stdout);
             last_time = cur_time;
@@ -1130,7 +1130,7 @@
 #endif
     vp->bmp = SDL_CreateYUVOverlay(is->video_st->codec->width,
                                    is->video_st->codec->height,
-                                   SDL_YV12_OVERLAY, 
+                                   SDL_YV12_OVERLAY,
                                    screen);
     vp->width = is->video_st->codec->width;
     vp->height = is->video_st->codec->height;
@@ -1150,7 +1150,7 @@
     VideoPicture *vp;
     int dst_pix_fmt;
     AVPicture pict;
-    
+
     /* wait until we have space to put a new picture */
     SDL_LockMutex(is->pictq_mutex);
     while (is->pictq_size >= VIDEO_PICTURE_QUEUE_SIZE &&
@@ -1158,14 +1158,14 @@
         SDL_CondWait(is->pictq_cond, is->pictq_mutex);
     }
     SDL_UnlockMutex(is->pictq_mutex);
-    
+
     if (is->videoq.abort_request)
         return -1;
 
     vp = &is->pictq[is->pictq_windex];
 
     /* alloc or resize hardware picture buffer */
-    if (!vp->bmp || 
+    if (!vp->bmp ||
         vp->width != is->video_st->codec->width ||
         vp->height != is->video_st->codec->height) {
         SDL_Event event;
@@ -1177,7 +1177,7 @@
         event.type = FF_ALLOC_EVENT;
         event.user.data1 = is;
         SDL_PushEvent(&event);
-        
+
         /* wait until the picture is allocated */
         SDL_LockMutex(is->pictq_mutex);
         while (!vp->allocated && !is->videoq.abort_request) {
@@ -1202,8 +1202,8 @@
         pict.linesize[0] = vp->bmp->pitches[0];
         pict.linesize[1] = vp->bmp->pitches[2];
         pict.linesize[2] = vp->bmp->pitches[1];
-        img_convert(&pict, dst_pix_fmt, 
-                    (AVPicture *)src_frame, is->video_st->codec->pix_fmt, 
+        img_convert(&pict, dst_pix_fmt,
+                    (AVPicture *)src_frame, is->video_st->codec->pix_fmt,
                     is->video_st->codec->width, is->video_st->codec->height);
         /* update the bitmap content */
         SDL_UnlockYUVOverlay(vp->bmp);
@@ -1220,14 +1220,14 @@
     return 0;
 }
 
-/** 
- * compute the exact PTS for the picture if it is omitted in the stream 
+/**
+ * compute the exact PTS for the picture if it is omitted in the stream
  * @param pts1 the dts of the pkt / pts of the frame
  */
 static int output_picture2(VideoState *is, AVFrame *src_frame, double pts1)
 {
     double frame_delay, pts;
-    
+
     pts = pts1;
 
     if (pts != 0) {
@@ -1252,7 +1252,7 @@
             ftype = 'I';
         else
             ftype = 'P';
-        printf("frame_type=%c clock=%0.3f pts=%0.3f\n", 
+        printf("frame_type=%c clock=%0.3f pts=%0.3f\n",
                ftype, pts, pts1);
     }
 #endif
@@ -1280,8 +1280,8 @@
             pts = av_q2d(is->video_st->time_base)*pkt->dts;
 
             SDL_LockMutex(is->video_decoder_mutex);
-            len1 = avcodec_decode_video(is->video_st->codec, 
-                                        frame, &got_picture, 
+            len1 = avcodec_decode_video(is->video_st->codec,
+                                        frame, &got_picture,
                                         pkt->data, pkt->size);
             SDL_UnlockMutex(is->video_decoder_mutex);
 //            if (len1 < 0)
@@ -1291,7 +1291,7 @@
                     goto the_end;
             }
         av_free_packet(pkt);
-        if (step) 
+        if (step)
             if (cur_stream)
                 stream_pause(cur_stream);
     }
@@ -1316,17 +1316,17 @@
         }
         if (packet_queue_get(&is->subtitleq, pkt, 1) < 0)
             break;
-            
+
         SDL_LockMutex(is->subpq_mutex);
         while (is->subpq_size >= SUBPICTURE_QUEUE_SIZE &&
                !is->subtitleq.abort_request) {
             SDL_CondWait(is->subpq_cond, is->subpq_mutex);
         }
         SDL_UnlockMutex(is->subpq_mutex);
-        
+
         if (is->subtitleq.abort_request)
             goto the_end;
-            
+
         sp = &is->subpq[is->subpq_windex];
 
        /* NOTE: ipts is the PTS of the _first_ picture beginning in
@@ -1336,15 +1336,15 @@
             pts = av_q2d(is->subtitle_st->time_base)*pkt->pts;
 
         SDL_LockMutex(is->subtitle_decoder_mutex);
-        len1 = avcodec_decode_subtitle(is->subtitle_st->codec, 
-                                    &sp->sub, &got_subtitle, 
+        len1 = avcodec_decode_subtitle(is->subtitle_st->codec,
+                                    &sp->sub, &got_subtitle,
                                     pkt->data, pkt->size);
         SDL_UnlockMutex(is->subtitle_decoder_mutex);
 //            if (len1 < 0)
 //                break;
         if (got_subtitle && sp->sub.format == 0) {
             sp->pts = pts;
-            
+
             for (i = 0; i < sp->sub.num_rects; i++)
             {
                 for (j = 0; j < sp->sub.rects[i].nb_colors; j++)
@@ -1365,7 +1365,7 @@
             SDL_UnlockMutex(is->subpq_mutex);
         }
         av_free_packet(pkt);
-//        if (step) 
+//        if (step)
 //            if (cur_stream)
 //                stream_pause(cur_stream);
     }
@@ -1396,12 +1396,12 @@
 
 /* return the new audio buffer size (samples can be added or deleted
    to get better sync if video or external master clock) */
-static int synchronize_audio(VideoState *is, short *samples, 
+static int synchronize_audio(VideoState *is, short *samples,
                              int samples_size1, double pts)
 {
     int n, samples_size;
     double ref_clock;
-    
+
     n = 2 * is->audio_st->codec->channels;
     samples_size = samples_size1;
 
@@ -1410,10 +1410,10 @@
          is->av_sync_type == AV_SYNC_EXTERNAL_CLOCK)) {
         double diff, avg_diff;
         int wanted_size, min_size, max_size, nb_samples;
-            
+
         ref_clock = get_master_clock(is);
         diff = get_audio_clock(is) - ref_clock;
-        
+
         if (diff < AV_NOSYNC_THRESHOLD) {
             is->audio_diff_cum = diff + is->audio_diff_avg_coef * is->audio_diff_cum;
             if (is->audio_diff_avg_count < AUDIO_DIFF_AVG_NB) {
@@ -1426,14 +1426,14 @@
                 if (fabs(avg_diff) >= is->audio_diff_threshold) {
                     wanted_size = samples_size + ((int)(diff * is->audio_st->codec->sample_rate) * n);
                     nb_samples = samples_size / n;
-                
+
                     min_size = ((nb_samples * (100 - SAMPLE_CORRECTION_PERCENT_MAX)) / 100) * n;
                     max_size = ((nb_samples * (100 + SAMPLE_CORRECTION_PERCENT_MAX)) / 100) * n;
                     if (wanted_size < min_size)
                         wanted_size = min_size;
                     else if (wanted_size > max_size)
                         wanted_size = max_size;
-                    
+
                     /* add or remove samples to correction the synchro */
                     if (wanted_size < samples_size) {
                         /* remove samples */
@@ -1441,7 +1441,7 @@
                     } else if (wanted_size > samples_size) {
                         uint8_t *samples_end, *q;
                         int nb;
-                        
+
                         /* add samples */
                         nb = (samples_size - wanted_size);
                         samples_end = (uint8_t *)samples + samples_size - n;
@@ -1455,8 +1455,8 @@
                     }
                 }
 #if 0
-                printf("diff=%f adiff=%f sample_diff=%d apts=%0.3f vpts=%0.3f %f\n", 
-                       diff, avg_diff, samples_size - samples_size1, 
+                printf("diff=%f adiff=%f sample_diff=%d apts=%0.3f vpts=%0.3f %f\n",
+                       diff, avg_diff, samples_size - samples_size1,
                        is->audio_clock, is->video_clock, is->audio_diff_threshold);
 #endif
             }
@@ -1482,8 +1482,8 @@
         /* NOTE: the audio packet can contain several frames */
         while (is->audio_pkt_size > 0) {
             SDL_LockMutex(is->audio_decoder_mutex);
-            len1 = avcodec_decode_audio(is->audio_st->codec, 
-                                        (int16_t *)audio_buf, &data_size, 
+            len1 = avcodec_decode_audio(is->audio_st->codec,
+                                        (int16_t *)audio_buf, &data_size,
                                         is->audio_pkt_data, is->audio_pkt_size);
             SDL_UnlockMutex(is->audio_decoder_mutex);
             if (len1 < 0) {
@@ -1491,7 +1491,7 @@
                 is->audio_pkt_size = 0;
                 break;
             }
-            
+
             is->audio_pkt_data += len1;
             is->audio_pkt_size -= len1;
             if (data_size <= 0)
@@ -1500,7 +1500,7 @@
             pts = is->audio_clock;
             *pts_ptr = pts;
             n = 2 * is->audio_st->codec->channels;
-            is->audio_clock += (double)data_size / 
+            is->audio_clock += (double)data_size /
                 (double)(n * is->audio_st->codec->sample_rate);
 #if defined(DEBUG_SYNC)
             {
@@ -1517,17 +1517,17 @@
         /* free the current packet */
         if (pkt->data)
             av_free_packet(pkt);
-        
+
         if (is->paused || is->audioq.abort_request) {
             return -1;
         }
-        
+
         /* read next packet */
         if (packet_queue_get(&is->audioq, pkt, 1) < 0)
             return -1;
         is->audio_pkt_data = pkt->data;
         is->audio_pkt_size = pkt->size;
-        
+
         /* if update the audio clock with the pts */
         if (pkt->pts != AV_NOPTS_VALUE) {
             is->audio_clock = av_q2d(is->audio_st->time_base)*pkt->pts;
@@ -1551,7 +1551,7 @@
     double pts;
 
     audio_callback_time = av_gettime();
-    
+
     while (len > 0) {
         if (is->audio_buf_index >= is->audio_buf_size) {
            audio_size = audio_decode_frame(is, is->audio_buf, &pts);
@@ -1562,7 +1562,7 @@
            } else {
                if (is->show_audio)
                    update_sample_display(is, (int16_t *)is->audio_buf, audio_size);
-               audio_size = synchronize_audio(is, (int16_t *)is->audio_buf, audio_size, 
+               audio_size = synchronize_audio(is, (int16_t *)is->audio_buf, audio_size,
                                               pts);
                is->audio_buf_size = audio_size;
            }
@@ -1590,7 +1590,7 @@
     if (stream_index < 0 || stream_index >= ic->nb_streams)
         return -1;
     enc = ic->streams[stream_index]->codec;
-    
+
     /* prepare audio output */
     if (enc->codec_type == CODEC_TYPE_AUDIO) {
         wanted_spec.freq = enc->sample_rate;
@@ -1666,7 +1666,7 @@
         is->subtitle_stream = stream_index;
         is->subtitle_st = ic->streams[stream_index];
         packet_queue_init(&is->subtitleq);
-        
+
         is->subtitle_tid = SDL_CreateThread(subtitle_thread, is);
         break;
     default:
@@ -1679,7 +1679,7 @@
 {
     AVFormatContext *ic = is->ic;
     AVCodecContext *enc;
-    
+
     if (stream_index < 0 || stream_index >= ic->nb_streams)
         return;
     enc = ic->streams[stream_index]->codec;
@@ -1707,12 +1707,12 @@
         break;
     case CODEC_TYPE_SUBTITLE:
         packet_queue_abort(&is->subtitleq);
-        
+
         /* note: we also signal this mutex to make sure we deblock the
            video thread in all cases */
         SDL_LockMutex(is->subpq_mutex);
         is->subtitle_stream_changed = 1;
-    
+
         SDL_CondSignal(is->subpq_cond);
         SDL_UnlockMutex(is->subpq_mutex);
 
@@ -1790,7 +1790,7 @@
     ap->image_format = image_format;
     ap->initial_pause = 1; /* we force a pause when starting an RTSP
                               stream */
-    
+
     err = av_open_input_file(&ic, is->filename, is->iformat, 0, ap);
     if (err < 0) {
         print_error(is->filename, err);
@@ -1827,7 +1827,7 @@
             timestamp += ic->start_time;
         ret = av_seek_frame(ic, -1, timestamp, AVSEEK_FLAG_BACKWARD);
         if (ret < 0) {
-            fprintf(stderr, "%s: could not seek to position %0.3f\n", 
+            fprintf(stderr, "%s: could not seek to position %0.3f\n",
                     is->filename, (double)timestamp / AV_TIME_BASE);
         }
     }
@@ -1928,8 +1928,8 @@
 
         /* if the queue are full, no need to read more */
         if (is->audioq.size > MAX_AUDIOQ_SIZE ||
-            is->videoq.size > MAX_VIDEOQ_SIZE || 
-            is->subtitleq.size > MAX_SUBTITLEQ_SIZE || 
+            is->videoq.size > MAX_VIDEOQ_SIZE ||
+            is->subtitleq.size > MAX_SUBTITLEQ_SIZE ||
             url_feof(&ic->pb)) {
             /* wait 10 ms */
             SDL_Delay(10);
@@ -1978,7 +1978,7 @@
 
     if (ret != 0) {
         SDL_Event event;
-        
+
         event.type = FF_QUIT_EVENT;
         event.user.data1 = is;
         SDL_PushEvent(&event);
@@ -2005,10 +2005,10 @@
     /* start video display */
     is->pictq_mutex = SDL_CreateMutex();
     is->pictq_cond = SDL_CreateCond();
-    
+
     is->subpq_mutex = SDL_CreateMutex();
     is->subpq_cond = SDL_CreateCond();
-    
+
     is->subtitle_decoder_mutex = SDL_CreateMutex();
     is->audio_decoder_mutex = SDL_CreateMutex();
     is->video_decoder_mutex = SDL_CreateMutex();
@@ -2187,15 +2187,15 @@
                 step_to_next_frame();
                 break;
             case SDLK_a:
-                if (cur_stream) 
+                if (cur_stream)
                     stream_cycle_channel(cur_stream, CODEC_TYPE_AUDIO);
                 break;
             case SDLK_v:
-                if (cur_stream) 
+                if (cur_stream)
                     stream_cycle_channel(cur_stream, CODEC_TYPE_VIDEO);
                 break;
             case SDLK_t:
-                if (cur_stream) 
+                if (cur_stream)
                     stream_cycle_channel(cur_stream, CODEC_TYPE_SUBTITLE);
                 break;
             case SDLK_w:
@@ -2243,7 +2243,7 @@
 	    break;
         case SDL_VIDEORESIZE:
             if (cur_stream) {
-                screen = SDL_SetVideoMode(event.resize.w, event.resize.h, 0, 
+                screen = SDL_SetVideoMode(event.resize.w, event.resize.h, 0,
                                           SDL_HWSURFACE|SDL_RESIZABLE|SDL_ASYNCBLIT|SDL_HWACCEL);
                 cur_stream->width = event.resize.w;
                 cur_stream->height = event.resize.h;
@@ -2287,7 +2287,7 @@
 static void opt_image_format(const char *arg)
 {
     AVImageFormat *f;
-    
+
     for(f = first_image_format; f != NULL; f = f->next) {
         if (!strcmp(arg, f->name))
             break;
@@ -2328,7 +2328,7 @@
 {
     debug = atoi(arg);
 }
-    
+
 static void opt_vismv(const char *arg)
 {
     debug_mv = atoi(arg);
@@ -2341,9 +2341,9 @@
     fprintf(stderr, "Warning: not compiled with thread support, using thread emulation\n");
 #endif
 }
-    
+
 const OptionDef options[] = {
-    { "h", 0, {(void*)show_help}, "show help" },    
+    { "h", 0, {(void*)show_help}, "show help" },
     { "x", HAS_ARG, {(void*)opt_width}, "force displayed width", "width" },
     { "y", HAS_ARG, {(void*)opt_height}, "force displayed height", "height" },
 #if 0
@@ -2413,13 +2413,13 @@
 int main(int argc, char **argv)
 {
     int flags, w, h;
-    
+
     /* register all codecs, demux and protocols */
     av_register_all();
 
     #ifdef CONFIG_OS2
       MorphToPM(); // Morph the VIO application to a PM one to be able to use Win* functions
- 
+
       // Make stdout and stderr unbuffered
       setbuf( stdout, NULL );
       setbuf( stderr, NULL );

Index: ffserver.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/ffserver.c,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -d -r1.101 -r1.102
--- ffserver.c	12 Dec 2005 01:56:45 -0000	1.101
+++ ffserver.c	17 Dec 2005 18:14:26 -0000	1.102
@@ -50,7 +50,7 @@
     HTTPSTATE_SEND_DATA_HEADER,
     HTTPSTATE_SEND_DATA,          /* sending TCP or UDP data */
     HTTPSTATE_SEND_DATA_TRAILER,
-    HTTPSTATE_RECEIVE_DATA,       
+    HTTPSTATE_RECEIVE_DATA,
     HTTPSTATE_WAIT_FEED,          /* wait for data from the feed */
     HTTPSTATE_READY,
 
@@ -135,12 +135,12 @@
     uint8_t *buffer;
     int is_packetized; /* if true, the stream is packetized */
     int packet_stream_index; /* current stream for output in state machine */
-    
+
     /* RTSP state specific */
     uint8_t *pb_buffer; /* XXX: use that in all the code */
     ByteIOContext *pb;
     int seq; /* RTSP sequence number */
-    
+
     /* RTP state specific */
     enum RTSPProtocol rtp_protocol;
     char session_id[32]; /* session id */
@@ -259,14 +259,14 @@
 static void rtsp_cmd_teardown(HTTPContext *c, const char *url, RTSPHeader *h);
 
 /* SDP handling */
-static int prepare_sdp_description(FFStream *stream, uint8_t **pbuffer, 
+static int prepare_sdp_description(FFStream *stream, uint8_t **pbuffer,
                                    struct in_addr my_ip);
 
 /* RTP handling */
-static HTTPContext *rtp_new_connection(struct sockaddr_in *from_addr, 
+static HTTPContext *rtp_new_connection(struct sockaddr_in *from_addr,
                                        FFStream *stream, const char *session_id,
                                        enum RTSPProtocol rtp_protocol);
-static int rtp_new_av_stream(HTTPContext *c, 
+static int rtp_new_av_stream(HTTPContext *c,
                              int stream_index, struct sockaddr_in *dest_addr,
                              HTTPContext *rtsp_c);
 
@@ -296,11 +296,11 @@
 
 static FILE *logfile = NULL;
 
-static void __attribute__ ((format (printf, 1, 2))) http_log(const char *fmt, ...) 
+static void __attribute__ ((format (printf, 1, 2))) http_log(const char *fmt, ...)
 {
     va_list ap;
     va_start(ap, fmt);
-    
+
     if (logfile) {
         vfprintf(logfile, fmt, ap);
         fflush(logfile);
@@ -326,12 +326,12 @@
 {
     char buf2[32];
 
-    if (c->suppress_log) 
+    if (c->suppress_log)
         return;
 
-    http_log("%s - - [%s] \"%s %s %s\" %d %"PRId64"\n", 
-             inet_ntoa(c->from_addr.sin_addr), 
-             ctime1(buf2), c->method, c->url, 
+    http_log("%s - - [%s] \"%s %s %s\" %d %"PRId64"\n",
+             inet_ntoa(c->from_addr.sin_addr),
+             ctime1(buf2), c->method, c->url,
              c->protocol, (c->http_error ? c->http_error : 200), c->data_count);
 }
 
@@ -355,7 +355,7 @@
 {
     if (cur_time == drd->time1)
         return 0;
-    
+
     return ((count - drd->count1) * 1000) / (cur_time - drd->time1);
 }
 
@@ -436,7 +436,7 @@
         perror ("socket");
         return -1;
     }
-        
+
     tmp = 1;
     setsockopt(server_fd, SOL_SOCKET, SO_REUSEADDR, &tmp, sizeof(tmp));
 
@@ -447,7 +447,7 @@
         close(server_fd);
         return -1;
     }
-  
+
     if (listen (server_fd, 5) < 0) {
         perror ("listen");
         close(server_fd);
@@ -471,7 +471,7 @@
     for(stream = first_stream; stream != NULL; stream = stream->next) {
         if (stream->is_multicast) {
             /* open the RTP connection */
-            snprintf(session_id, sizeof(session_id), 
+            snprintf(session_id, sizeof(session_id),
                      "%08x%08x", (int)random(), (int)random());
 
             /* choose a port if none given */
@@ -484,24 +484,24 @@
             dest_addr.sin_addr = stream->multicast_ip;
             dest_addr.sin_port = htons(stream->multicast_port);
 
-            rtp_c = rtp_new_connection(&dest_addr, stream, session_id, 
+            rtp_c = rtp_new_connection(&dest_addr, stream, session_id,
                                        RTSP_PROTOCOL_RTP_UDP_MULTICAST);
             if (!rtp_c) {
                 continue;
             }
             if (open_input_stream(rtp_c, "") < 0) {
-                fprintf(stderr, "Could not open input stream for stream '%s'\n", 
+                fprintf(stderr, "Could not open input stream for stream '%s'\n",
                         stream->filename);
                 continue;
             }
 
             /* open each RTP stream */
-            for(stream_index = 0; stream_index < stream->nb_streams; 
+            for(stream_index = 0; stream_index < stream->nb_streams;
                 stream_index++) {
-                dest_addr.sin_port = htons(stream->multicast_port + 
+                dest_addr.sin_port = htons(stream->multicast_port +
                                            2 * stream_index);
                 if (rtp_new_av_stream(rtp_c, stream_index, &dest_addr, NULL) < 0) {
-                    fprintf(stderr, "Could not open output stream '%s/streamid=%d'\n", 
+                    fprintf(stderr, "Could not open output stream '%s/streamid=%d'\n",
                             stream->filename, stream_index);
                     exit(1);
                 }
@@ -527,7 +527,7 @@
     rtsp_server_fd = socket_open_listen(&my_rtsp_addr);
     if (rtsp_server_fd < 0)
         return -1;
-    
+
     http_log("ffserver started.\n");
 
     start_children(first_feed);
@@ -604,7 +604,7 @@
             if (ret < 0 && errno != EAGAIN && errno != EINTR)
                 return -1;
         } while (ret <= 0);
-        
+
         cur_time = gettime_ms();
 
         if (need_to_start_children) {
@@ -657,7 +657,7 @@
     HTTPContext *c = NULL;
 
     len = sizeof(from_addr);
-    fd = accept(server_fd, (struct sockaddr *)&from_addr, 
+    fd = accept(server_fd, (struct sockaddr *)&from_addr,
                 &len);
     if (fd < 0)
         return;
@@ -667,12 +667,12 @@
        close to the connection limit */
     if (nb_connections >= nb_max_connections)
         goto fail;
-    
+
     /* add a new connection */
     c = av_mallocz(sizeof(HTTPContext));
     if (!c)
         goto fail;
-    
+
     c->fd = fd;
     c->poll_entry = NULL;
     c->from_addr = from_addr;
@@ -684,7 +684,7 @@
     c->next = first_http_ctx;
     first_http_ctx = c;
     nb_connections++;
-    
+
     start_wait_request(c, is_rtsp);
 
     return;
@@ -738,9 +738,9 @@
 
     /* free RTP output streams if any */
     nb_streams = 0;
-    if (c->stream) 
+    if (c->stream)
         nb_streams = c->stream->nb_streams;
-    
+
     for(i=0;i<nb_streams;i++) {
         ctx = c->rtp_ctx[i];
         if (ctx) {
@@ -752,7 +752,7 @@
             url_close(h);
         }
     }
-    
+
     ctx = &c->fmt_ctx;
 
     if (!c->last_packet_sent) {
@@ -765,8 +765,8 @@
         }
     }
 
-    for(i=0; i<ctx->nb_streams; i++) 
-        av_free(ctx->streams[i]) ; 
+    for(i=0; i<ctx->nb_streams; i++)
+        av_free(ctx->streams[i]) ;
 
     if (c->stream && !c->post && c->stream->stream_type == STREAM_TYPE_LIVE)
         current_bandwidth -= c->stream->bandwidth;
@@ -780,7 +780,7 @@
 static int handle_connection(HTTPContext *c)
 {
     int len, ret;
-    
+
     switch(c->state) {
     case HTTPSTATE_WAIT_REQUEST:
     case RTSPSTATE_WAIT_REQUEST:
@@ -864,7 +864,7 @@
         if (!c->is_packetized) {
             if (c->poll_entry->revents & (POLLERR | POLLHUP))
                 return -1;
-            
+
             /* no need to read if no events */
             if (!(c->poll_entry->revents & POLLOUT))
                 return 0;
@@ -922,7 +922,7 @@
         /* no need to write if no events */
         if (!(c->poll_entry->revents & POLLOUT))
             return 0;
-        len = write(c->fd, c->packet_buffer_ptr, 
+        len = write(c->fd, c->packet_buffer_ptr,
                     c->packet_buffer_end - c->packet_buffer_ptr);
         if (len < 0) {
             if (errno != EAGAIN && errno != EINTR) {
@@ -1014,7 +1014,7 @@
 
         /* Potential stream */
 
-        /* We want the fastest stream less than bit_rate, or the slowest 
+        /* We want the fastest stream less than bit_rate, or the slowest
          * faster than bit_rate
          */
 
@@ -1076,7 +1076,7 @@
 static void do_switch_stream(HTTPContext *c, int i)
 {
     if (c->switch_feed_streams[i] >= 0) {
-#ifdef PHILIP        
+#ifdef PHILIP
         c->feed_streams[i] = c->switch_feed_streams[i];
 #endif
 
@@ -1205,7 +1205,7 @@
 
     if (ffserver_debug)
 	http_log("New connection: %s %s\n", cmd, url);
-    
+
     /* find the filename and the optional info string in the request */
     p = url;
     if (*p == '/')
@@ -1251,7 +1251,7 @@
         redir_type = REDIR_SDP;
         compute_real_filename(filename, sizeof(url) - 1);
     }
-    
+
     stream = first_stream;
     while (stream != NULL) {
         if (!strcmp(stream->filename, filename) && validate_acl(stream, c))
@@ -1298,7 +1298,7 @@
     if (c->post == 0 && stream->stream_type == STREAM_TYPE_LIVE) {
         current_bandwidth += stream->bandwidth;
     }
-    
+
     if (c->post == 0 && max_bandwidth < current_bandwidth) {
         c->http_error = 200;
         q = c->buffer;
@@ -1317,10 +1317,10 @@
         c->state = HTTPSTATE_SEND_HEADER;
         return 0;
     }
-    
+
     if (redir_type != REDIR_NONE) {
         char *hostinfo = 0;
-        
+
         for (p = c->buffer; *p && *p != '\r' && *p != '\n'; ) {
             if (strncasecmp(p, "Host:", 5) == 0) {
                 hostinfo = p + 5;
@@ -1358,7 +1358,7 @@
                         q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "\r\n");
                         q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "<ASX Version=\"3\">\r\n");
                         //q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "<!-- Autogenerated by ffserver -->\r\n");
-                        q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "<ENTRY><REF HREF=\"http://%s/%s%s\"/></ENTRY>\r\n", 
+                        q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "<ENTRY><REF HREF=\"http://%s/%s%s\"/></ENTRY>\r\n",
                                 hostbuf, filename, info);
                         q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "</ASX>\r\n");
                         break;
@@ -1367,7 +1367,7 @@
                         q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "Content-type: audio/x-pn-realaudio\r\n");
                         q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "\r\n");
                         q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "# Autogenerated by ffserver\r\n");
-                        q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "http://%s/%s%s\r\n", 
+                        q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "http://%s/%s%s\r\n",
                                 hostbuf, filename, info);
                         break;
                     case REDIR_ASF:
@@ -1375,7 +1375,7 @@
                         q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "Content-type: video/x-ms-asf\r\n");
                         q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "\r\n");
                         q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "[Reference]\r\n");
-                        q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "Ref1=http://%s/%s%s\r\n", 
+                        q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "Ref1=http://%s/%s%s\r\n",
                                 hostbuf, filename, info);
                         break;
                     case REDIR_RTSP:
@@ -1390,8 +1390,8 @@
                             /* XXX: incorrect mime type ? */
                             q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "Content-type: application/x-rtsp\r\n");
                             q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "\r\n");
-                            q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "rtsp://%s:%d/%s\r\n", 
-                                         hostname, ntohs(my_rtsp_addr.sin_port), 
+                            q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "rtsp://%s:%d/%s\r\n",
+                                         hostname, ntohs(my_rtsp_addr.sin_port),
                                          filename);
                         }
                         break;
@@ -1407,10 +1407,10 @@
 
                             len = sizeof(my_addr);
                             getsockname(c->fd, (struct sockaddr *)&my_addr, &len);
-                            
+
                             /* XXX: should use a dynamic buffer */
-                            sdp_data_size = prepare_sdp_description(stream, 
-                                                                    &sdp_data, 
+                            sdp_data_size = prepare_sdp_description(stream,
+                                                                    &sdp_data,
                                                                     my_addr.sin_addr);
                             if (sdp_data_size > 0) {
                                 memcpy(q, sdp_data, sdp_data_size);
@@ -1450,7 +1450,7 @@
              */
             char *logline = 0;
             int client_id = 0;
-            
+
             for (p = c->buffer; *p && *p != '\r' && *p != '\n'; ) {
                 if (strncasecmp(p, "Pragma: log-line=", 17) == 0) {
                     logline = p;
@@ -1498,7 +1498,7 @@
                     }
                 }
             }
-            
+
             snprintf(msg, sizeof(msg), "POST command not handled");
             c->stream = 0;
             goto send_error;
@@ -1545,7 +1545,7 @@
     }
     q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "Content-Type: %s\r\n", mime_type);
     q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "\r\n");
-    
+
     /* prepare output buffer */
     c->http_error = 0;
     c->buffer_ptr = c->buffer;
@@ -1607,7 +1607,7 @@
     url_fprintf(pb, "Content-type: %s\r\n", "text/html");
     url_fprintf(pb, "Pragma: no-cache\r\n");
     url_fprintf(pb, "\r\n");
-    
+
     url_fprintf(pb, "<HEAD><TITLE>FFServer Status</TITLE>\n");
     if (c->stream->feed_filename) {
         url_fprintf(pb, "<link rel=\"shortcut icon\" href=\"%s\">\n", c->stream->feed_filename);
@@ -1644,8 +1644,8 @@
                         strcpy(eosf, ".rtsp");
                 }
             }
-            
-            url_fprintf(pb, "<TR><TD><A HREF=\"/%s\">%s</A> ", 
+
+            url_fprintf(pb, "<TR><TD><A HREF=\"/%s\">%s</A> ",
                          sfilename, stream->filename);
             url_fprintf(pb, "<td align=right> %d <td align=right> ",
                         stream->conns_served);
@@ -1687,7 +1687,7 @@
                             av_abort();
                         }
                     }
-                    url_fprintf(pb, "<TD align=center> %s <TD align=right> %d <TD align=right> %d <TD> %s %s <TD align=right> %d <TD> %s %s", 
+                    url_fprintf(pb, "<TD align=center> %s <TD align=right> %d <TD align=right> %d <TD> %s %s <TD align=right> %d <TD> %s %s",
                                  stream->fmt->name,
                                  stream->bandwidth,
                                  video_bit_rate / 1000, video_codec_name, video_codec_name_extra,
@@ -1722,16 +1722,16 @@
                     char ps_cmd[64];
 
                     /* This is somewhat linux specific I guess */
-                    snprintf(ps_cmd, sizeof(ps_cmd), 
-                             "ps -o \"%%cpu,cputime\" --no-headers %d", 
+                    snprintf(ps_cmd, sizeof(ps_cmd),
+                             "ps -o \"%%cpu,cputime\" --no-headers %d",
                              stream->pid);
-                    
+
                     pid_stat = popen(ps_cmd, "r");
                     if (pid_stat) {
                         char cpuperc[10];
                         char cpuused[64];
-                        
-                        if (fscanf(pid_stat, "%10s %64s", cpuperc, 
+
+                        if (fscanf(pid_stat, "%10s %64s", cpuperc,
                                    cpuused) == 2) {
                             url_fprintf(pb, "Currently using %s%% of the cpu. Total time used %s.\n",
                                          cpuperc, cpuused);
@@ -1770,16 +1770,16 @@
             }
             url_fprintf(pb, "</table>\n");
 
-        }       
+        }
         stream = stream->next;
     }
-    
+
 #if 0
     {
         float avg;
         AVCodecContext *enc;
         char buf[1024];
-        
+
         /* feed status */
         stream = first_feed;
         while (stream != NULL) {
@@ -1790,12 +1790,12 @@
                 AVStream *st = stream->streams[i];
                 FeedData *fdata = st->priv_data;
                 enc = st->codec;
-            
+
                 avcodec_string(buf, sizeof(buf), enc);
                 avg = fdata->avg_frame_size * (float)enc->rate * 8.0;
                 if (enc->codec->type == CODEC_TYPE_AUDIO && enc->frame_size > 0)
                     avg /= enc->frame_size;
-                url_fprintf(pb, "<TR><TD>%s <TD> %d <TD> %Ld <TD> %0.1f\n", 
+                url_fprintf(pb, "<TR><TD>%s <TD> %d <TD> %Ld <TD> %0.1f\n",
                              buf, enc->frame_number, fdata->data_count, avg / 1000.0);
             }
             url_fprintf(pb, "</TABLE>\n");
@@ -1836,11 +1836,11 @@
 
         i++;
         p = inet_ntoa(c1->from_addr.sin_addr);
-        url_fprintf(pb, "<TR><TD><B>%d</B><TD>%s%s<TD>%s<TD>%s<TD>%s<td align=right>", 
-                    i, 
-                    c1->stream ? c1->stream->filename : "", 
+        url_fprintf(pb, "<TR><TD><B>%d</B><TD>%s%s<TD>%s<TD>%s<TD>%s<td align=right>",
+                    i,
+                    c1->stream ? c1->stream->filename : "",
                     c1->state == HTTPSTATE_RECEIVE_DATA ? "(input)" : "",
-                    p, 
+                    p,
                     c1->protocol,
                     http_state[c1->state]);
         fmt_bytecount(pb, bitrate);
@@ -1852,7 +1852,7 @@
         c1 = c1->next;
     }
     url_fprintf(pb, "</TABLE>\n");
-    
+
     /* date */
     ti = time(NULL);
     p = ctime(&ti);
@@ -1922,13 +1922,13 @@
 #endif
 
     /* open stream */
-    if (av_open_input_file(&s, input_filename, c->stream->ifmt, 
+    if (av_open_input_file(&s, input_filename, c->stream->ifmt,
                            buf_size, c->stream->ap_in) < 0) {
         http_log("%s not found", input_filename);
         return -1;
     }
     c->fmt_in = s;
-    
+
     /* open each parser */
     for(i=0;i<s->nb_streams;i++)
         open_parser(s, i);
@@ -1937,7 +1937,7 @@
        present) for packet sending */
     c->pts_stream_index = 0;
     for(i=0;i<c->stream->nb_streams;i++) {
-        if (c->pts_stream_index == 0 && 
+        if (c->pts_stream_index == 0 &&
             c->stream->streams[i]->codec->codec_type == CODEC_TYPE_VIDEO) {
             c->pts_stream_index = i;
         }
@@ -1966,7 +1966,7 @@
 static int64_t get_packet_send_clock(HTTPContext *c)
 {
     int bytes_left, bytes_sent, frame_bytes;
-    
+
     frame_bytes = c->cur_frame_bytes;
     if (frame_bytes <= 0) {
         return c->cur_pts;
@@ -1987,13 +1987,13 @@
     switch(c->state) {
     case HTTPSTATE_SEND_DATA_HEADER:
         memset(&c->fmt_ctx, 0, sizeof(c->fmt_ctx));
-        pstrcpy(c->fmt_ctx.author, sizeof(c->fmt_ctx.author), 
+        pstrcpy(c->fmt_ctx.author, sizeof(c->fmt_ctx.author),
                 c->stream->author);
-        pstrcpy(c->fmt_ctx.comment, sizeof(c->fmt_ctx.comment), 
+        pstrcpy(c->fmt_ctx.comment, sizeof(c->fmt_ctx.comment),
                 c->stream->comment);
-        pstrcpy(c->fmt_ctx.copyright, sizeof(c->fmt_ctx.copyright), 
+        pstrcpy(c->fmt_ctx.copyright, sizeof(c->fmt_ctx.copyright),
                 c->stream->copyright);
-        pstrcpy(c->fmt_ctx.title, sizeof(c->fmt_ctx.title), 
+        pstrcpy(c->fmt_ctx.title, sizeof(c->fmt_ctx.title),
                 c->stream->title);
 
         /* open output stream by using specified codecs */
@@ -2006,7 +2006,7 @@
             st->codec= avcodec_alloc_context();
             c->fmt_ctx.streams[i] = st;
             /* if file or feed, then just take streams from FFStream struct */
-            if (!c->stream->feed || 
+            if (!c->stream->feed ||
                 c->stream->feed == c->stream)
                 src = c->stream->streams[i];
             else
@@ -2044,15 +2044,15 @@
         /* find a new packet */
         {
             AVPacket pkt;
-            
+
             /* read a packet from the input stream */
             if (c->stream->feed) {
-                ffm_set_write_index(c->fmt_in, 
+                ffm_set_write_index(c->fmt_in,
                                     c->stream->feed->feed_write_index,
                                     c->stream->feed->feed_size);
             }
 
-            if (c->stream->max_time && 
+            if (c->stream->max_time &&
                 c->stream->max_time + c->start_time - cur_time < 0) {
                 /* We have timed out */
                 c->state = HTTPSTATE_SEND_DATA_TRAILER;
@@ -2105,14 +2105,14 @@
                                 if (pkt.flags & PKT_FLAG_KEY) {
                                     c->got_key_frame |= 1 << i;
                                 }
-                                /* See if we have all the key frames, then 
+                                /* See if we have all the key frames, then
                                  * we start to send. This logic is not quite
-                                 * right, but it works for the case of a 
+                                 * right, but it works for the case of a
                                  * single video stream with one or more
-                                 * audio streams (for which every frame is 
-                                 * typically a key frame). 
+                                 * audio streams (for which every frame is
+                                 * typically a key frame).
                                  */
-                                if (!c->stream->send_on_key || 
+                                if (!c->stream->send_on_key ||
                                     ((c->got_key_frame + 1) >> c->stream->nb_streams)) {
                                     goto send_it;
                                 }
@@ -2120,7 +2120,7 @@
                         }
                     } else {
                         AVCodecContext *codec;
-                        
+
                     send_it:
                         /* specific handling for RTP: we use several
                            output stream (one for each RTP
@@ -2136,9 +2136,9 @@
 #if 0
                             printf("index=%d pts=%0.3f duration=%0.6f\n",
                                    pkt.stream_index,
-                                   (double)c->cur_pts / 
+                                   (double)c->cur_pts /
                                    AV_TIME_BASE,
-                                   (double)c->cur_frame_duration / 
+                                   (double)c->cur_frame_duration /
                                    AV_TIME_BASE);
 #endif
                             /* find RTP context */
@@ -2156,7 +2156,7 @@
                             /* Fudge here */
                             codec = ctx->streams[pkt.stream_index]->codec;
                         }
-                        
+
                         codec->coded_frame->key_frame = ((pkt.flags & PKT_FLAG_KEY) != 0);
                         if (c->is_packetized) {
                             int max_packet_size;
@@ -2175,12 +2175,12 @@
                         if (av_write_frame(ctx, &pkt)) {
                             c->state = HTTPSTATE_SEND_DATA_TRAILER;
                         }
-                        
+
                         len = url_close_dyn_buf(&ctx->pb, &c->pb_buffer);
                         c->cur_frame_bytes = len;
                         c->buffer_ptr = c->pb_buffer;
                         c->buffer_end = c->pb_buffer + len;
-                        
+
                         codec->frame_number++;
                         if (len == 0)
                             goto redo;
@@ -2263,7 +2263,7 @@
                     int interleaved_index, size;
                     uint8_t header[4];
                     HTTPContext *rtsp_c;
-                    
+
                     rtsp_c = c->rtsp_c;
                     /* if no RTSP connection left, error */
                     if (!rtsp_c)
@@ -2292,9 +2292,9 @@
                     rtsp_c->packet_buffer_ptr = c->packet_buffer;
                     rtsp_c->packet_buffer_end = c->packet_buffer + size;
                     c->buffer_ptr += len;
-                    
+
                     /* send everything we can NOW */
-                    len = write(rtsp_c->fd, rtsp_c->packet_buffer_ptr, 
+                    len = write(rtsp_c->fd, rtsp_c->packet_buffer_ptr,
                                 rtsp_c->packet_buffer_end - rtsp_c->packet_buffer_ptr);
                     if (len > 0) {
                         rtsp_c->packet_buffer_ptr += len;
@@ -2312,7 +2312,7 @@
                 } else {
                     /* send RTP packet directly in UDP */
                     c->buffer_ptr += 4;
-                    url_write(c->rtp_handles[c->packet_stream_index], 
+                    url_write(c->rtp_handles[c->packet_stream_index],
                               c->buffer_ptr, len);
                     c->buffer_ptr += len;
                     /* here we continue as we can send several packets per 10 ms slot */
@@ -2357,7 +2357,7 @@
     if (fd < 0)
         return -1;
     c->feed_fd = fd;
-    
+
     c->stream->feed_write_index = ffm_read_write_index(fd);
     c->stream->feed_size = lseek(fd, 0, SEEK_END);
     lseek(fd, 0, SEEK_SET);
@@ -2368,7 +2368,7 @@
     c->stream->feed_opened = 1;
     return 0;
 }
-    
+
 static int http_receive_data(HTTPContext *c)
 {
     HTTPContext *c1;
@@ -2405,12 +2405,12 @@
         /* a packet has been received : write it in the store, except
            if header */
         if (c->data_count > FFM_PACKET_SIZE) {
-            
+
             //            printf("writing pos=0x%Lx size=0x%Lx\n", feed->feed_write_index, feed->feed_size);
             /* XXX: use llseek or url_seek */
             lseek(c->feed_fd, feed->feed_write_index, SEEK_SET);
             write(c->feed_fd, c->buffer, FFM_PACKET_SIZE);
-            
+
             feed->feed_write_index += FFM_PACKET_SIZE;
             /* update file size */
             if (feed->feed_write_index > c->stream->feed_size)
@@ -2425,7 +2425,7 @@
 
             /* wake up any waiting connections */
             for(c1 = first_http_ctx; c1 != NULL; c1 = c1->next) {
-                if (c1->state == HTTPSTATE_WAIT_FEED && 
+                if (c1->state == HTTPSTATE_WAIT_FEED &&
                     c1->stream->feed == c->stream->feed) {
                     c1->state = HTTPSTATE_SEND_DATA;
                 }
@@ -2466,9 +2466,9 @@
                 goto fail;
             }
             for (i = 0; i < s.nb_streams; i++) {
-                memcpy(feed->streams[i]->codec, 
+                memcpy(feed->streams[i]->codec,
                        s.streams[i]->codec, sizeof(AVCodecContext));
-            } 
+            }
             av_freep(&s.priv_data);
         }
         c->buffer_ptr = c->buffer;
@@ -2492,14 +2492,14 @@
     char buf2[32];
 
     switch(error_number) {
-#define DEF(n, c, s) case c: str = s; break; 
+#define DEF(n, c, s) case c: str = s; break;
 #include "rtspcodes.h"
 #undef DEF
     default:
         str = "Unknown Error";
         break;
     }
-     
+
     url_fprintf(c->pb, "RTSP/1.0 %d %s\r\n", error_number, str);
     url_fprintf(c->pb, "CSeq: %d\r\n", c->seq);
 
@@ -2529,10 +2529,10 @@
     ByteIOContext pb1;
     int len;
     RTSPHeader header1, *header = &header1;
-    
+
     c->buffer_ptr[0] = '\0';
     p = c->buffer;
-    
+
     get_word(cmd, sizeof(cmd), &p);
     get_word(url, sizeof(url), &p);
     get_word(protocol, sizeof(protocol), &p);
@@ -2613,17 +2613,17 @@
 
 /* XXX: move that to rtsp.c, but would need to replace FFStream by
    AVFormatContext */
-static int prepare_sdp_description(FFStream *stream, uint8_t **pbuffer, 
+static int prepare_sdp_description(FFStream *stream, uint8_t **pbuffer,
                                    struct in_addr my_ip)
 {
     ByteIOContext pb1, *pb = &pb1;
     int i, payload_type, port, private_payload_type, j;
     const char *ipstr, *title, *mediatype;
     AVStream *st;
-    
+
     if (url_open_dyn_buf(pb) < 0)
         return -1;
-    
+
     /* general media info */
 
     url_fprintf(pb, "v=0\n");
@@ -2667,7 +2667,7 @@
         } else {
             port = 0;
         }
-        url_fprintf(pb, "m=%s %d RTP/AVP %d\n", 
+        url_fprintf(pb, "m=%s %d RTP/AVP %d\n",
                     mediatype, port, payload_type);
         if (payload_type >= RTP_PT_PRIVATE) {
             /* for private payload type, we need to give more info */
@@ -2675,7 +2675,7 @@
             case CODEC_ID_MPEG4:
                 {
                     uint8_t *data;
-                    url_fprintf(pb, "a=rtpmap:%d MP4V-ES/%d\n", 
+                    url_fprintf(pb, "a=rtpmap:%d MP4V-ES/%d\n",
                                 payload_type, 90000);
                     /* we must also add the mpeg4 header */
                     data = st->codec->extradata;
@@ -2719,7 +2719,7 @@
     uint8_t *content;
     int content_length, len;
     struct sockaddr_in my_addr;
-    
+
     /* find which url is asked */
     url_split(NULL, 0, NULL, 0, NULL, 0, NULL, path1, sizeof(path1), url);
     path = path1;
@@ -2781,7 +2781,7 @@
     return NULL;
 }
 
-static void rtsp_cmd_setup(HTTPContext *c, const char *url, 
+static void rtsp_cmd_setup(HTTPContext *c, const char *url,
                            RTSPHeader *h)
 {
     FFStream *stream;
@@ -2793,7 +2793,7 @@
     RTSPTransportField *th;
     struct sockaddr_in dest_addr;
     RTSPActionServerSetup setup;
-    
+
     /* find which url is asked */
     url_split(NULL, 0, NULL, 0, NULL, 0, NULL, path1, sizeof(path1), url);
     path = path1;
@@ -2812,10 +2812,10 @@
                 stream_index = 0;
                 goto found;
             }
-                
+
             for(stream_index = 0; stream_index < stream->nb_streams;
                 stream_index++) {
-                snprintf(buf, sizeof(buf), "%s/streamid=%d", 
+                snprintf(buf, sizeof(buf), "%s/streamid=%d",
                          stream->filename, stream_index);
                 if (!strcmp(path, buf))
                     goto found;
@@ -2829,7 +2829,7 @@
 
     /* generate session id if needed */
     if (h->session_id[0] == '\0') {
-        snprintf(h->session_id, sizeof(h->session_id), 
+        snprintf(h->session_id, sizeof(h->session_id),
                  "%08x%08x", (int)random(), (int)random());
     }
 
@@ -2859,14 +2859,14 @@
             return;
         }
     }
-    
+
     /* test if stream is OK (test needed because several SETUP needs
        to be done for a given file) */
     if (rtp_c->stream != stream) {
         rtsp_reply_error(c, RTSP_STATUS_SERVICE);
         return;
     }
-    
+
     /* test if stream is already set up */
     if (rtp_c->rtp_ctx[stream_index]) {
         rtsp_reply_error(c, RTSP_STATUS_STATE);
@@ -2875,7 +2875,7 @@
 
     /* check transport */
     th = find_transport(h, rtp_c->rtp_protocol);
-    if (!th || (th->protocol == RTSP_PROTOCOL_RTP_UDP && 
+    if (!th || (th->protocol == RTSP_PROTOCOL_RTP_UDP &&
                 th->client_port_min <= 0)) {
         rtsp_reply_error(c, RTSP_STATUS_TRANSPORT);
         return;
@@ -2885,11 +2885,11 @@
     setup.transport_option[0] = '\0';
     dest_addr = rtp_c->from_addr;
     dest_addr.sin_port = htons(th->client_port_min);
-    
+
     /* add transport option if needed */
     if (ff_rtsp_callback) {
         setup.ipaddr = ntohl(dest_addr.sin_addr.s_addr);
-        if (ff_rtsp_callback(RTSP_ACTION_SERVER_SETUP, rtp_c->session_id, 
+        if (ff_rtsp_callback(RTSP_ACTION_SERVER_SETUP, rtp_c->session_id,
                              (char *)&setup, sizeof(setup),
                              stream->rtsp_option) < 0) {
             rtsp_reply_error(c, RTSP_STATUS_TRANSPORT);
@@ -2897,7 +2897,7 @@
         }
         dest_addr.sin_addr.s_addr = htonl(setup.ipaddr);
     }
-    
+
     /* setup stream */
     if (rtp_new_av_stream(rtp_c, stream_index, &dest_addr, c) < 0) {
         rtsp_reply_error(c, RTSP_STATUS_TRANSPORT);
@@ -2928,7 +2928,7 @@
         url_fprintf(c->pb, ";%s", setup.transport_option);
     }
     url_fprintf(c->pb, "\r\n");
-    
+
 
     url_fprintf(c->pb, "\r\n");
 }
@@ -2936,7 +2936,7 @@
 
 /* find an rtp connection by using the session ID. Check consistency
    with filename */
-static HTTPContext *find_rtp_session_with_url(const char *url, 
+static HTTPContext *find_rtp_session_with_url(const char *url,
                                               const char *session_id)
 {
     HTTPContext *rtp_c;
@@ -2975,7 +2975,7 @@
         rtsp_reply_error(c, RTSP_STATUS_SESSION);
         return;
     }
-    
+
     if (rtp_c->state != HTTPSTATE_SEND_DATA &&
         rtp_c->state != HTTPSTATE_WAIT_FEED &&
         rtp_c->state != HTTPSTATE_READY) {
@@ -2992,7 +2992,7 @@
 #endif
 
     rtp_c->state = HTTPSTATE_SEND_DATA;
-    
+
     /* now everything is OK, so we can send the connection parameters */
     rtsp_reply_header(c, RTSP_STATUS_OK);
     /* session ID */
@@ -3009,13 +3009,13 @@
         rtsp_reply_error(c, RTSP_STATUS_SESSION);
         return;
     }
-    
+
     if (rtp_c->state != HTTPSTATE_SEND_DATA &&
         rtp_c->state != HTTPSTATE_WAIT_FEED) {
         rtsp_reply_error(c, RTSP_STATUS_STATE);
         return;
     }
-    
+
     rtp_c->state = HTTPSTATE_READY;
     rtp_c->first_pts = AV_NOPTS_VALUE;
     /* now everything is OK, so we can send the connection parameters */
@@ -3034,12 +3034,12 @@
         rtsp_reply_error(c, RTSP_STATUS_SESSION);
         return;
     }
-    
+
     /* abort the session */
     close_connection(rtp_c);
 
     if (ff_rtsp_callback) {
-        ff_rtsp_callback(RTSP_ACTION_SERVER_TEARDOWN, rtp_c->session_id, 
+        ff_rtsp_callback(RTSP_ACTION_SERVER_TEARDOWN, rtp_c->session_id,
                          NULL, 0,
                          rtp_c->stream->rtsp_option);
     }
@@ -3055,23 +3055,23 @@
 /********************************************************************/
 /* RTP handling */
 
-static HTTPContext *rtp_new_connection(struct sockaddr_in *from_addr, 
+static HTTPContext *rtp_new_connection(struct sockaddr_in *from_addr,
                                        FFStream *stream, const char *session_id,
                                        enum RTSPProtocol rtp_protocol)
 {
     HTTPContext *c = NULL;
     const char *proto_str;
-    
+
     /* XXX: should output a warning page when coming
        close to the connection limit */
     if (nb_connections >= nb_max_connections)
         goto fail;
-    
+
     /* add a new connection */
     c = av_mallocz(sizeof(HTTPContext));
     if (!c)
         goto fail;
-    
+
     c->fd = -1;
     c->poll_entry = NULL;
     c->from_addr = *from_addr;
@@ -3109,7 +3109,7 @@
     c->next = first_http_ctx;
     first_http_ctx = c;
     return c;
-        
+
  fail:
     if (c) {
         av_free(c->buffer);
@@ -3121,7 +3121,7 @@
 /* add a new RTP stream in an RTP connection (used in RTSP SETUP
    command). If RTP/TCP protocol is used, TCP connection 'rtsp_c' is
    used. */
-static int rtp_new_av_stream(HTTPContext *c, 
+static int rtp_new_av_stream(HTTPContext *c,
                              int stream_index, struct sockaddr_in *dest_addr,
                              HTTPContext *rtsp_c)
 {
@@ -3132,7 +3132,7 @@
     uint8_t *dummy_buf;
     char buf2[32];
     int max_packet_size;
-    
+
     /* now we can open the relevant output stream */
     ctx = av_alloc_format_context();
     if (!ctx)
@@ -3146,15 +3146,15 @@
     ctx->nb_streams = 1;
     ctx->streams[0] = st;
 
-    if (!c->stream->feed || 
+    if (!c->stream->feed ||
         c->stream->feed == c->stream) {
         memcpy(st, c->stream->streams[stream_index], sizeof(AVStream));
     } else {
-        memcpy(st, 
+        memcpy(st,
                c->stream->feed->streams[c->stream->feed_streams[stream_index]],
                sizeof(AVStream));
     }
-    
+
     /* build destination RTP address */
     ipaddr = inet_ntoa(dest_addr->sin_addr);
 
@@ -3162,7 +3162,7 @@
     case RTSP_PROTOCOL_RTP_UDP:
     case RTSP_PROTOCOL_RTP_UDP_MULTICAST:
         /* RTP/UDP case */
-        
+
         /* XXX: also pass as parameter to function ? */
         if (c->stream->is_multicast) {
             int ttl;
@@ -3170,7 +3170,7 @@
             if (!ttl)
                 ttl = 16;
             snprintf(ctx->filename, sizeof(ctx->filename),
-                     "rtp://%s:%d?multicast=1&ttl=%d", 
+                     "rtp://%s:%d?multicast=1&ttl=%d",
                      ipaddr, ntohs(dest_addr->sin_port), ttl);
         } else {
             snprintf(ctx->filename, sizeof(ctx->filename),
@@ -3192,8 +3192,8 @@
     }
 
     http_log("%s:%d - - [%s] \"PLAY %s/streamid=%d %s\"\n",
-             ipaddr, ntohs(dest_addr->sin_port), 
-             ctime1(buf2), 
+             ipaddr, ntohs(dest_addr->sin_port),
+             ctime1(buf2),
              c->stream->filename, stream_index, c->protocol);
 
     /* normally, no packets should be output here, but the packet size may be checked */
@@ -3211,7 +3211,7 @@
     }
     url_close_dyn_buf(&ctx->pb, &dummy_buf);
     av_free(dummy_buf);
-    
+
     c->rtp_ctx[stream_index] = ctx;
     return 0;
 }
@@ -3270,7 +3270,7 @@
             }
         }
     }
-    
+
     fst = add_av_stream1(feed, av);
     if (!fst)
         return -1;
@@ -3324,7 +3324,7 @@
             p = pkt.data;
             while (p < pkt.data + pkt.size - 4) {
                 /* stop when vop header is found */
-                if (p[0] == 0x00 && p[1] == 0x00 && 
+                if (p[0] == 0x00 && p[1] == 0x00 &&
                     p[2] == 0x01 && p[3] == 0xb6) {
                     size = p - pkt.data;
                     //                    av_hex_dump(pkt.data, size);
@@ -3363,8 +3363,8 @@
                 stream->ap_in->mpeg2ts_raw = 1;
                 stream->ap_in->mpeg2ts_compute_pcr = 1;
             }
-            
-            if (av_open_input_file(&infile, stream->feed_filename, 
+
+            if (av_open_input_file(&infile, stream->feed_filename,
                                    stream->ifmt, 0, stream->ap_in) < 0) {
                 http_log("%s not found", stream->feed_filename);
                 /* remove stream (no need to spend more time on it) */
@@ -3374,7 +3374,7 @@
                 /* find all the AVStreams inside and reference them in
                    'stream' */
                 if (av_find_stream_info(infile) < 0) {
-                    http_log("Could not find codec parameters from '%s'", 
+                    http_log("Could not find codec parameters from '%s'",
                              stream->feed_filename);
                     av_close_input_file(infile);
                     goto fail;
@@ -3441,7 +3441,7 @@
 
                         if (sf->index != ss->index ||
                             sf->id != ss->id) {
-                            printf("Index & Id do not match for stream %d (%s)\n", 
+                            printf("Index & Id do not match for stream %d (%s)\n",
                                    i, feed->feed_filename);
                             matches = 0;
                         } else {
@@ -3551,7 +3551,7 @@
 {
     int bandwidth, i;
     FFStream *stream;
-    
+
     for(stream = first_stream; stream != NULL; stream = stream->next) {
         bandwidth = 0;
         for(i=0;i<stream->nb_streams;i++) {
@@ -3639,7 +3639,7 @@
         av->qcompress = 0.5;
         av->qblur = 0.5;
 
-        if (!av->nsse_weight) 
+        if (!av->nsse_weight)
             av->nsse_weight = 8;
 
         av->frame_skip_cmp = FF_CMP_DCTMAX;
@@ -3722,10 +3722,10 @@
                 filename, dlerror());
         return;
     }
-    
+
     init_func = dlsym(dll, "ffserver_module_init");
     if (!init_func) {
-        fprintf(stderr, 
+        fprintf(stderr,
                 "%s: init function 'ffserver_module_init()' not found\n",
                 filename);
         dlclose(dll);
@@ -3753,7 +3753,7 @@
         perror(filename);
         return -1;
     }
-    
+
     errors = 0;
     line_num = 0;
     first_stream = NULL;
@@ -3770,20 +3770,20 @@
             break;
         line_num++;
         p = line;
-        while (isspace(*p)) 
+        while (isspace(*p))
             p++;
         if (*p == '\0' || *p == '#')
             continue;
 
         get_arg(cmd, sizeof(cmd), &p);
-        
+
         if (!strcasecmp(cmd, "Port")) {
             get_arg(arg, sizeof(arg), &p);
             my_http_addr.sin_port = htons (atoi(arg));
         } else if (!strcasecmp(cmd, "BindAddress")) {
             get_arg(arg, sizeof(arg), &p);
             if (!inet_aton(arg, &my_http_addr.sin_addr)) {
-                fprintf(stderr, "%s:%d: Invalid IP address: %s\n", 
+                fprintf(stderr, "%s:%d: Invalid IP address: %s\n",
                         filename, line_num, arg);
                 errors++;
             }
@@ -3795,7 +3795,7 @@
         } else if (!strcasecmp(cmd, "RTSPBindAddress")) {
             get_arg(arg, sizeof(arg), &p);
             if (!inet_aton(arg, &my_rtsp_addr.sin_addr)) {
-                fprintf(stderr, "%s:%d: Invalid IP address: %s\n", 
+                fprintf(stderr, "%s:%d: Invalid IP address: %s\n",
                         filename, line_num, arg);
                 errors++;
             }
@@ -3803,7 +3803,7 @@
             get_arg(arg, sizeof(arg), &p);
             val = atoi(arg);
             if (val < 1 || val > HTTP_MAX_CONNECTIONS) {
-                fprintf(stderr, "%s:%d: Invalid MaxClients: %s\n", 
+                fprintf(stderr, "%s:%d: Invalid MaxClients: %s\n",
                         filename, line_num, arg);
                 errors++;
             } else {
@@ -3813,7 +3813,7 @@
             get_arg(arg, sizeof(arg), &p);
             val = atoi(arg);
             if (val < 10 || val > 100000) {
-                fprintf(stderr, "%s:%d: Invalid MaxBandwidth: %s\n", 
+                fprintf(stderr, "%s:%d: Invalid MaxBandwidth: %s\n",
                         filename, line_num, arg);
                 errors++;
             } else {
@@ -3836,7 +3836,7 @@
                 /* add in feed list */
                 *last_feed = feed;
                 last_feed = &feed->next_feed;
-                
+
                 get_arg(feed->filename, sizeof(feed->filename), &p);
                 q = strrchr(feed->filename, '>');
                 if (*q)
@@ -3869,11 +3869,11 @@
                 feed->child_argv[i] = av_malloc(30 + strlen(feed->filename));
 
 		snprintf(feed->child_argv[i], 30+strlen(feed->filename),
-		    "http://%s:%d/%s", 
+		    "http://%s:%d/%s",
             	    (my_http_addr.sin_addr.s_addr == INADDR_ANY) ? "127.0.0.1" :
 		    inet_ntoa(my_http_addr.sin_addr),
 		    ntohs(my_http_addr.sin_port), feed->filename);
-		
+
 		if (ffserver_debug)
 		{
 		    int j;
@@ -3925,7 +3925,7 @@
 #if 0
             } else {
                 /* Make sure that we start out clean */
-                if (unlink(feed->feed_filename) < 0 
+                if (unlink(feed->feed_filename) < 0
                     && errno != ENOENT) {
                     fprintf(stderr, "%s:%d: Unable to clean old feed file '%s': %s\n",
                         filename, line_num, feed->feed_filename, strerror(errno));
@@ -3964,7 +3964,7 @@
             get_arg(arg, sizeof(arg), &p);
             if (stream) {
                 FFStream *sfeed;
-                
+
                 sfeed = first_feed;
                 while (sfeed != NULL) {
                     if (!strcmp(sfeed->filename, arg))
@@ -3990,7 +3990,7 @@
                     strcpy(arg, "mjpeg");
                 stream->fmt = guess_stream_format(arg, NULL, NULL);
                 if (!stream->fmt) {
-                    fprintf(stderr, "%s:%d: Unknown Format: %s\n", 
+                    fprintf(stderr, "%s:%d: Unknown Format: %s\n",
                             filename, line_num, arg);
                     errors++;
                 }
@@ -4002,14 +4002,14 @@
         } else if (!strcasecmp(cmd, "InputFormat")) {
             stream->ifmt = av_find_input_format(arg);
             if (!stream->ifmt) {
-                fprintf(stderr, "%s:%d: Unknown input format: %s\n", 
+                fprintf(stderr, "%s:%d: Unknown input format: %s\n",
                         filename, line_num, arg);
             }
         } else if (!strcasecmp(cmd, "FaviconURL")) {
             if (stream && stream->stream_type == STREAM_TYPE_STATUS) {
                 get_arg(stream->feed_filename, sizeof(stream->feed_filename), &p);
             } else {
-                fprintf(stderr, "%s:%d: FaviconURL only permitted for status streams\n", 
+                fprintf(stderr, "%s:%d: FaviconURL only permitted for status streams\n",
                             filename, line_num);
                 errors++;
             }
@@ -4042,7 +4042,7 @@
             get_arg(arg, sizeof(arg), &p);
             audio_id = opt_audio_codec(arg);
             if (audio_id == CODEC_ID_NONE) {
-                fprintf(stderr, "%s:%d: Unknown AudioCodec: %s\n", 
+                fprintf(stderr, "%s:%d: Unknown AudioCodec: %s\n",
                         filename, line_num, arg);
                 errors++;
             }
@@ -4050,7 +4050,7 @@
             get_arg(arg, sizeof(arg), &p);
             video_id = opt_video_codec(arg);
             if (video_id == CODEC_ID_NONE) {
-                fprintf(stderr, "%s:%d: Unknown VideoCodec: %s\n", 
+                fprintf(stderr, "%s:%d: Unknown VideoCodec: %s\n",
                         filename, line_num, arg);
                 errors++;
             }
@@ -4089,7 +4089,7 @@
                     video_enc.rc_min_rate = minrate * 1000;
                     video_enc.rc_max_rate = maxrate * 1000;
                 } else {
-                    fprintf(stderr, "%s:%d: Incorrect format for VideoBitRateRange -- should be <min>-<max>: %s\n", 
+                    fprintf(stderr, "%s:%d: Incorrect format for VideoBitRateRange -- should be <min>-<max>: %s\n",
                             filename, line_num, arg);
                     errors++;
                 }
@@ -4288,7 +4288,7 @@
             get_arg(arg, sizeof(arg), &p);
             if (stream) {
                 if (!inet_aton(arg, &stream->multicast_ip)) {
-                    fprintf(stderr, "%s:%d: Invalid IP address: %s\n", 
+                    fprintf(stderr, "%s:%d: Invalid IP address: %s\n",
                             filename, line_num, arg);
                     errors++;
                 }
@@ -4367,12 +4367,12 @@
 #ifdef CONFIG_HAVE_DLOPEN
             load_module(arg);
 #else
-            fprintf(stderr, "%s:%d: Module support not compiled into this version: '%s'\n", 
+            fprintf(stderr, "%s:%d: Module support not compiled into this version: '%s'\n",
                     filename, line_num, arg);
             errors++;
 #endif
         } else {
-            fprintf(stderr, "%s:%d: Incorrect keyword: '%s'\n", 
+            fprintf(stderr, "%s:%d: Incorrect keyword: '%s'\n",
                     filename, line_num, cmd);
             errors++;
         }
@@ -4459,7 +4459,7 @@
                 if (uptime < 30) {
                     /* Turn off any more restarts */
                     feed->child_argv = 0;
-                }    
+                }
             }
         }
     }
@@ -4480,7 +4480,7 @@
     my_program_name = argv[0];
     my_program_dir = getcwd(0, 0);
     ffserver_daemon = 1;
-    
+
     for(;;) {
         c = getopt(argc, argv, "ndLh?f:");
         if (c == -1)
@@ -4521,7 +4521,7 @@
     my_rtsp_addr.sin_family = AF_INET;
     my_rtsp_addr.sin_port = htons (5454);
     my_rtsp_addr.sin_addr.s_addr = htonl (INADDR_ANY);
-    
+
     nb_max_connections = 5;
     max_bandwidth = 1000;
     first_stream = NULL;

Index: output_example.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/output_example.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- output_example.c	21 Aug 2005 22:31:01 -0000	1.17
+++ output_example.c	17 Dec 2005 18:14:26 -0000	1.18
@@ -1,26 +1,26 @@
 /*
  * Libavformat API example: Output a media file in any supported
  * libavformat format. The default codecs are used.
- * 
+ *
  * Copyright (c) 2003 Fabrice Bellard
- * 
+ *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
  * in the Software without restriction, including without limitation the rights
  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  * copies of the Software, and to permit persons to whom the Software is
  * furnished to do so, subject to the following conditions:
- * 
+ *
  * The above copyright notice and this permission notice shall be included in
  * all copies or substantial portions of the Software.
- * 
+ *
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.  
+ * THE SOFTWARE.
  */
 #include <stdlib.h>
 #include <stdio.h>
@@ -48,7 +48,7 @@
 int audio_outbuf_size;
 int audio_input_frame_size;
 
-/* 
+/*
  * add an audio output stream
  */
 AVStream *add_audio_stream(AVFormatContext *oc, int codec_id)
@@ -144,7 +144,7 @@
     AVCodecContext *c;
     AVPacket pkt;
     av_init_packet(&pkt);
-    
+
     c = st->codec;
 
     get_audio_frame(samples, audio_input_frame_size, c->channels);
@@ -166,7 +166,7 @@
 void close_audio(AVFormatContext *oc, AVStream *st)
 {
     avcodec_close(st->codec);
-    
+
     av_free(samples);
     av_free(audio_outbuf);
 }
@@ -189,7 +189,7 @@
         fprintf(stderr, "Could not alloc stream\n");
         exit(1);
     }
-    
+
     c = st->codec;
     c->codec_id = codec_id;
     c->codec_type = CODEC_TYPE_VIDEO;
@@ -197,13 +197,13 @@
     /* put sample parameters */
     c->bit_rate = 400000;
     /* resolution must be a multiple of two */
-    c->width = 352;  
+    c->width = 352;
     c->height = 288;
     /* time base: this is the fundamental unit of time (in seconds) in terms
        of which frame timestamps are represented. for fixed-fps content,
        timebase should be 1/framerate and timestamp increments should be
        identically 1. */
-    c->time_base.den = STREAM_FRAME_RATE;  
+    c->time_base.den = STREAM_FRAME_RATE;
     c->time_base.num = 1;
     c->gop_size = 12; /* emit one intra frame every twelve frames at most */
     c->pix_fmt = STREAM_PIX_FMT;
@@ -212,15 +212,15 @@
         c->max_b_frames = 2;
     }
     if (c->codec_id == CODEC_ID_MPEG1VIDEO){
-        /* needed to avoid using macroblocks in which some coeffs overflow 
-           this doesnt happen with normal video, it just happens here as the 
+        /* needed to avoid using macroblocks in which some coeffs overflow
+           this doesnt happen with normal video, it just happens here as the
            motion of the chroma plane doesnt match the luma plane */
         c->mb_decision=2;
     }
     // some formats want stream headers to be seperate
     if(!strcmp(oc->oformat->name, "mp4") || !strcmp(oc->oformat->name, "mov") || !strcmp(oc->oformat->name, "3gp"))
         c->flags |= CODEC_FLAG_GLOBAL_HEADER;
-    
+
     return st;
 }
 
@@ -229,7 +229,7 @@
     AVFrame *picture;
     uint8_t *picture_buf;
     int size;
-    
+
     picture = avcodec_alloc_frame();
     if (!picture)
         return NULL;
@@ -239,11 +239,11 @@
         av_free(picture);
         return NULL;
     }
-    avpicture_fill((AVPicture *)picture, picture_buf, 
+    avpicture_fill((AVPicture *)picture, picture_buf,
                    pix_fmt, width, height);
     return picture;
 }
-    
+
 void open_video(AVFormatContext *oc, AVStream *st)
 {
     AVCodec *codec;
@@ -305,7 +305,7 @@
             pict->data[0][y * pict->linesize[0] + x] = x + y + i * 3;
         }
     }
-    
+
     /* Cb and Cr */
     for(y=0;y<height/2;y++) {
         for(x=0;x<width/2;x++) {
@@ -319,9 +319,9 @@
 {
     int out_size, ret;
     AVCodecContext *c;
-    
+
     c = st->codec;
-    
+
     if (frame_count >= STREAM_NB_FRAMES) {
         /* no more frame to compress. The codec has a latency of a few
            frames if using B frames, so we get the last frames by
@@ -331,7 +331,7 @@
             /* as we only generate a YUV420P picture, we must convert it
                to the codec pixel format if needed */
             fill_yuv_image(tmp_picture, frame_count, c->width, c->height);
-            img_convert((AVPicture *)picture, c->pix_fmt, 
+            img_convert((AVPicture *)picture, c->pix_fmt,
                         (AVPicture *)tmp_picture, PIX_FMT_YUV420P,
                         c->width, c->height);
         } else {
@@ -339,18 +339,18 @@
         }
     }
 
-    
+
     if (oc->oformat->flags & AVFMT_RAWPICTURE) {
         /* raw video case. The API will change slightly in the near
            futur for that */
         AVPacket pkt;
         av_init_packet(&pkt);
-        
+
         pkt.flags |= PKT_FLAG_KEY;
         pkt.stream_index= st->index;
         pkt.data= (uint8_t *)picture;
         pkt.size= sizeof(AVPicture);
-        
+
         ret = av_write_frame(oc, &pkt);
     } else {
         /* encode the image */
@@ -359,14 +359,14 @@
         if (out_size > 0) {
             AVPacket pkt;
             av_init_packet(&pkt);
-            
+
             pkt.pts= av_rescale_q(c->coded_frame->pts, c->time_base, st->time_base);
             if(c->coded_frame->key_frame)
                 pkt.flags |= PKT_FLAG_KEY;
             pkt.stream_index= st->index;
             pkt.data= video_outbuf;
             pkt.size= out_size;
-            
+
             /* write the compressed frame in the media file */
             ret = av_write_frame(oc, &pkt);
         } else {
@@ -406,7 +406,7 @@
 
     /* initialize libavcodec, and register all codecs and formats */
     av_register_all();
-    
+
     if (argc != 2) {
         printf("usage: %s output_file\n"
                "API example program to output a media file with libavformat.\n"
@@ -415,7 +415,7 @@
                "\n", argv[0]);
         exit(1);
     }
-    
+
     filename = argv[1];
 
     /* auto detect the output format from the name. default is
@@ -429,7 +429,7 @@
         fprintf(stderr, "Could not find suitable output format\n");
         exit(1);
     }
-    
+
     /* allocate the output media context */
     oc = av_alloc_format_context();
     if (!oc) {
@@ -473,26 +473,26 @@
             exit(1);
         }
     }
-    
+
     /* write the stream header, if any */
     av_write_header(oc);
-    
+
     for(;;) {
         /* compute current audio and video time */
         if (audio_st)
             audio_pts = (double)audio_st->pts.val * audio_st->time_base.num / audio_st->time_base.den;
         else
             audio_pts = 0.0;
-        
+
         if (video_st)
             video_pts = (double)video_st->pts.val * video_st->time_base.num / video_st->time_base.den;
         else
             video_pts = 0.0;
 
-        if ((!audio_st || audio_pts >= STREAM_DURATION) && 
+        if ((!audio_st || audio_pts >= STREAM_DURATION) &&
             (!video_st || video_pts >= STREAM_DURATION))
             break;
-        
+
         /* write interleaved audio and video frames */
         if (!video_st || (video_st && audio_st && audio_pts < video_pts)) {
             write_audio_frame(oc, audio_st);
@@ -509,7 +509,7 @@
 
     /* write the trailer, if any */
     av_write_trailer(oc);
-    
+
     /* free the streams */
     for(i = 0; i < oc->nb_streams; i++) {
         av_freep(&oc->streams[i]);

Index: pktdumper.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/pktdumper.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- pktdumper.c	7 Apr 2005 16:52:28 -0000	1.3
+++ pktdumper.c	17 Dec 2005 18:14:26 -0000	1.4
@@ -29,7 +29,7 @@
     int dontquit = 0;
     int nowrite = 0;
     int err;
-    
+
     if ((argc > 1) && !strncmp(argv[1], "-", 1)) {
         if (strchr(argv[1], 'w'))
             dontquit = 1;
@@ -57,24 +57,24 @@
     }
     strcat(fntemplate, PKTFILESUFF);
     printf("FNTEMPLATE: '%s'\n", fntemplate);
-    
+
     // register all file formats
     av_register_all();
-    
+
     err = av_open_input_file(&fctx, argv[1], NULL, 0, NULL);
     if (err < 0) {
         fprintf(stderr, "av_open_input_file: error %d\n", err);
         return 1;
     }
-    
+
     err = av_find_stream_info(fctx);
     if (err < 0) {
         fprintf(stderr, "av_find_stream_info: error %d\n", err);
         return 1;
     }
-    
+
     av_init_packet(&pkt);
-    
+
     while ((err = av_read_frame(fctx, &pkt)) >= 0) {
         int fd;
         snprintf(pktfilename, PATH_MAX-1, fntemplate, pktnum, pkt.stream_index, pkt.pts, pkt.size, (pkt.flags & PKT_FLAG_KEY)?'K':'_');
@@ -89,9 +89,9 @@
         if (maxpkts && (pktnum >= maxpkts))
             break;
     }
-    
+
     while (dontquit)
         sleep(60);
-    
+
     return 0;
 }

Index: xvmc_render.h
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/xvmc_render.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- xvmc_render.h	26 Jul 2003 01:34:32 -0000	1.1
+++ xvmc_render.h	17 Dec 2005 18:14:26 -0000	1.2
@@ -35,13 +35,13 @@
 
   unsigned int picture_structure;//top/bottom fields or frame  !
   unsigned int flags;//XVMC_SECOND_FIELD - 1'st or 2'd field in the sequence
-  unsigned int display_flags; //1,2 or 1+2 fields for XvMCPutSurface, 
+  unsigned int display_flags; //1,2 or 1+2 fields for XvMCPutSurface,
 
 //these are internal communication one
   int state;//0-free,1 Waiting to Display,2 Waiting for prediction
   int start_mv_blocks_num;//offset in the array for the current slice,updated by vo
   int filled_mv_blocks_num;//processed mv block in this slice,change by decoder
-  
+
   int next_free_data_block_num;//used in add_mv_block, pointer to next free block
 
 } xvmc_render_state_t;





More information about the ffmpeg-cvslog mailing list