avdevice: remove usage of deprecated setter and getter functions
authorJames Almer <jamrial@gmail.com>
Sun, 29 Oct 2017 17:40:38 +0000 (14:40 -0300)
committerJames Almer <jamrial@gmail.com>
Sun, 29 Oct 2017 17:42:48 +0000 (14:42 -0300)
Signed-off-by: James Almer <jamrial@gmail.com>
libavdevice/avdevice.c
libavdevice/decklink_dec.cpp
libavdevice/libndi_newtek_dec.c

index 01c4692..72e1b67 100644 (file)
@@ -135,9 +135,9 @@ int avdevice_app_to_dev_control_message(struct AVFormatContext *s, enum AVAppToD
 int avdevice_dev_to_app_control_message(struct AVFormatContext *s, enum AVDevToAppMessageType type,
                                         void *data, size_t data_size)
 {
-    if (!av_format_get_control_message_cb(s))
+    if (!s->control_message_cb)
         return AVERROR(ENOSYS);
-    return av_format_get_control_message_cb(s)(s, type, data, data_size);
+    return s->control_message_cb(s, type, data, data_size);
 }
 
 int avdevice_capabilities_create(AVDeviceCapabilitiesQuery **caps, AVFormatContext *s,
index b4b9e02..e786dd8 100644 (file)
@@ -959,7 +959,7 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx)
 
     st->time_base.den      = ctx->bmd_tb_den;
     st->time_base.num      = ctx->bmd_tb_num;
-    av_stream_set_r_frame_rate(st, av_make_q(st->time_base.den, st->time_base.num));
+    st->r_frame_rate       = av_make_q(st->time_base.den, st->time_base.num));
 
     switch((BMDPixelFormat)cctx->raw_format) {
     case bmdFormat8BitYUV:
index 8cbcd9a..5bbaa39 100644 (file)
@@ -189,7 +189,7 @@ static int ndi_create_video_stream(AVFormatContext *avctx, NDIlib_video_frame_t
     }
 
     st->time_base                   = NDI_TIME_BASE_Q;
-    av_stream_set_r_frame_rate(st, av_make_q(v->frame_rate_N, v->frame_rate_D));
+    st->r_frame_rate                = av_make_q(v->frame_rate_N, v->frame_rate_D));
 
     tmp = av_mul_q(av_d2q(v->picture_aspect_ratio, INT_MAX), (AVRational){v->yres, v->xres});
     av_reduce(&st->sample_aspect_ratio.num, &st->sample_aspect_ratio.den, tmp.num, tmp.den, 1000);