- Posts: 2
- Joined: Fri Jan 03, 2020 9:55 am
- Real Name: Xuguang Wang
I fixed an audio bug of ffmpeg, but the problem still exists. the patch is
diff --git a/libavdevice/decklink_dec.cpp b/libavdevice/decklink_dec.cpp
index 4da9122..3db7bec 100644
--- a/libavdevice/decklink_dec.cpp
+++ b/libavdevice/decklink_dec.cpp
@@ -902,6 +902,10 @@ HRESULT decklink_input_callback::VideoInputFrameArrived(
pkt.stream_index = ctx->audio_st->index;
pkt.data = (uint8_t *)audioFrameBytes;
+ pkt.buf = av_buffer_create(pkt.data, pkt.size, decklink_object_free, audioFrame, 0);
+ if (pkt.buf)
+ audioFrame->AddRef();
+
if (avpacket_queue_put(&ctx->queue, &pkt) < 0) {
++ctx->dropped;
}