On Thu, Apr 14, 2011 at 01:32:38PM +0200, Luca Barbato wrote:
> ---
>  libavformat/flvenc.c |   55 ++++++++++++++++++++++++++-----------------------
>  1 files changed, 29 insertions(+), 26 deletions(-)

If you are changing these lines anyway, you could K&Rify a bit:

> --- a/libavformat/flvenc.c
> +++ b/libavformat/flvenc.c
> @@ -183,25 +183,26 @@ static int flv_write_header(AVFormatContext *s)
> +                if (s->streams[i]->r_frame_rate.den &&
> +                    s->streams[i]->r_frame_rate.num) {
> +                    framerate = av_q2d(s->streams[i]->r_frame_rate);
> +                } else {
> +                    framerate = 1/av_q2d(s->streams[i]->codec->time_base);
> +                }
> +                video_enc = enc;
> +                if(enc->codec_tag == 0) {

if (

> +                    av_log(enc, AV_LOG_ERROR,
> +                                "video codec not compatible with flv\n");

Indentation is off.

> +                audio_enc = enc;
> +                if (get_audio_flags(enc)<0) return -1;

Add spaces around '<' and break the line.

> @@ -383,23 +384,25 @@ static int flv_write_packet(AVFormatContext *s, 
> AVPacket *pkt)
>  
> +            if(flags == 0) {

if (
> +                av_log(enc, AV_LOG_ERROR,
> +                            "video codec %X not compatible with flv\n",
> +                            enc->codec_id);

Indentation is off.

Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to