diff mbox

[FFmpeg-devel,09/11] decklink: Suppress warning about misuse of struct instead of class

Message ID 20180109011658.72370-10-dheitmueller@ltnglobal.com
State Accepted
Commit 5409f065f2c48ad9c4baf787d08384176cbc62a4
Headers show

Commit Message

Devin Heitmueller Jan. 9, 2018, 1:16 a.m. UTC
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>
---
 libavdevice/decklink_enc.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Marton Balint Jan. 20, 2018, 6 p.m. UTC | #1
On Mon, 8 Jan 2018, Devin Heitmueller wrote:

> 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>
> ---
> libavdevice/decklink_enc.cpp | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

Thannks, applied.

Regards,
Marton
diff mbox

Patch

diff --git a/libavdevice/decklink_enc.cpp b/libavdevice/decklink_enc.cpp
index c39fc0e..5e4cf8a 100644
--- a/libavdevice/decklink_enc.cpp
+++ b/libavdevice/decklink_enc.cpp
@@ -530,7 +530,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 */