summaryrefslogtreecommitdiffstats
path: root/src/sources
diff options
context:
space:
mode:
authorUwe Klotz <uklotz@mixxx.org>2021-04-24 22:47:34 +0200
committerUwe Klotz <uklotz@mixxx.org>2021-04-24 22:47:59 +0200
commit58ec10cf1ccc29860e33398317dcf94d95cd83cb (patch)
treeafb36889dab23ac42c9d8b941d97eb360b68d2b4 /src/sources
parent193504789575fba1bbe7705c86a0a2b237481127 (diff)
FFmpeg: Add debug assertion before invoking av_read_frame()
Diffstat (limited to 'src/sources')
-rw-r--r--src/sources/soundsourceffmpeg.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sources/soundsourceffmpeg.cpp b/src/sources/soundsourceffmpeg.cpp
index 94d2553fd7..4729191764 100644
--- a/src/sources/soundsourceffmpeg.cpp
+++ b/src/sources/soundsourceffmpeg.cpp
@@ -789,6 +789,9 @@ SINT readNextPacket(
AVPacket* pavPacket,
SINT flushFrameIndex) {
while (true) {
+ // The underlying buffer will be provided by av_read_frame()
+ // and is only borrowed until the next packet is read.
+ DEBUG_ASSERT(!pavPacket->buf);
const auto av_read_frame_result =
av_read_frame(
pavFormatContext,