Bug 1961723 [Linux] Invalidate FFmpeg frames if video stream is sought r=alwu

During seek FFmpeg may allocate new dmabuf frames so we need to remove ffmpeg ID's and allocate new surfaces.

Differential Revision: https://phabricator.services.mozilla.com/D248227
This commit is contained in:
stransky
2025-05-13 08:26:17 +00:00
committed by stransky@redhat.com
parent 94066e709f
commit 388084e23c

View File

@@ -1756,6 +1756,11 @@ FFmpegVideoDecoder<LIBAV_VER>::ProcessFlush() {
#if LIBAVCODEC_VERSION_MAJOR < 58 #if LIBAVCODEC_VERSION_MAJOR < 58
mPtsContext.Reset(); mPtsContext.Reset();
mDurationMap.Clear(); mDurationMap.Clear();
#endif
#if defined(MOZ_USE_HWDECODE) && defined(MOZ_WIDGET_GTK)
if (mVideoFramePool) {
mVideoFramePool->FlushFFmpegFrames();
}
#endif #endif
mPerformanceRecorder.Record(std::numeric_limits<int64_t>::max()); mPerformanceRecorder.Record(std::numeric_limits<int64_t>::max());
return FFmpegDataDecoder::ProcessFlush(); return FFmpegDataDecoder::ProcessFlush();