]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/libvo-amrwbenc.c
Check AVCodec.pix_fmts in avcodec_open2()
[ffmpeg] / libavcodec / libvo-amrwbenc.c
index b3615ede4211ae57b820e2874dba0d7cb3668863..5214ee6d2e3043ddb042c52d79702b65beb89dab 100644 (file)
@@ -34,7 +34,7 @@ typedef struct AMRWBContext {
 } AMRWBContext;
 
 static const AVOption options[] = {
-    { "dtx", "Allow DTX (generate comfort noise)", offsetof(AMRWBContext, allow_dtx), FF_OPT_TYPE_INT, 0, 0, 1, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM },
+    { "dtx", "Allow DTX (generate comfort noise)", offsetof(AMRWBContext, allow_dtx), AV_OPT_TYPE_INT, { 0 }, 0, 1, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM },
     { NULL }
 };
 
@@ -118,17 +118,15 @@ static int amr_wb_encode_frame(AVCodecContext *avctx,
 }
 
 AVCodec ff_libvo_amrwbenc_encoder = {
-    "libvo_amrwbenc",
-    AVMEDIA_TYPE_AUDIO,
-    CODEC_ID_AMR_WB,
-    sizeof(AMRWBContext),
-    amr_wb_encode_init,
-    amr_wb_encode_frame,
-    amr_wb_encode_close,
-    NULL,
+    .name           = "libvo_amrwbenc",
+    .type           = AVMEDIA_TYPE_AUDIO,
+    .id             = CODEC_ID_AMR_WB,
+    .priv_data_size = sizeof(AMRWBContext),
+    .init           = amr_wb_encode_init,
+    .encode         = amr_wb_encode_frame,
+    .close          = amr_wb_encode_close,
     .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE},
     .long_name = NULL_IF_CONFIG_SMALL("Android VisualOn Adaptive Multi-Rate "
                                       "(AMR) Wide-Band"),
     .priv_class = &class,
 };
-