[FFmpeg-cvslog] sunrastenc: Properly load codec private options

Vittorio Giovara git at videolan.org
Wed Jan 27 17:51:18 CET 2016


ffmpeg | branch: master | Vittorio Giovara <vittorio.giovara at gmail.com> | Mon Jan  4 14:13:00 2016 +0100| [81737f42c28858dad76a40284a35f7a64faa2fc7] | committer: Vittorio Giovara

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.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=81737f42c28858dad76a40284a35f7a64faa2fc7
---

 libavcodec/sunrastenc.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavcodec/sunrastenc.c b/libavcodec/sunrastenc.c
index 411d184..3a5f410 100644
--- a/libavcodec/sunrastenc.c
+++ b/libavcodec/sunrastenc.c
@@ -27,6 +27,8 @@
 #include "sunrast.h"
 
 typedef struct SUNRASTContext {
+    AVClass *class;
+
     PutByteContext p;
     int depth;      ///< depth of pixel
     int length;     ///< length (bytes) of image
@@ -226,7 +228,7 @@ static const AVOption options[] = {
     { NULL },
 };
 
-static const AVClass utvideo_class = {
+static const AVClass sunrast_class = {
     .class_name = "sunrast",
     .item_name  = av_default_item_name,
     .option     = options,
@@ -246,6 +248,7 @@ AVCodec ff_sunrast_encoder = {
     .type           = AVMEDIA_TYPE_VIDEO,
     .id             = AV_CODEC_ID_SUNRAST,
     .priv_data_size = sizeof(SUNRASTContext),
+    .priv_class     = &sunrast_class,
     .init           = sunrast_encode_init,
     .encode2        = sunrast_encode_frame,
 #if FF_API_CODER_TYPE



More information about the ffmpeg-cvslog mailing list