diff options
author | Uwe Klotz <uklotz@mixxx.org> | 2021-04-24 22:47:34 +0200 |
---|---|---|
committer | Uwe Klotz <uklotz@mixxx.org> | 2021-04-24 22:47:59 +0200 |
commit | 58ec10cf1ccc29860e33398317dcf94d95cd83cb (patch) | |
tree | afb36889dab23ac42c9d8b941d97eb360b68d2b4 /src/sources | |
parent | 193504789575fba1bbe7705c86a0a2b237481127 (diff) |
FFmpeg: Add debug assertion before invoking av_read_frame()
Diffstat (limited to 'src/sources')
-rw-r--r-- | src/sources/soundsourceffmpeg.cpp | 3 |
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, |