Is there a pretty formatter for ffmpeg’s coding style and coding style guideline?
Amancio > On Mar 23, 2016, at 8:17 AM, Michael Niedermayer <mich...@niedermayer.cc> > wrote: > > On Tue, Mar 22, 2016 at 06:40:27PM -0700, Amancio Hasty wrote: > [...] > >> +static int vc264_init(AVCodecContext *avctx) { >> + >> + >> + >> + OMX_ERRORTYPE r; >> + int error; >> + >> + >> + >> + VC264Context *vc = avctx->priv_data; >> + >> + vc->width = avctx->width; >> + vc->height = avctx->height; >> + vc->bit_rate = avctx->bit_rate; >> +#if FF_API_CODED_FRAME >> +FF_DISABLE_DEPRECATION_WARNINGS >> + >> + avctx->coded_frame = av_frame_alloc(); >> + avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; >> +FF_ENABLE_DEPRECATION_WARNINGS >> +#endif >> + >> + >> + memset(&vc->list, 0, sizeof(vc->list)); >> + bcm_host_init(); >> + if ((vc->client = ilclient_init()) == NULL) { >> + return -3; >> + } >> + error = OMX_Init(); >> + >> + if (error != OMX_ErrorNone) { >> + ilclient_destroy(vc->client); >> + av_log(avctx,AV_LOG_ERROR,"in vc264_init OMX_Init failed "); >> + return -4; >> + } >> + >> + // create video_encode >> + r = ilclient_create_component(vc->client, &vc->video_encode, (char *) >> "video_encode", >> + ILCLIENT_DISABLE_ALL_PORTS | >> + ILCLIENT_ENABLE_INPUT_BUFFERS | >> + ILCLIENT_ENABLE_OUTPUT_BUFFERS); >> + >> + if (r != 0) { >> + av_log(avctx,AV_LOG_ERROR,"ilclient_create_component() for >> video_encode failed with %x!", >> + r); > >> + exit(1); > > a library cannot call exit() > > also indention looks rather odd and random > > [...] > > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > The educated differ from the uneducated as much as the living from the > dead. -- Aristotle _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel