From c1f5c9bd3fa0b963e1d5d938fc9ffc3fc074e071 Mon Sep 17 00:00:00 2001 From: diego Date: Fri, 16 May 2008 00:23:02 +0000 Subject: cosmetics: Remove pointless parentheses from return calls. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26786 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/ad_twin.c | 6 +-- libmpcodecs/ae_lame.c | 2 +- libmpcodecs/dec_video.c | 6 +-- libmpcodecs/img_format.c | 120 ++++++++++++++++++++++----------------------- libmpcodecs/vd_ffmpeg.c | 2 +- libmpcodecs/vd_qtvideo.c | 4 +- libmpcodecs/vd_realvid.c | 2 +- libmpcodecs/vd_xanim.c | 36 +++++++------- libmpcodecs/vd_xvid4.c | 22 ++++----- libmpcodecs/ve_lavc.c | 2 +- libmpcodecs/ve_qtvideo.c | 2 +- libmpcodecs/ve_x264.c | 2 +- libmpcodecs/ve_xvid4.c | 72 +++++++++++++-------------- libmpcodecs/vf_expand.c | 2 +- libmpcodecs/vf_framestep.c | 4 +- libmpcodecs/vf_lavc.c | 2 +- libmpcodecs/vf_palette.c | 2 +- libmpcodecs/vf_tile.c | 10 ++-- libmpcodecs/vf_vo.c | 4 +- 19 files changed, 151 insertions(+), 151 deletions(-) (limited to 'libmpcodecs') diff --git a/libmpcodecs/ad_twin.c b/libmpcodecs/ad_twin.c index 069e194735..58d1074682 100644 --- a/libmpcodecs/ad_twin.c +++ b/libmpcodecs/ad_twin.c @@ -216,7 +216,7 @@ static int bread(char *data, /* Output: Output data array */ } iptr = priv->ptr; /* current file data buffer pointer */ if ( iptr >= priv->nbuf ) /* If data file is empty then return */ - return(retval); + return retval; ibufadr = iptr/BYTE_BIT; /* current file data buffer address */ ibufbit = iptr%BYTE_BIT; /* current file data buffer bit */ /* tmpdat = stream->buf[ibufadr] >> (BYTE_BIT-ibufbit-1); */ @@ -235,7 +235,7 @@ static int bread(char *data, /* Output: Output data array */ } ++retval; } - return(retval); + return retval; } #define BITS_INT (sizeof(int)*8) @@ -266,7 +266,7 @@ static int get_bstm(int *data, /* Input: input data */ mask >>= 1; } *data = work; - return(retval); + return retval; } static int GetVqInfo( tvqConfInfoSubBlock *cfg, diff --git a/libmpcodecs/ae_lame.c b/libmpcodecs/ae_lame.c index 433fdc1fd0..80242dd351 100644 --- a/libmpcodecs/ae_lame.c +++ b/libmpcodecs/ae_lame.c @@ -122,7 +122,7 @@ static int encode_lame(audio_encoder_t *encoder, uint8_t *dest, void *src, int l else n = lame_encode_buffer_interleaved(lame,(short *)src, len/4, dest, max_size); - return (n < 0 ? 0 : n); + return n < 0 ? 0 : n; } diff --git a/libmpcodecs/dec_video.c b/libmpcodecs/dec_video.c index ab63ec4006..048f41a2ef 100644 --- a/libmpcodecs/dec_video.c +++ b/libmpcodecs/dec_video.c @@ -88,7 +88,7 @@ int set_video_colors(sh_video_t *sh_video,const char *item,int value) { int ret = vf->control(vf, VFCTRL_SET_EQUALIZER, &data); if (ret == CONTROL_TRUE) - return(1); + return 1; } /* try software control */ if(mpvdec) @@ -111,7 +111,7 @@ int get_video_colors(sh_video_t *sh_video,const char *item,int *value) int ret = vf->control(vf, VFCTRL_GET_EQUALIZER, &data); if (ret == CONTROL_TRUE){ *value = data.value; - return(1); + return 1; } } /* try software control */ @@ -129,7 +129,7 @@ int set_rectangle(sh_video_t *sh_video,int param,int value) { int ret = vf->control(vf, VFCTRL_CHANGE_RECTANGLE, data); if (ret) - return(1); + return 1; } return 0; } diff --git a/libmpcodecs/img_format.c b/libmpcodecs/img_format.c index 72a71b66cf..30df2391f4 100644 --- a/libmpcodecs/img_format.c +++ b/libmpcodecs/img_format.c @@ -7,66 +7,66 @@ const char *vo_format_name(int format) static char unknown_format[20]; switch(format) { - case IMGFMT_RGB1: return("RGB 1-bit"); - case IMGFMT_RGB4: return("RGB 4-bit"); - case IMGFMT_RG4B: return("RGB 4-bit per byte"); - case IMGFMT_RGB8: return("RGB 8-bit"); - case IMGFMT_RGB15: return("RGB 15-bit"); - case IMGFMT_RGB16: return("RGB 16-bit"); - case IMGFMT_RGB24: return("RGB 24-bit"); -// case IMGFMT_RGB32: return("RGB 32-bit"); - case IMGFMT_BGR1: return("BGR 1-bit"); - case IMGFMT_BGR4: return("BGR 4-bit"); - case IMGFMT_BG4B: return("BGR 4-bit per byte"); - case IMGFMT_BGR8: return("BGR 8-bit"); - case IMGFMT_BGR15: return("BGR 15-bit"); - case IMGFMT_BGR16: return("BGR 16-bit"); - case IMGFMT_BGR24: return("BGR 24-bit"); -// case IMGFMT_BGR32: return("BGR 32-bit"); - case IMGFMT_ABGR: return("ABGR"); - case IMGFMT_BGRA: return("BGRA"); - case IMGFMT_ARGB: return("ARGB"); - case IMGFMT_RGBA: return("RGBA"); - case IMGFMT_YVU9: return("Planar YVU9"); - case IMGFMT_IF09: return("Planar IF09"); - case IMGFMT_YV12: return("Planar YV12"); - case IMGFMT_I420: return("Planar I420"); - case IMGFMT_IYUV: return("Planar IYUV"); - case IMGFMT_CLPL: return("Planar CLPL"); - case IMGFMT_Y800: return("Planar Y800"); - case IMGFMT_Y8: return("Planar Y8"); - case IMGFMT_444P: return("Planar 444P"); - case IMGFMT_422P: return("Planar 422P"); - case IMGFMT_411P: return("Planar 411P"); - case IMGFMT_NV12: return("Planar NV12"); - case IMGFMT_NV21: return("Planar NV21"); - case IMGFMT_HM12: return("Planar NV12 Macroblock"); - case IMGFMT_IUYV: return("Packed IUYV"); - case IMGFMT_IY41: return("Packed IY41"); - case IMGFMT_IYU1: return("Packed IYU1"); - case IMGFMT_IYU2: return("Packed IYU2"); - case IMGFMT_UYVY: return("Packed UYVY"); - case IMGFMT_UYNV: return("Packed UYNV"); - case IMGFMT_cyuv: return("Packed CYUV"); - case IMGFMT_Y422: return("Packed Y422"); - case IMGFMT_YUY2: return("Packed YUY2"); - case IMGFMT_YUNV: return("Packed YUNV"); - case IMGFMT_YVYU: return("Packed YVYU"); - case IMGFMT_Y41P: return("Packed Y41P"); - case IMGFMT_Y211: return("Packed Y211"); - case IMGFMT_Y41T: return("Packed Y41T"); - case IMGFMT_Y42T: return("Packed Y42T"); - case IMGFMT_V422: return("Packed V422"); - case IMGFMT_V655: return("Packed V655"); - case IMGFMT_CLJR: return("Packed CLJR"); - case IMGFMT_YUVP: return("Packed YUVP"); - case IMGFMT_UYVP: return("Packed UYVP"); - case IMGFMT_MPEGPES: return("Mpeg PES"); - case IMGFMT_ZRMJPEGNI: return("Zoran MJPEG non-interlaced"); - case IMGFMT_ZRMJPEGIT: return("Zoran MJPEG top field first"); - case IMGFMT_ZRMJPEGIB: return("Zoran MJPEG bottom field first"); - case IMGFMT_XVMC_MOCO_MPEG2: return("MPEG1/2 Motion Compensation"); - case IMGFMT_XVMC_IDCT_MPEG2: return("MPEG1/2 Motion Compensation and IDCT"); + case IMGFMT_RGB1: return "RGB 1-bit"; + case IMGFMT_RGB4: return "RGB 4-bit"; + case IMGFMT_RG4B: return "RGB 4-bit per byte"; + case IMGFMT_RGB8: return "RGB 8-bit"; + case IMGFMT_RGB15: return "RGB 15-bit"; + case IMGFMT_RGB16: return "RGB 16-bit"; + case IMGFMT_RGB24: return "RGB 24-bit"; +// case IMGFMT_RGB32: return "RGB 32-bit"; + case IMGFMT_BGR1: return "BGR 1-bit"; + case IMGFMT_BGR4: return "BGR 4-bit"; + case IMGFMT_BG4B: return "BGR 4-bit per byte"; + case IMGFMT_BGR8: return "BGR 8-bit"; + case IMGFMT_BGR15: return "BGR 15-bit"; + case IMGFMT_BGR16: return "BGR 16-bit"; + case IMGFMT_BGR24: return "BGR 24-bit"; +// case IMGFMT_BGR32: return "BGR 32-bit"; + case IMGFMT_ABGR: return "ABGR"; + case IMGFMT_BGRA: return "BGRA"; + case IMGFMT_ARGB: return "ARGB"; + case IMGFMT_RGBA: return "RGBA"; + case IMGFMT_YVU9: return "Planar YVU9"; + case IMGFMT_IF09: return "Planar IF09"; + case IMGFMT_YV12: return "Planar YV12"; + case IMGFMT_I420: return "Planar I420"; + case IMGFMT_IYUV: return "Planar IYUV"; + case IMGFMT_CLPL: return "Planar CLPL"; + case IMGFMT_Y800: return "Planar Y800"; + case IMGFMT_Y8: return "Planar Y8"; + case IMGFMT_444P: return "Planar 444P"; + case IMGFMT_422P: return "Planar 422P"; + case IMGFMT_411P: return "Planar 411P"; + case IMGFMT_NV12: return "Planar NV12"; + case IMGFMT_NV21: return "Planar NV21"; + case IMGFMT_HM12: return "Planar NV12 Macroblock"; + case IMGFMT_IUYV: return "Packed IUYV"; + case IMGFMT_IY41: return "Packed IY41"; + case IMGFMT_IYU1: return "Packed IYU1"; + case IMGFMT_IYU2: return "Packed IYU2"; + case IMGFMT_UYVY: return "Packed UYVY"; + case IMGFMT_UYNV: return "Packed UYNV"; + case IMGFMT_cyuv: return "Packed CYUV"; + case IMGFMT_Y422: return "Packed Y422"; + case IMGFMT_YUY2: return "Packed YUY2"; + case IMGFMT_YUNV: return "Packed YUNV"; + case IMGFMT_YVYU: return "Packed YVYU"; + case IMGFMT_Y41P: return "Packed Y41P"; + case IMGFMT_Y211: return "Packed Y211"; + case IMGFMT_Y41T: return "Packed Y41T"; + case IMGFMT_Y42T: return "Packed Y42T"; + case IMGFMT_V422: return "Packed V422"; + case IMGFMT_V655: return "Packed V655"; + case IMGFMT_CLJR: return "Packed CLJR"; + case IMGFMT_YUVP: return "Packed YUVP"; + case IMGFMT_UYVP: return "Packed UYVP"; + case IMGFMT_MPEGPES: return "Mpeg PES"; + case IMGFMT_ZRMJPEGNI: return "Zoran MJPEG non-interlaced"; + case IMGFMT_ZRMJPEGIT: return "Zoran MJPEG top field first"; + case IMGFMT_ZRMJPEGIB: return "Zoran MJPEG bottom field first"; + case IMGFMT_XVMC_MOCO_MPEG2: return "MPEG1/2 Motion Compensation"; + case IMGFMT_XVMC_IDCT_MPEG2: return "MPEG1/2 Motion Compensation and IDCT"; } snprintf(unknown_format,20,"Unknown 0x%04x",format); return unknown_format; diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c index aac7e5e4ef..59a1bb8143 100644 --- a/libmpcodecs/vd_ffmpeg.c +++ b/libmpcodecs/vd_ffmpeg.c @@ -228,7 +228,7 @@ static int init(sh_video_t *sh){ ctx = sh->context = malloc(sizeof(vd_ffmpeg_ctx)); if (!ctx) - return(0); + return 0; memset(ctx, 0, sizeof(vd_ffmpeg_ctx)); lavc_codec = (AVCodec *)avcodec_find_decoder_by_name(sh->codec->dll); diff --git a/libmpcodecs/vd_qtvideo.c b/libmpcodecs/vd_qtvideo.c index ed1f27e715..4dd46caf84 100644 --- a/libmpcodecs/vd_qtvideo.c +++ b/libmpcodecs/vd_qtvideo.c @@ -196,7 +196,7 @@ static int init(sh_video_t *sh){ prev=FindNextComponent(NULL,&desc); if(!prev){ mp_msg(MSGT_DECVIDEO,MSGL_ERR,"Cannot find requested component\n"); - return(0); + return 0; } mp_msg(MSGT_DECVIDEO,MSGL_DBG2,"Found it! ID = %p\n",prev); @@ -278,7 +278,7 @@ static int init(sh_video_t *sh){ break; default: mp_msg(MSGT_DECVIDEO,MSGL_ERR,"Unknown requested csp\n"); - return(0); + return 0; } mp_msg(MSGT_DECVIDEO,MSGL_DBG2,"imgfmt: %s qt_imgfmt: %.4s\n", vo_format_name(imgfmt), (char *)&qt_imgfmt); sh->context = (void *)qt_imgfmt; diff --git a/libmpcodecs/vd_realvid.c b/libmpcodecs/vd_realvid.c index 0c346ef42a..e61be6d0b0 100644 --- a/libmpcodecs/vd_realvid.c +++ b/libmpcodecs/vd_realvid.c @@ -427,5 +427,5 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){ (sh->disp_w != transform_out[3] || sh->disp_h != transform_out[4])) initialized = 0; - return (result?NULL:mpi); + return result ? NULL : mpi; } diff --git a/libmpcodecs/vd_xanim.c b/libmpcodecs/vd_xanim.c index 05d607ac83..05f8945bbb 100644 --- a/libmpcodecs/vd_xanim.c +++ b/libmpcodecs/vd_xanim.c @@ -211,7 +211,7 @@ static int xacodec_load(sh_video_t *sh, char *filename) mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "xacodec: failed to dlopen %s while %s\n", filename, error); else mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "xacodec: failed to dlopen %s\n", filename); - return(0); + return 0; } what_the = dlsym(priv->file_handler, "What_The"); @@ -219,7 +219,7 @@ static int xacodec_load(sh_video_t *sh, char *filename) { mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "xacodec: failed to init %s while %s\n", filename, error); dlclose(priv->file_handler); - return(0); + return 0; } mod_hdr = what_the(); @@ -227,7 +227,7 @@ static int xacodec_load(sh_video_t *sh, char *filename) { mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "xacodec: initializer function failed in %s\n", filename); dlclose(priv->file_handler); - return(0); + return 0; } mp_msg(MSGT_DECVIDEO, MSGL_V, "=== XAnim Codec ===\n"); @@ -245,7 +245,7 @@ static int xacodec_load(sh_video_t *sh, char *filename) mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "xacodec: not supported api revision (%d) in %s\n", mod_hdr->api_rev, filename); dlclose(priv->file_handler); - return(0); + return 0; } func = mod_hdr->funcs; @@ -253,7 +253,7 @@ static int xacodec_load(sh_video_t *sh, char *filename) { mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "xacodec: function table error in %s\n", filename); dlclose(priv->file_handler); - return(0); + return 0; } mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "Exported functions by codec: [functable: %p entries: %d]\n", @@ -281,7 +281,7 @@ static int xacodec_load(sh_video_t *sh, char *filename) priv->dec_func = (void *)func[i].dec_func; } } - return(1); + return 1; } static int xacodec_query(sh_video_t *sh, XA_CODEC_HDR *codec_hdr) @@ -295,7 +295,7 @@ static int xacodec_query(sh_video_t *sh, XA_CODEC_HDR *codec_hdr) { codec_hdr->decoder = priv->dec_func; mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "We got decoder's address at init! %p\n", codec_hdr->decoder); - return(1); + return 1; } #endif @@ -306,16 +306,16 @@ static int xacodec_query(sh_video_t *sh, XA_CODEC_HDR *codec_hdr) priv->dec_func = (void *)codec_hdr->decoder; mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "Codec is supported: found decoder for %s at %p\n", codec_hdr->description, codec_hdr->decoder); - return(1); + return 1; case CODEC_UNSUPPORTED: mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "Codec (%s) is unsupported by dll\n", codec_hdr->description); - return(0); + return 0; case CODEC_UNKNOWN: default: mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "Codec (%s) is unknown by dll\n", codec_hdr->description); - return(0); + return 0; } } @@ -475,7 +475,7 @@ void *YUV2x2_Map_Func(unsigned int image_type, unsigned int dith_type) { mp_dbg(MSGT_DECVIDEO,MSGL_DBG2, "YUV2x2_Map_Func('image_type: %d', 'dith_type: %d')", image_type, dith_type); - return((void*)XA_YUV_2x2_clr); + return (void*)XA_YUV_2x2_clr; } /* -------------------- whole YUV frame converters ------------------------- */ @@ -581,7 +581,7 @@ void XA_YUV1611_Convert(unsigned char *image_p, unsigned int imagex, unsigned in void *XA_YUV1611_Func(unsigned int image_type) { mp_dbg(MSGT_DECVIDEO,MSGL_DBG2, "XA_YUV1611_Func('image_type: %d')", image_type); - return((void *)XA_YUV1611_Convert); + return (void *)XA_YUV1611_Convert; } /* --------------- YUV 2x2 1x1 1x1 (4:2:0 aka YV12) [3ivX,H263] ------------ */ @@ -619,7 +619,7 @@ void XA_YUV221111_Convert(unsigned char *image_p, unsigned int imagex, unsigned void *XA_YUV221111_Func(unsigned int image_type) { mp_dbg(MSGT_DECVIDEO,MSGL_DBG2, "XA_YUV221111_Func('image_type: %d')\n",image_type); - return((void *)XA_YUV221111_Convert); + return (void *)XA_YUV221111_Convert; } /* *** EOF XANIM *** */ @@ -657,7 +657,7 @@ static int init(sh_video_t *sh) snprintf(dll, 1024, "%s/%s", def_path, sh->codec->dll); if (xacodec_load(sh, dll) == 0) - return(0); + return 0; codec_hdr.xapi_rev = XAVID_API_REV; codec_hdr.anim_hdr = malloc(4096); @@ -690,13 +690,13 @@ static int init(sh_video_t *sh) default: mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "xacodec: not supported image out format (%s)\n", vo_format_name(sh->codec->outfmt[sh->outfmtidx])); - return(0); + return 0; } mp_msg(MSGT_DECVIDEO, MSGL_INFO, "xacodec: querying for input %dx%d %dbit [fourcc: %4x] (%s)...\n", codec_hdr.x, codec_hdr.y, codec_hdr.depth, codec_hdr.compression, codec_hdr.description); if (xacodec_query(sh, &codec_hdr) == 0) - return(0); + return 0; // free(codec_hdr.anim_hdr); @@ -705,7 +705,7 @@ static int init(sh_video_t *sh) { mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "xacodec: memory allocation error: %s\n", strerror(errno)); - return(0); + return 0; } priv->decinfo->cmd = 0; priv->decinfo->skip_flag = 0; @@ -721,7 +721,7 @@ static int init(sh_video_t *sh) mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "decinfo->extra, filled by codec: %p [%s]\n", &priv->decinfo->extra, (char *)priv->decinfo->extra); - return(1); + return 1; } // uninit driver diff --git a/libmpcodecs/vd_xvid4.c b/libmpcodecs/vd_xvid4.c index 2cfbf52e98..c144043946 100644 --- a/libmpcodecs/vd_xvid4.c +++ b/libmpcodecs/vd_xvid4.c @@ -86,7 +86,7 @@ static float stats2aspect(xvid_dec_stats_t *stats); static int control(sh_video_t *sh,int cmd,void* arg,...) { - return(CONTROL_UNKNOWN); + return CONTROL_UNKNOWN; } /*============================================================================ @@ -144,7 +144,7 @@ static int init(sh_video_t *sh) default: mp_msg(MSGT_DECVIDEO, MSGL_ERR, "Unsupported out_fmt: 0x%X\n", sh->codec->outfmt[sh->outfmtidx]); - return(0); + return 0; } /* Gather some information about the host library */ @@ -160,7 +160,7 @@ static int init(sh_video_t *sh) /* Initialize the xvidcore library */ if(xvid_global(NULL, XVID_GBL_INIT, &xvid_ini, NULL)) - return(0); + return 0; /* We use 0 width and height so xvidcore will resize its buffers * if required. That allows this vd plugin to do resize on first @@ -171,7 +171,7 @@ static int init(sh_video_t *sh) /* Get a decoder instance */ if(xvid_decore(0, XVID_DEC_CREATE, &dec_p, NULL)<0) { mp_msg(MSGT_DECVIDEO, MSGL_ERR, "XviD init failed\n"); - return(0); + return 0; } p = malloc(sizeof(priv_t)); @@ -192,7 +192,7 @@ static int init(sh_video_t *sh) break; } - return(1); + return 1; } /*============================================================================ @@ -221,7 +221,7 @@ static mp_image_t* decode(sh_video_t *sh, void* data, int len, int flags) if(!data || len <= 0) - return(NULL); + return NULL; memset(&dec,0,sizeof(xvid_dec_frame_t)); memset(&stats, 0, sizeof(xvid_dec_stats_t)); @@ -272,7 +272,7 @@ static mp_image_t* decode(sh_video_t *sh, void* data, int len, int flags) consumed = xvid_decore(p->hdl, XVID_DEC_DECODE, &dec, &stats); if (consumed < 0) { mp_msg(MSGT_DECVIDEO, MSGL_ERR, "Decoding error\n"); - return(NULL); + return NULL; } /* Found a VOL information stats, if VO plugin is not initialized @@ -280,7 +280,7 @@ static mp_image_t* decode(sh_video_t *sh, void* data, int len, int flags) if (stats.type == XVID_TYPE_VOL && !p->vo_initialized) { sh->aspect = stats2aspect(&stats); if(!mpcodecs_config_vo(sh, stats.data.vol.width, stats.data.vol.height, IMGFMT_YV12)) - return(NULL); + return NULL; /* Don't take this path twice */ p->vo_initialized = !p->vo_initialized; @@ -309,7 +309,7 @@ static mp_image_t* decode(sh_video_t *sh, void* data, int len, int flags) /* If we got out the decoding loop because the buffer was empty and there was nothing * to output yet, then just return NULL */ - return((stats.type == XVID_TYPE_NOTHING)? NULL: mpi); + return (stats.type == XVID_TYPE_NOTHING) ? NULL : mpi; } /***************************************************************************** @@ -368,10 +368,10 @@ static float stats2aspect(xvid_dec_stats_t *stats) dar = ((float)stats->data.vol.width*wpar); dar /= ((float)stats->data.vol.height*hpar); - return(dar); + return dar; } - return(0.0f); + return 0.0f; } /***************************************************************************** diff --git a/libmpcodecs/ve_lavc.c b/libmpcodecs/ve_lavc.c index f9d17890ab..915c9a583f 100644 --- a/libmpcodecs/ve_lavc.c +++ b/libmpcodecs/ve_lavc.c @@ -782,7 +782,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){ pic->top_field_first= lavc_param_top; } - return (encode_frame(vf, pic, pts) >= 0); + return encode_frame(vf, pic, pts) >= 0; } static int encode_frame(struct vf_instance_s* vf, AVFrame *pic, double pts){ diff --git a/libmpcodecs/ve_qtvideo.c b/libmpcodecs/ve_qtvideo.c index f7168f2b76..a41cb00e96 100644 --- a/libmpcodecs/ve_qtvideo.c +++ b/libmpcodecs/ve_qtvideo.c @@ -149,7 +149,7 @@ static int config(struct vf_instance_s* vf, compressor=FindNextComponent(NULL,&cdesc); if(!compressor){ mp_msg(MSGT_MENCODER,MSGL_ERR,"Cannot find requested component\n"); - return(0); + return 0; } mp_msg(MSGT_MENCODER,MSGL_DBG2,"Found it! ID = %p\n",compressor); diff --git a/libmpcodecs/ve_x264.c b/libmpcodecs/ve_x264.c index a4b6c40902..04d0bd342a 100644 --- a/libmpcodecs/ve_x264.c +++ b/libmpcodecs/ve_x264.c @@ -232,7 +232,7 @@ static int query_format(struct vf_instance_s* vf, unsigned int fmt) { switch(fmt) { case IMGFMT_I420: - return (VFCAP_CSP_SUPPORTED|VFCAP_CSP_SUPPORTED_BY_HW); + return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW; case IMGFMT_YV12: case IMGFMT_422P: case IMGFMT_444P: diff --git a/libmpcodecs/ve_xvid4.c b/libmpcodecs/ve_xvid4.c index 73b9d0631a..6b50885647 100644 --- a/libmpcodecs/ve_xvid4.c +++ b/libmpcodecs/ve_xvid4.c @@ -405,14 +405,14 @@ config(struct vf_instance_s* vf, mod->d_height = d_height; if(dispatch_settings(mod) == BAD) - return(BAD); + return BAD; /*-------------------------------------------------------------------- * Set remaining information in the xvid_enc_create_t structure *------------------------------------------------------------------*/ if(set_create_struct(mod) == BAD) - return(BAD); + return BAD; /*-------------------------------------------------------------------- * Encoder instance creation @@ -423,7 +423,7 @@ config(struct vf_instance_s* vf, if(err<0) { mp_msg(MSGT_MENCODER, MSGL_ERR, "xvid: xvidcore returned a '%s' error\n", errorstring(err)); - return(BAD); + return BAD; } /* Store the encoder instance into the private data */ @@ -431,7 +431,7 @@ config(struct vf_instance_s* vf, mod->mux->decoder_delay = mod->create.max_bframes ? 1 : 0; - return(FINE); + return FINE; } /*============================================================================ @@ -487,7 +487,7 @@ xvid_mplayer_module_t *mod = (xvid_mplayer_module_t *)vf->priv; flush_internal_buffers(mod); break; } - return(CONTROL_UNKNOWN); + return CONTROL_UNKNOWN; } /*============================================================================ @@ -501,12 +501,12 @@ query_format(struct vf_instance_s* vf, unsigned int fmt) case IMGFMT_YV12: case IMGFMT_IYUV: case IMGFMT_I420: - return(VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW); + return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW; case IMGFMT_YUY2: case IMGFMT_UYVY: - return(VFCAP_CSP_SUPPORTED); + return VFCAP_CSP_SUPPORTED; } - return(BAD); + return BAD; } /*============================================================================ @@ -531,7 +531,7 @@ put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts) * -----------------------------------------------------------------*/ if(set_frame_struct(mod, mpi) == BAD) - return(BAD); + return BAD; /* ------------------------------------------------------------------- * Encode the frame @@ -543,13 +543,13 @@ put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts) if(size<0) { mp_msg(MSGT_MENCODER, MSGL_ERR, "xvid: xvidcore returned a '%s' error\n", errorstring(size)); - return(BAD); + return BAD; } /* If size is == 0, we're done with that frame */ if(size == 0) { ++mod->mux->encoder_delay; - return(FINE); + return FINE; } /* xvidcore returns stats about encoded frame in an asynchronous way @@ -561,7 +561,7 @@ put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts) size, (mod->frame.out_flags & XVID_KEYFRAME)?0x10:0, MP_NOPTS_VALUE, MP_NOPTS_VALUE); - return(FINE); + return FINE; } /*============================================================================ @@ -590,7 +590,7 @@ vf_open(vf_instance_t *vf, char* args) if(mod == NULL) { mp_msg(MSGT_MENCODER,MSGL_ERR, "xvid: memory allocation failure (private data)\n"); - return(BAD); + return BAD; } /* Initialize the module to zeros */ @@ -607,7 +607,7 @@ vf_open(vf_instance_t *vf, char* args) if(mod->mux->bih == NULL) { mp_msg(MSGT_MENCODER,MSGL_ERR, "xvid: memory allocation failure (BITMAP header)\n"); - return(BAD); + return BAD; } mod->mux->bih->biSize = sizeof(BITMAPINFOHEADER); @@ -639,10 +639,10 @@ vf_open(vf_instance_t *vf, char* args) /* Initialize the xvidcore library */ if (xvid_global(NULL, XVID_GBL_INIT, &xvid_gbl_init, NULL) < 0) { mp_msg(MSGT_MENCODER,MSGL_ERR, "xvid: initialisation failure\n"); - return(BAD); + return BAD; } - return(FINE); + return FINE; } /***************************************************************************** @@ -679,7 +679,7 @@ static int dispatch_settings(xvid_mplayer_module_t *mod) { mp_msg(MSGT_MENCODER,MSGL_ERR, "xvid:[ERROR] \"%s\" is an invalid profile name\n", xvidenc_profile); - return(BAD); + return BAD; } /* ------------------------------------------------------------------- @@ -954,7 +954,7 @@ static int dispatch_settings(xvid_mplayer_module_t *mod) else mp_msg(MSGT_MENCODER, MSGL_INFO, "xvid: par=0/0 (vga11) forced by choosing a DXN profile\n"); - return(FINE); + return FINE; } static int set_create_struct(xvid_mplayer_module_t *mod) @@ -968,7 +968,7 @@ static int set_create_struct(xvid_mplayer_module_t *mod) if(xvidenc_profile) selected_profile = profileFromName(xvidenc_profile); if(!selected_profile) - return(BAD); + return BAD; /* Most of the structure is initialized by dispatch settings, only a * few things are missing */ @@ -988,7 +988,7 @@ static int set_create_struct(xvid_mplayer_module_t *mod) mp_msg(MSGT_MENCODER,MSGL_ERR, "xvid:[ERROR] resolution must be <= %dx%d for the chosen profile\n", selected_profile->width, selected_profile->height); - return(BAD); + return BAD; } /* FPS */ @@ -1002,7 +1002,7 @@ static int set_create_struct(xvid_mplayer_module_t *mod) mp_msg(MSGT_MENCODER,MSGL_ERR, "xvid:[ERROR] frame rate must be <= %d for the chosen profile\n", selected_profile->fps); - return(BAD); + return BAD; } /* Encodings zones */ @@ -1024,7 +1024,7 @@ static int set_create_struct(xvid_mplayer_module_t *mod) mp_msg(MSGT_MENCODER, MSGL_ERR, "xvid: you can't mix Fixed Quantizer Rate Control" " with other Rate Control mechanisms\n"); - return(BAD); + return BAD; } if(xvidenc_bitrate != 0 && xvidenc_pass == 1) { @@ -1062,7 +1062,7 @@ static int set_create_struct(xvid_mplayer_module_t *mod) mp_msg(MSGT_MENCODER, MSGL_ERR, "xvid: you must specify one or a valid combination of " "'bitrate', 'pass', 'fixed_quant' settings\n"); - return(BAD); + return BAD; } /* Sanity checking */ @@ -1071,7 +1071,7 @@ static int set_create_struct(xvid_mplayer_module_t *mod) mp_msg(MSGT_MENCODER, MSGL_ERR, "xvid: this code should not be reached - fill a bug " "report\n"); - return(BAD); + return BAD; } /* This is a single pass encoding: either a CBR pass or a constant @@ -1183,7 +1183,7 @@ static int set_create_struct(xvid_mplayer_module_t *mod) if(e != 3) { mp_msg(MSGT_MENCODER,MSGL_ERR, "error parsing zones\n"); - return(BAD); + return BAD; } q = (int)(value * 100); if (mode == 'q') @@ -1191,7 +1191,7 @@ static int set_create_struct(xvid_mplayer_module_t *mod) if (q < 200 || q > 3100) // make sure that quantizer is in allowable range { mp_msg(MSGT_MENCODER, MSGL_ERR, "zone quantizer must be between 2 and 31\n"); - return(BAD); + return BAD; } else { @@ -1203,7 +1203,7 @@ static int set_create_struct(xvid_mplayer_module_t *mod) if (q < 1 || q > 200) { mp_msg(MSGT_MENCODER, MSGL_ERR, "zone weight must be between 1 and 200\n"); - return(BAD); + return BAD; } else { @@ -1222,7 +1222,7 @@ static int set_create_struct(xvid_mplayer_module_t *mod) if(p) p++; } } - return(FINE); + return FINE; } static int set_frame_struct(xvid_mplayer_module_t *mod, mp_image_t *mpi) @@ -1253,7 +1253,7 @@ static int set_frame_struct(xvid_mplayer_module_t *mod, mp_image_t *mpi) mp_msg(MSGT_MENCODER, MSGL_ERR, "xvid: unsupported picture format (%s)!\n", vo_format_name(mpi->imgfmt)); - return(BAD); + return BAD; } /* Bind source frame */ @@ -1268,7 +1268,7 @@ static int set_frame_struct(xvid_mplayer_module_t *mod, mp_image_t *mpi) * plugins */ frame->quant = 0; - return(FINE); + return FINE; } static void @@ -1411,7 +1411,7 @@ static void *read_matrix(unsigned char *filename) /* Allocate matrix space */ if((matrix = malloc(64*sizeof(unsigned char))) == NULL) - return(NULL); + return NULL; /* Open the matrix file */ if((input = fopen(filename, "rb")) == NULL) { @@ -1419,7 +1419,7 @@ static void *read_matrix(unsigned char *filename) "xvid: Error opening the matrix file %s\n", filename); free(matrix); - return(NULL); + return NULL; } /* Read the matrix */ @@ -1434,7 +1434,7 @@ static void *read_matrix(unsigned char *filename) filename); free(matrix); fclose(input); - return(NULL); + return NULL; } /* Clamp the value to safe range */ @@ -1449,7 +1449,7 @@ static void *read_matrix(unsigned char *filename) /* We're done */ fclose(input); - return(matrix); + return matrix; } @@ -1481,7 +1481,7 @@ par_string(int parcode) par_string = "unknown"; break; } - return (par_string); + return par_string; } static const char *errorstring(int err) @@ -1507,7 +1507,7 @@ static const char *errorstring(int err) error = "Unknown"; } - return(error); + return error; } /***************************************************************************** diff --git a/libmpcodecs/vf_expand.c b/libmpcodecs/vf_expand.c index 44a5549e19..0f25766f09 100644 --- a/libmpcodecs/vf_expand.c +++ b/libmpcodecs/vf_expand.c @@ -421,7 +421,7 @@ static int control(struct vf_instance_s* vf, int request, void* data){ } static int query_format(struct vf_instance_s* vf, unsigned int fmt){ - return (vf_next_query_format(vf,fmt)); + return vf_next_query_format(vf,fmt); } static int open(vf_instance_t *vf, char* args){ diff --git a/libmpcodecs/vf_framestep.c b/libmpcodecs/vf_framestep.c index 3152daf8a5..956fe03ae3 100644 --- a/libmpcodecs/vf_framestep.c +++ b/libmpcodecs/vf_framestep.c @@ -147,7 +147,7 @@ static int open(vf_instance_t *vf, char* args) vf->default_reqs = VFCAP_ACCEPT_STRIDE; vf->priv = p = calloc(1, sizeof(struct vf_priv_s)); if (p == NULL) { - return(0); + return 0; } if (args != NULL) { @@ -172,7 +172,7 @@ static int open(vf_instance_t *vf, char* args) p->frame_step = atoi(args); if (p->frame_step <= 0) { mp_msg(MSGT_VFILTER, MSGL_WARN, MSGTR_MPCODECS_ErrorParsingArgument); - return(0); + return 0; } } } diff --git a/libmpcodecs/vf_lavc.c b/libmpcodecs/vf_lavc.c index a7fe6f7529..7e904b440b 100644 --- a/libmpcodecs/vf_lavc.c +++ b/libmpcodecs/vf_lavc.c @@ -107,7 +107,7 @@ static int query_format(struct vf_instance_s* vf, unsigned int fmt){ case IMGFMT_YV12: case IMGFMT_I420: case IMGFMT_IYUV: - return (vf_next_query_format(vf,IMGFMT_MPEGPES) & (~(VFCAP_CSP_SUPPORTED_BY_HW|VFCAP_ACCEPT_STRIDE))); + return vf_next_query_format(vf, IMGFMT_MPEGPES) & (~(VFCAP_CSP_SUPPORTED_BY_HW | VFCAP_ACCEPT_STRIDE)); } return 0; } diff --git a/libmpcodecs/vf_palette.c b/libmpcodecs/vf_palette.c index 47dd7932b7..70b4379759 100644 --- a/libmpcodecs/vf_palette.c +++ b/libmpcodecs/vf_palette.c @@ -189,7 +189,7 @@ static int open(vf_instance_t *vf, char* args){ if (!strcasecmp(args,"bgr32")) vf->priv->fmt=IMGFMT_BGR32; else { mp_msg(MSGT_VFILTER, MSGL_WARN, MSGTR_MPCODECS_UnknownFormatName, args); - return(0); + return 0; } } return 1; diff --git a/libmpcodecs/vf_tile.c b/libmpcodecs/vf_tile.c index 9366c59963..8fc4b702fc 100644 --- a/libmpcodecs/vf_tile.c +++ b/libmpcodecs/vf_tile.c @@ -172,7 +172,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts) } else { /* Skip the frame */ - return(0); + return 0; } } @@ -237,7 +237,7 @@ static int parse_int(char **s, int *rt, int def_val) } else if (**s != '\0') { /* Error, we got some wrong char */ - return(1); + return 1; } } else { @@ -245,7 +245,7 @@ static int parse_int(char **s, int *rt, int def_val) } *rt = t; - return(0); + return 0; } @@ -263,7 +263,7 @@ static int open(vf_instance_t *vf, char* args) /* Private data */ vf->priv = p = calloc(1, sizeof(struct vf_priv_s)); if (p == NULL) { - return(0); + return 0; } if (args == NULL) { @@ -280,7 +280,7 @@ static int open(vf_instance_t *vf, char* args) if (er) { mp_msg(MSGT_VFILTER, MSGL_ERR, MSGTR_MPCODECS_ErrorParsingArgument); - return(0); + return 0; } /* Load some default */ if ((p->xytile <= 0) || (p->xytile > p->xtile * p->ytile)) { diff --git a/libmpcodecs/vf_vo.c b/libmpcodecs/vf_vo.c index f0daa59e62..131eb7f8ab 100644 --- a/libmpcodecs/vf_vo.c +++ b/libmpcodecs/vf_vo.c @@ -103,13 +103,13 @@ static int control(struct vf_instance_s* vf, int request, void* data) { vf_equalizer_t *eq=data; if(!vo_config_count) return CONTROL_FALSE; // vo not configured? - return((video_out->control(VOCTRL_SET_EQUALIZER, eq->item, eq->value) == VO_TRUE) ? CONTROL_TRUE : CONTROL_FALSE); + return (video_out->control(VOCTRL_SET_EQUALIZER, eq->item, eq->value) == VO_TRUE) ? CONTROL_TRUE : CONTROL_FALSE; } case VFCTRL_GET_EQUALIZER: { vf_equalizer_t *eq=data; if(!vo_config_count) return CONTROL_FALSE; // vo not configured? - return((video_out->control(VOCTRL_GET_EQUALIZER, eq->item, &eq->value) == VO_TRUE) ? CONTROL_TRUE : CONTROL_FALSE); + return (video_out->control(VOCTRL_GET_EQUALIZER, eq->item, &eq->value) == VO_TRUE) ? CONTROL_TRUE : CONTROL_FALSE; } #ifdef USE_ASS case VFCTRL_INIT_EOSD: -- cgit v1.2.3 From e53887b234691a6f29377a12861710d3040ccf2a Mon Sep 17 00:00:00 2001 From: diego Date: Sat, 17 May 2008 10:12:07 +0000 Subject: Add missing MPLAYER_ prefix to multiple inclusion guards. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26793 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/native/rtjpegn.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libmpcodecs') diff --git a/libmpcodecs/native/rtjpegn.h b/libmpcodecs/native/rtjpegn.h index 21bd939311..a854818e2f 100644 --- a/libmpcodecs/native/rtjpegn.h +++ b/libmpcodecs/native/rtjpegn.h @@ -21,8 +21,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef RTJPEGN_H -#define RTJPEGN_H +#ifndef MPLAYER_RTJPEGN_H +#define MPLAYER_RTJPEGN_H #include @@ -58,4 +58,4 @@ extern void RTjpeg_yuvrgb16(__u8 *buf, __u8 *rgb, int stride); extern void RTjpeg_yuvrgb24(__u8 *buf, __u8 *rgb, int stride); extern void RTjpeg_yuvrgb32(__u8 *buf, __u8 *rgb, int stride); -#endif /* RTJPEGN_H */ +#endif /* MPLAYER_RTJPEGN_H */ -- cgit v1.2.3 From 8ac2b7bbf5995968b045ab88c22cb2730b1c88e2 Mon Sep 17 00:00:00 2001 From: diego Date: Tue, 27 May 2008 12:41:27 +0000 Subject: cosmetics: XviD --> Xvid git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26897 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/vd_xvid4.c | 6 +++--- libmpcodecs/ve_xvid4.c | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'libmpcodecs') diff --git a/libmpcodecs/vd_xvid4.c b/libmpcodecs/vd_xvid4.c index c144043946..bbb99b5d4f 100644 --- a/libmpcodecs/vd_xvid4.c +++ b/libmpcodecs/vd_xvid4.c @@ -1,5 +1,5 @@ /* - * - XviD 1.x decoder module for mplayer/mencoder - + * - Xvid 1.x decoder module for mplayer/mencoder - * * Copyright(C) 2003 Marco Belli * 2003-2004 Edouard Gomez @@ -170,7 +170,7 @@ static int init(sh_video_t *sh) /* Get a decoder instance */ if(xvid_decore(0, XVID_DEC_CREATE, &dec_p, NULL)<0) { - mp_msg(MSGT_DECVIDEO, MSGL_ERR, "XviD init failed\n"); + mp_msg(MSGT_DECVIDEO, MSGL_ERR, "Xvid init failed\n"); return 0; } @@ -380,7 +380,7 @@ static float stats2aspect(xvid_dec_stats_t *stats) static vd_info_t info = { - "XviD 1.0 decoder", + "Xvid 1.0 decoder", "xvid", "Marco Belli , Edouard Gomez ", "Marco Belli , Edouard Gomez ", diff --git a/libmpcodecs/ve_xvid4.c b/libmpcodecs/ve_xvid4.c index 6b50885647..39b2a545db 100644 --- a/libmpcodecs/ve_xvid4.c +++ b/libmpcodecs/ve_xvid4.c @@ -1,5 +1,5 @@ /* - * - XviD 1.x decoder module for mplayer/mencoder - + * - Xvid 1.x decoder module for mplayer/mencoder - * * Copyright(C) 2003 Marco Belli * 2003-2004 Edouard Gomez @@ -96,7 +96,7 @@ typedef const struct unsigned int flags; ///< flags for allowed options/dxn note the definitions for PROFILE_S and PROFILE_AS } profile_t; -// Code taken from XviD VfW source for profile support +// Code taken from Xvid VfW source for profile support /* default vbv_occupancy is (64/170)*vbv_buffer_size */ @@ -390,7 +390,7 @@ config(struct vf_instance_s* vf, /* Message the FourCC type */ mp_msg(MSGT_MENCODER, MSGL_INFO, - "videocodec: XviD (%dx%d fourcc=%x [%.4s])\n", + "videocodec: Xvid (%dx%d fourcc=%x [%.4s])\n", width, height, mod->mux->bih->biCompression, (char *)&mod->mux->bih->biCompression); @@ -398,7 +398,7 @@ config(struct vf_instance_s* vf, mod->pixels = mod->mux->bih->biWidth*mod->mux->bih->biHeight; /*-------------------------------------------------------------------- - * Dispatch all module settings to XviD structures + * Dispatch all module settings to Xvid structures *------------------------------------------------------------------*/ mod->d_width = d_width; @@ -617,7 +617,7 @@ vf_open(vf_instance_t *vf, char* args) mod->mux->bih->biBitCount = 12; mod->mux->bih->biCompression = mmioFOURCC('X','V','I','D'); - /* Retrieve information about the host XviD library */ + /* Retrieve information about the host Xvid library */ memset(&xvid_gbl_info, 0, sizeof(xvid_gbl_info_t)); xvid_gbl_info.version = XVID_VERSION; @@ -1515,7 +1515,7 @@ static const char *errorstring(int err) ****************************************************************************/ vf_info_t ve_info_xvid = { - "XviD 1.0 encoder", + "Xvid 1.0 encoder", "xvid", "Marco Belli , Edouard Gomez ", "No comment", -- cgit v1.2.3 From 08ec85ba4be2915e6ae9918344b4465de4ad37f5 Mon Sep 17 00:00:00 2001 From: iive Date: Wed, 28 May 2008 23:04:41 +0000 Subject: Revert commit r26897. XviD is the correct spelling of the codec. You can see it written in the codec own documentation and header files. Prefered name capitalization confirmed in conversation with XviD developer (prunedtree). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26915 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/vd_xvid4.c | 6 +++--- libmpcodecs/ve_xvid4.c | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'libmpcodecs') diff --git a/libmpcodecs/vd_xvid4.c b/libmpcodecs/vd_xvid4.c index bbb99b5d4f..c144043946 100644 --- a/libmpcodecs/vd_xvid4.c +++ b/libmpcodecs/vd_xvid4.c @@ -1,5 +1,5 @@ /* - * - Xvid 1.x decoder module for mplayer/mencoder - + * - XviD 1.x decoder module for mplayer/mencoder - * * Copyright(C) 2003 Marco Belli * 2003-2004 Edouard Gomez @@ -170,7 +170,7 @@ static int init(sh_video_t *sh) /* Get a decoder instance */ if(xvid_decore(0, XVID_DEC_CREATE, &dec_p, NULL)<0) { - mp_msg(MSGT_DECVIDEO, MSGL_ERR, "Xvid init failed\n"); + mp_msg(MSGT_DECVIDEO, MSGL_ERR, "XviD init failed\n"); return 0; } @@ -380,7 +380,7 @@ static float stats2aspect(xvid_dec_stats_t *stats) static vd_info_t info = { - "Xvid 1.0 decoder", + "XviD 1.0 decoder", "xvid", "Marco Belli , Edouard Gomez ", "Marco Belli , Edouard Gomez ", diff --git a/libmpcodecs/ve_xvid4.c b/libmpcodecs/ve_xvid4.c index 39b2a545db..6b50885647 100644 --- a/libmpcodecs/ve_xvid4.c +++ b/libmpcodecs/ve_xvid4.c @@ -1,5 +1,5 @@ /* - * - Xvid 1.x decoder module for mplayer/mencoder - + * - XviD 1.x decoder module for mplayer/mencoder - * * Copyright(C) 2003 Marco Belli * 2003-2004 Edouard Gomez @@ -96,7 +96,7 @@ typedef const struct unsigned int flags; ///< flags for allowed options/dxn note the definitions for PROFILE_S and PROFILE_AS } profile_t; -// Code taken from Xvid VfW source for profile support +// Code taken from XviD VfW source for profile support /* default vbv_occupancy is (64/170)*vbv_buffer_size */ @@ -390,7 +390,7 @@ config(struct vf_instance_s* vf, /* Message the FourCC type */ mp_msg(MSGT_MENCODER, MSGL_INFO, - "videocodec: Xvid (%dx%d fourcc=%x [%.4s])\n", + "videocodec: XviD (%dx%d fourcc=%x [%.4s])\n", width, height, mod->mux->bih->biCompression, (char *)&mod->mux->bih->biCompression); @@ -398,7 +398,7 @@ config(struct vf_instance_s* vf, mod->pixels = mod->mux->bih->biWidth*mod->mux->bih->biHeight; /*-------------------------------------------------------------------- - * Dispatch all module settings to Xvid structures + * Dispatch all module settings to XviD structures *------------------------------------------------------------------*/ mod->d_width = d_width; @@ -617,7 +617,7 @@ vf_open(vf_instance_t *vf, char* args) mod->mux->bih->biBitCount = 12; mod->mux->bih->biCompression = mmioFOURCC('X','V','I','D'); - /* Retrieve information about the host Xvid library */ + /* Retrieve information about the host XviD library */ memset(&xvid_gbl_info, 0, sizeof(xvid_gbl_info_t)); xvid_gbl_info.version = XVID_VERSION; @@ -1515,7 +1515,7 @@ static const char *errorstring(int err) ****************************************************************************/ vf_info_t ve_info_xvid = { - "Xvid 1.0 encoder", + "XviD 1.0 encoder", "xvid", "Marco Belli , Edouard Gomez ", "No comment", -- cgit v1.2.3 From 6ab8ece7180097c1741d854599b6daf78e709a1e Mon Sep 17 00:00:00 2001 From: reimar Date: Sun, 1 Jun 2008 16:40:56 +0000 Subject: Properly free memory allocate by liba52. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26955 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/ad_hwac3.c | 3 +++ libmpcodecs/ad_liba52.c | 1 + 2 files changed, 4 insertions(+) (limited to 'libmpcodecs') diff --git a/libmpcodecs/ad_hwac3.c b/libmpcodecs/ad_hwac3.c index 1ac2a5155e..dba0d98403 100644 --- a/libmpcodecs/ad_hwac3.c +++ b/libmpcodecs/ad_hwac3.c @@ -128,14 +128,17 @@ static int init(sh_audio_t *sh_audio) } if(ac3dts_fillbuff(sh_audio) < 0) { + a52_free(a52_state); mp_msg(MSGT_DECAUDIO, MSGL_ERR, "AC3/DTS sync failed\n"); return 0; } + sh_audio->context = a52_state; return 1; } static void uninit(sh_audio_t *sh) { + a52_free(sh->context); } static int control(sh_audio_t *sh,int cmd,void* arg, ...) diff --git a/libmpcodecs/ad_liba52.c b/libmpcodecs/ad_liba52.c index 604ed71c48..8c32c81319 100644 --- a/libmpcodecs/ad_liba52.c +++ b/libmpcodecs/ad_liba52.c @@ -253,6 +253,7 @@ while(sh_audio->channels>0){ static void uninit(sh_audio_t *sh) { + a52_free(a52_state); } static int control(sh_audio_t *sh,int cmd,void* arg, ...) -- cgit v1.2.3