mirror of https://git.ffmpeg.org/ffmpeg.git
sunrastenc: Properly load codec private options
Initialize the private class field and give the class a more appropriate name. Add a class member to the codec context.
This commit is contained in:
parent
46350db737
commit
81737f42c2
|
@ -27,6 +27,8 @@
|
||||||
#include "sunrast.h"
|
#include "sunrast.h"
|
||||||
|
|
||||||
typedef struct SUNRASTContext {
|
typedef struct SUNRASTContext {
|
||||||
|
AVClass *class;
|
||||||
|
|
||||||
PutByteContext p;
|
PutByteContext p;
|
||||||
int depth; ///< depth of pixel
|
int depth; ///< depth of pixel
|
||||||
int length; ///< length (bytes) of image
|
int length; ///< length (bytes) of image
|
||||||
|
@ -226,7 +228,7 @@ static const AVOption options[] = {
|
||||||
{ NULL },
|
{ NULL },
|
||||||
};
|
};
|
||||||
|
|
||||||
static const AVClass utvideo_class = {
|
static const AVClass sunrast_class = {
|
||||||
.class_name = "sunrast",
|
.class_name = "sunrast",
|
||||||
.item_name = av_default_item_name,
|
.item_name = av_default_item_name,
|
||||||
.option = options,
|
.option = options,
|
||||||
|
@ -246,6 +248,7 @@ AVCodec ff_sunrast_encoder = {
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_SUNRAST,
|
.id = AV_CODEC_ID_SUNRAST,
|
||||||
.priv_data_size = sizeof(SUNRASTContext),
|
.priv_data_size = sizeof(SUNRASTContext),
|
||||||
|
.priv_class = &sunrast_class,
|
||||||
.init = sunrast_encode_init,
|
.init = sunrast_encode_init,
|
||||||
.encode2 = sunrast_encode_frame,
|
.encode2 = sunrast_encode_frame,
|
||||||
#if FF_API_CODER_TYPE
|
#if FF_API_CODER_TYPE
|
||||||
|
|
Loading…
Reference in New Issue