1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Merge commit '984e3398662d460e15904f9e4a6df9ef759070cb'

* commit '984e3398662d460e15904f9e4a6df9ef759070cb':
  avcodec: Consistently name encoder init functions foo_encode_init

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-02-20 15:22:37 +01:00
commit add54280bf
4 changed files with 9 additions and 10 deletions

View File

@ -195,7 +195,7 @@ static av_cold int a64multi_close_encoder(AVCodecContext *avctx)
return 0; return 0;
} }
static av_cold int a64multi_init_encoder(AVCodecContext *avctx) static av_cold int a64multi_encode_init(AVCodecContext *avctx)
{ {
A64Context *c = avctx->priv_data; A64Context *c = avctx->priv_data;
int a; int a;
@ -402,7 +402,7 @@ AVCodec ff_a64multi_encoder = {
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_A64_MULTI, .id = AV_CODEC_ID_A64_MULTI,
.priv_data_size = sizeof(A64Context), .priv_data_size = sizeof(A64Context),
.init = a64multi_init_encoder, .init = a64multi_encode_init,
.encode2 = a64multi_encode_frame, .encode2 = a64multi_encode_frame,
.close = a64multi_close_encoder, .close = a64multi_close_encoder,
.pix_fmts = (const enum AVPixelFormat[]) {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE}, .pix_fmts = (const enum AVPixelFormat[]) {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE},
@ -416,7 +416,7 @@ AVCodec ff_a64multi5_encoder = {
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_A64_MULTI5, .id = AV_CODEC_ID_A64_MULTI5,
.priv_data_size = sizeof(A64Context), .priv_data_size = sizeof(A64Context),
.init = a64multi_init_encoder, .init = a64multi_encode_init,
.encode2 = a64multi_encode_frame, .encode2 = a64multi_encode_frame,
.close = a64multi_close_encoder, .close = a64multi_close_encoder,
.pix_fmts = (const enum AVPixelFormat[]) {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE}, .pix_fmts = (const enum AVPixelFormat[]) {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE},

View File

@ -33,7 +33,7 @@
#include "dv.h" #include "dv.h"
#include "dv_tablegen.h" #include "dv_tablegen.h"
static av_cold int dvvideo_init_encoder(AVCodecContext *avctx) static av_cold int dvvideo_encode_init(AVCodecContext *avctx)
{ {
if (!avpriv_dv_codec_profile(avctx)) { if (!avpriv_dv_codec_profile(avctx)) {
av_log(avctx, AV_LOG_ERROR, "Found no DV profile for %ix%i %s video. " av_log(avctx, AV_LOG_ERROR, "Found no DV profile for %ix%i %s video. "
@ -702,7 +702,7 @@ AVCodec ff_dvvideo_encoder = {
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_DVVIDEO, .id = AV_CODEC_ID_DVVIDEO,
.priv_data_size = sizeof(DVVideoContext), .priv_data_size = sizeof(DVVideoContext),
.init = dvvideo_init_encoder, .init = dvvideo_encode_init,
.encode2 = dvvideo_encode_frame, .encode2 = dvvideo_encode_frame,
.close = dvvideo_encode_close, .close = dvvideo_encode_close,
.capabilities = CODEC_CAP_SLICE_THREADS, .capabilities = CODEC_CAP_SLICE_THREADS,

View File

@ -80,8 +80,7 @@ static int vorbis_error_to_averror(int ov_err)
} }
} }
static av_cold int oggvorbis_init_encoder(vorbis_info *vi, static av_cold int oggvorbis_encode_init_internal(vorbis_info *vi, AVCodecContext *avctx)
AVCodecContext *avctx)
{ {
OggVorbisEncContext *s = avctx->priv_data; OggVorbisEncContext *s = avctx->priv_data;
double cfreq; double cfreq;
@ -200,7 +199,7 @@ static av_cold int oggvorbis_encode_init(AVCodecContext *avctx)
int ret; int ret;
vorbis_info_init(&s->vi); vorbis_info_init(&s->vi);
if ((ret = oggvorbis_init_encoder(&s->vi, avctx))) { if ((ret = oggvorbis_encode_init_internal(&s->vi, avctx))) {
av_log(avctx, AV_LOG_ERROR, "encoder setup failed\n"); av_log(avctx, AV_LOG_ERROR, "encoder setup failed\n");
goto error; goto error;
} }

View File

@ -31,7 +31,7 @@
#include "libavutil/intreadwrite.h" #include "libavutil/intreadwrite.h"
#include "libavutil/internal.h" #include "libavutil/internal.h"
static av_cold int raw_init_encoder(AVCodecContext *avctx) static av_cold int raw_encode_init(AVCodecContext *avctx)
{ {
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt); const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);
@ -75,6 +75,6 @@ AVCodec ff_rawvideo_encoder = {
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_RAWVIDEO, .id = AV_CODEC_ID_RAWVIDEO,
.priv_data_size = sizeof(AVFrame), .priv_data_size = sizeof(AVFrame),
.init = raw_init_encoder, .init = raw_encode_init,
.encode2 = raw_encode, .encode2 = raw_encode,
}; };