[FFmpeg-devel] [PATCH]Basic XSUB encoder (take 5)

Diego Biurrun diego
Sat May 23 18:54:55 CEST 2009


On Sat, May 23, 2009 at 05:22:44PM +0200, Reimar D?ffinger wrote:
> 
> Haven't done anything on the muxer code part, but I fixed the trivial
> stuff pointed out here and one or two more simplifications and updated
> to SVN.

> --- libavcodec/xsubenc.c	(revision 0)
> +++ libavcodec/xsubenc.c	(revision 0)
> @@ -0,0 +1,224 @@
> +    if (xsub_encode_rle(&pb,
> +                h->rects[0]->pict.data[0],
> +                h->rects[0]->pict.linesize[0]*2,
> +                h->rects[0]->w, (h->rects[0]->h + 1) >> 1))
> +
> +    if (xsub_encode_rle(&pb,
> +            h->rects[0]->pict.data[0] + h->rects[0]->pict.linesize[0],
> +            h->rects[0]->pict.linesize[0]*2,
> +            h->rects[0]->w, h->rects[0]->h >> 1))

This looks weirdly indented.

> --- libavformat/avienc.c	(revision 18911)
> +++ libavformat/avienc.c	(working copy)
> @@ -212,8 +215,10 @@
> -        if(stream->codec_type == CODEC_TYPE_VIDEO)
> +        if(stream->codec_type == CODEC_TYPE_VIDEO
> +                || stream->codec_type == CODEC_TYPE_SUBTITLE)

If you keep the || on the first line, you can align this nicely.

Diego



More information about the ffmpeg-devel mailing list