Hi, On 11/30/2011 11:15 AM, Chris Berov wrote:
> > > 0001-yuv4mpeg-cosmetics.patch > > > From 96d6b37e30766c236cef4214ab137cedc0253e64 Mon Sep 17 00:00:00 2001 > From: unknown <[email protected]> > Date: Wed, 30 Nov 2011 13:16:07 +0200 > Subject: [PATCH] yuv4mpeg: cosmetics thanks for the patch. > case PIX_FMT_YUV420P: > - colorspace = (st->codec->chroma_sample_location == > AVCHROMA_LOC_TOPLEFT)?" C420paldv XYSCSS=420PALDV": > - (st->codec->chroma_sample_location == > AVCHROMA_LOC_LEFT) ?" C420mpeg2 XYSCSS=420MPEG2": > - " C420jpeg XYSCSS=420JPEG"; > + colorspace = > + (st->codec->chroma_sample_location == AVCHROMA_LOC_TOPLEFT)? > + " C420paldv XYSCSS=420PALDV": > + (st->codec->chroma_sample_location == > AVCHROMA_LOC_LEFT)? > + " C420mpeg2 XYSCSS=420MPEG2": > + " C420jpeg XYSCSS=420JPEG"; this one is more readable as-is. but could possibly be ok if reformatted to if/else instead of ?/: > - int width=-1, height=-1, raten=0, rated=0, aspectn=0, aspectd=0; > - enum PixelFormat pix_fmt=PIX_FMT_NONE,alt_pix_fmt=PIX_FMT_NONE; > + int width = -1, height = -1, raten = 0, > + rated = 0, aspectn = 0, aspectd = 0; vertically align these. > - while(tokstart<header_end&&*tokstart!=0x20) tokstart++; > + while (tokstart < header_end && *tokstart != 0x20) tokstart++; put tokstart++ on next line, here and elsewhere. > } > - while(tokstart<header_end&&*tokstart!=0x20) tokstart++; > + while(tokstart < header_end && *tokstart != 0x20) tokstart++; missing space after "while" > @@ -371,9 +387,10 @@ static int yuv4_read_packet(AVFormatContext *s, AVPacket > *pkt) > if (av_get_packet(s->pb, pkt, packet_size) != packet_size) > return AVERROR(EIO); > > - if (s->streams[0]->codec->coded_frame) { > - s->streams[0]->codec->coded_frame->interlaced_frame = > s1->interlaced_frame; > - s->streams[0]->codec->coded_frame->top_field_first = > s1->top_field_first; > + if (st->codec->coded_frame) { > + st->codec->coded_frame->interlaced_frame = s1->interlaced_frame; > + st->codec->coded_frame-> > + top_field_first = s1->top_field_first; don't split at the '->' just leave the long line Cheers, Justin _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
