[FFmpeg-devel] [PATCH] Add writing of vorbis comments to flac files

Diego Biurrun diego
Wed Oct 21 14:37:47 CEST 2009


On Wed, Oct 21, 2009 at 04:03:37AM +0200, James Darnley wrote:
> Updated patch attached for review.
> 
> --- libavformat/oggdec.c	(revision 20337)
> +++ libavformat/oggdec.c	(working copy)
> @@ -33,6 +33,7 @@
>  #include "avformat.h"
> +#include "vorbiscomment.h"

Why is this necessary?

> --- libavformat/flacenc.c	(revision 20337)
> +++ libavformat/flacenc.c	(working copy)
> @@ -22,15 +22,19 @@
> +    put_byte(pb, last_block?0x81:0x01);

Spaces around operators would make this more readable.

> +    while(n_padding_bytes>0) {

same here

> +int flac_write_block_comment(ByteIOContext *pb, AVMetadata *m, int last_block, int bitexact)

unnecessarily long line

> --- libavformat/vorbiscomment.c	(revision 0)
> +++ libavformat/vorbiscomment.c	(revision 0)
> @@ -0,0 +1,70 @@
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with FFmpeg; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
> + */
> +#include "avformat.h"
> +#include "metadata.h"
> +#include "vorbiscomment.h"
> +#include "libavcodec/bytestream.h"

nit: Add an empty line before the #includes.

> +        for (i=0; i<m->count; i++)
> +        for (i=0; i<m->count; i++) {

Spaces around operators would make this more readable.

> --- libavformat/vorbiscomment.h	(revision 0)
> +++ libavformat/vorbiscomment.h	(revision 0)
> @@ -0,0 +1,35 @@
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with FFmpeg; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
> + */
> +#ifndef AVFORMAT_VORBISCOMMENT_H
> +#define AVFORMAT_VORBISCOMMENT_H

see above, add empty line

Diego



More information about the ffmpeg-devel mailing list