[FFmpeg-cvslog] avdevice/decklink_enc: simplify usage of buffercount type
Marton Balint
git at videolan.org
Thu Dec 3 19:57:09 EET 2020
ffmpeg | branch: master | Marton Balint <cus at passwd.hu> | Thu Oct 8 23:12:24 2020 +0200| [acaf6c625bb1961565d43284e922a038b38f735d] | committer: Marton Balint
avdevice/decklink_enc: simplify usage of buffercount type
Also remove some leftover declaration of CreateDeckLinkIteratorInstance().
Signed-off-by: Marton Balint <cus at passwd.hu>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=acaf6c625bb1961565d43284e922a038b38f735d
---
libavdevice/decklink_common.h | 7 -------
libavdevice/decklink_enc.cpp | 4 ++--
2 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/libavdevice/decklink_common.h b/libavdevice/decklink_common.h
index 05380ef76d..e49d9d54ad 100644
--- a/libavdevice/decklink_common.h
+++ b/libavdevice/decklink_common.h
@@ -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,
diff --git a/libavdevice/decklink_enc.cpp b/libavdevice/decklink_enc.cpp
index 883fdeadfb..ee341111ce 100644
--- a/libavdevice/decklink_enc.cpp
+++ b/libavdevice/decklink_enc.cpp
@@ -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)
More information about the ffmpeg-cvslog
mailing list