]> git.sesse.net Git - ffmpeg/commitdiff
avdevice/decklink: Suppress warning about misuse of struct instead of class
authorDevin Heitmueller <dheitmueller@ltnglobal.com>
Tue, 9 Jan 2018 01:16:56 +0000 (20:16 -0500)
committerMarton Balint <cus@passwd.hu>
Sat, 20 Jan 2018 17:38:29 +0000 (18:38 +0100)
When building with Clang, the following warning is shown:

warning: struct 'IDeckLinkVideoFrame' was previously declared as a
class [-Wmismatched-tags]

The function incorrectly casts IDeckLinkVideoFrame as a struct
instead of a class pointer.

Signed-off-by: Devin Heitmueller <dheitmueller@ltnglobal.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
libavdevice/decklink_enc.cpp

index c06ca4668f02568e4c08dc8c6e1533c6320b8ca0..89b03f2bd56487c8a41c8841ffb8fdce4edafd2c 100644 (file)
@@ -321,7 +321,7 @@ static int decklink_write_video_packet(AVFormatContext *avctx, AVPacket *pkt)
     pthread_mutex_unlock(&ctx->mutex);
 
     /* Schedule frame for playback. */
-    hr = ctx->dlo->ScheduleVideoFrame((struct IDeckLinkVideoFrame *) frame,
+    hr = ctx->dlo->ScheduleVideoFrame((class IDeckLinkVideoFrame *) frame,
                                       pkt->pts * ctx->bmd_tb_num,
                                       ctx->bmd_tb_num, ctx->bmd_tb_den);
     /* Pass ownership to DeckLink, or release on failure */