avdevice: Use av_format_get_control_message_cb()

This is required as the location of this field could change and is
specified in libavformat not avdevice

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ba97cf2c45)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer
2015-01-16 02:10:35 +01:00
parent 43924a8e99
commit 416501da1a

View File

@@ -134,9 +134,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, int avdevice_dev_to_app_control_message(struct AVFormatContext *s, enum AVDevToAppMessageType type,
void *data, size_t data_size) void *data, size_t data_size)
{ {
if (!s->control_message_cb) if (!av_format_get_control_message_cb(s))
return AVERROR(ENOSYS); return AVERROR(ENOSYS);
return s->control_message_cb(s, type, data, data_size); return av_format_get_control_message_cb(s)(s, type, data, data_size);
} }
int avdevice_capabilities_create(AVDeviceCapabilitiesQuery **caps, AVFormatContext *s, int avdevice_capabilities_create(AVDeviceCapabilitiesQuery **caps, AVFormatContext *s,