Browse Source

avdevice: remove usage of deprecated setter and getter functions

Signed-off-by: James Almer <jamrial@gmail.com>
James Almer 7 years ago
parent
commit
2245476e5c
3 changed files with 4 additions and 4 deletions
  1. 2 2
      libavdevice/avdevice.c
  2. 1 1
      libavdevice/decklink_dec.cpp
  3. 1 1
      libavdevice/libndi_newtek_dec.c

+ 2 - 2
libavdevice/avdevice.c

@@ -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,

+ 1 - 1
libavdevice/decklink_dec.cpp

@@ -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:

+ 1 - 1
libavdevice/libndi_newtek_dec.c

@@ -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);