On Mon, Jun 25, 2012 at 01:33:40PM +0200, Luca Barbato wrote:
> 
> --- a/libavformat/flvenc.c
> +++ b/libavformat/flvenc.c
> @@ -184,34 +188,35 @@ static int flv_write_header(AVFormatContext *s)
>  
> -    for(i=0; i<s->nb_streams; i++){
> +    for (i=0; i<s->nb_streams; i++) {

spaces around operators

>              if(enc->codec_tag == 0) {

if (

> @@ -224,29 +229,30 @@ static int flv_write_header(AVFormatContext *s)
>  
>      avio_write(pb, "FLV", 3);
> -    avio_w8(pb,1);
> +    avio_w8(pb, 1);
>      avio_w8(pb,   FLV_HEADER_FLAG_HASAUDIO * !!audio_enc
> +                + FLV_HEADER_FLAG_HASVIDEO * !!video_enc);

This looks strange, move the operator to the end of the line.

> @@ -410,40 +418,40 @@ static int flv_write_packet(AVFormatContext *s, 
> AVPacket *pkt)
>  
>  //    av_log(s, AV_LOG_DEBUG, "type:%d pts: %"PRId64" size:%d\n", 
> enc->codec_type, timestamp, size);

This line is long.

> @@ -451,8 +459,10 @@ static int flv_write_packet(AVFormatContext *s, AVPacket 
> *pkt)
>                  return -1;
>          }
>      }
> +
>      if (flv->delay == AV_NOPTS_VALUE)
>          flv->delay = -pkt->dts;
> +
>      if (pkt->dts < -flv->delay) {
>          av_log(s, AV_LOG_WARNING, "Packets are not in the proper order with "
>                                    "respect to DTS\n");

neater:

        av_log(s, AV_LOG_WARNING,
               "Packets are not in the proper order with respect to DTS\n");

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

Reply via email to