]> git.sesse.net Git - ffmpeg/commitdiff
avdevice/decklink_enc: simplify usage of buffercount type
authorMarton Balint <cus@passwd.hu>
Thu, 8 Oct 2020 21:12:24 +0000 (23:12 +0200)
committerMarton Balint <cus@passwd.hu>
Thu, 3 Dec 2020 17:32:57 +0000 (18:32 +0100)
Also remove some leftover declaration of CreateDeckLinkIteratorInstance().

Signed-off-by: Marton Balint <cus@passwd.hu>
libavdevice/decklink_common.h
libavdevice/decklink_enc.cpp

index 05380ef76d3e26d774708d05c6fe0b3908641e74..e49d9d54ad03ebde6f70ad6277aef7f72138c8b5 100644 (file)
@@ -155,13 +155,6 @@ struct decklink_ctx {
 
 typedef enum { DIRECTION_IN, DIRECTION_OUT} decklink_direction_t;
 
-#ifdef _WIN32
-typedef unsigned int buffercount_type;
-IDeckLinkIterator *CreateDeckLinkIteratorInstance(void);
-#else
-typedef uint32_t buffercount_type;
-#endif
-
 static const BMDPixelFormat decklink_raw_format_map[] = {
     (BMDPixelFormat)0,
     bmdFormat8BitYUV,
index 883fdeadfb86aefb5da8c0fd0fa84a6499449123..ee341111ce4b49a361a1219260e472137d70f35d 100644 (file)
@@ -436,7 +436,7 @@ static int decklink_write_video_packet(AVFormatContext *avctx, AVPacket *pkt)
     AVFrame *avframe = NULL, *tmp = (AVFrame *)pkt->data;
     AVPacket *avpacket = NULL;
     decklink_frame *frame;
-    buffercount_type buffered;
+    uint32_t buffered;
     HRESULT hr;
 
     if (st->codecpar->codec_id == AV_CODEC_ID_WRAPPED_AVFRAME) {
@@ -525,7 +525,7 @@ static int decklink_write_audio_packet(AVFormatContext *avctx, AVPacket *pkt)
     struct decklink_cctx *cctx = (struct decklink_cctx *)avctx->priv_data;
     struct decklink_ctx *ctx = (struct decklink_ctx *)cctx->ctx;
     int sample_count = pkt->size / (ctx->channels << 1);
-    buffercount_type buffered;
+    uint32_t buffered;
 
     ctx->dlo->GetBufferedAudioSampleFrameCount(&buffered);
     if (pkt->pts > 1 && !buffered)