Compile with -Wsuggest-attribute=malloc. We already employ this attribute extensively to help the compiler improve optimization. However, a few malloc-like functions were not yet marked with __malloc. Fix that and enable the warning to make sure that new malloc-like functions get marked. Since not all supported compilers know about this warning option, we need to check at compile time whether the option is supported. Thanks to the existing cc-option make(1) function, this is a simple one-liner for Makefile.real.
Shorten copyright notice. The GPLv2 line does not add any additional information, so drop it. This leaves a single line of legalese text for most files, which is about the amount of screen real estate it deserves. This patch was created with the following script (plus some manual fixups): awk '{ if (NR <= 5) { gs = gensub(/.*Copyright.* ([0-9]+).*Andre Noll.*/, "\\1", "g") if (gs != $0) year = gs next } if (NR == 6 && year != "") printf("/* Copyright (C) %s Andre Noll <maan@tuebingen.mpg.de>, see file COPYING. */\n", year) print }'
ogg: Abstract out custom header code. The ogg/vorbis audio format handler employs the callback mechanism of oac_get_file_info() to replace the metadata packet of an ogg/vorbis stream by a fixed sized dummy packet. The same approach should also be used for the ogg/opus audio format handler because ogg/opus metadata can be arbitrary large too. As a preparation for modifying the ogg/opus audio format handler to skip the metadata header in this way, this commit makes the infrastructure available to all audio format handlers which employ the ogg container format by providing a public interface in ogg_afh_common.c. The central data structure is struct oac_custom_header, which replaces the former vorbis_get_header_data structure. The layout of the new structure is only known to ogg_afh_common.c. Users of this API need to call the accessor functions declared in ogg_afh_common.h. Only the ogg/vorbis audio format handler is converted to the new API. A subsequent patch will make the ogg/opus audio format handler the second user.
Prefix public functions of ogg_afh_common.c with "oac". This way it is clear that these are not functions provided by libogg. Pure rename. no real changes.
The ogg/opus tagger. This adds support for modifying meta tags of ogg/opus files. The heart of this patch is ogg_rewrite_tags(), a codec-independent function which replaces the meta packet of an ogg stream. This function will also be used in subsequent patches which add support for ogg/vorbis and ogg/speex files. In order to create identically sized ogg pages for the output, the new ogg_rewrite_tags() function calls ogg_stream_flush_fill() if it is available. This function was introduced in libogg version 1.3.0. So this commit adds a configure check and makes ogg_rewrite_tags() fall back to ogg_stream_flush() on systems where libogg lacks ogg_stream_flush_fill().
ogg: Improve documentation of struct ogg_afh_callback_info. Explain how the possible return values from the callback handler relate to the header chunk. Also avoid to speak about vorbis and speex, as the callbacks are also used by the opus audio format handler and could in theory be used by any codec.
Update year in copyright headers. Done with files=$(git grep -l 'Copyright (C) [0-9]\{4\}\(-2014\)* Andre Noll') sed --in-place= -e 's/Copyright (C) \([0-9]\{4\}\)-2014 Andre Noll/Copyright (C) \1 Andre Noll/1' $files In previous years we ran a similar script to set the second year in the range to the current year. This is kind of silly, so let's get rid of this useless information. This commit replaces "Copyright (C) A-B" by "Copyright (C) A" in all file headers, i.e. only the first year (A) is left in. Accurate information including time stamps for each change can be obtained from the git history.
doc: Change email address to maan@tuebingen.mpg.de The mail server on systemlinux.org was down for more than a week lately, so let's use an alternative official address. This commit changes all maan@systemlinux.org addresses to maan@tuebingen.mpg.de. Most .c and .h files contain the email address in the copyright header, so they must all be patched. Three other files contain the address for a different reason: * README lists email and git, gitweb and home page URLs * configure.ac needs it for configure -h * version.c contains it for the -V option of all commands
Change copyright year to 2014. This year, we're really on time. The changes in this patch were created by the following silly script: files=$(git grep -l 'Copyright (C) [0-9]\{4\}\(-2013\)* Andre Noll') sed --in-place= -e 's/Copyright (C) \([0-9]\{4\}\)-2013 Andre Noll/Copyright (C) \1-2014 Andre Noll/1' $files sed --in-place= -e 's/Copyright (C) 2013 Andre Noll/Copyright (C) 2013-2014 Andre Noll/1' $files
Change copyright year to 2013. Better late than never.
Change year in copyright message to 2012.
Introduce get_header() for ogg/vorbis. Define the get_header() method for the ogg vorbis audio format handler which replaces ogg packet #2 by a dummy packet which contains no meta data. We call ogg_get_file_info() with afhi == NULL which only passes the first three ogg packets to the given callback but does not compute the chunk table. Ogg packet #1 and #3 are copied unmodified into the header.
Replace 2010 in copyright message by 2011.
ogg: Separate ogg from vorbis code. This moves vorbis-independent code from ogg_afh.c to the new file ogg_afh_common.c so that it can be used also for the speex audio format handler that is added by subsequent patches. The patch introduces a generic callback structure which contains a function pointer used to call back into the vorbis code once for each of the three ogg packets of the audio file header.