Commit 5845f005 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Prevent previous frame to be processed after restart on Android camera capture filter

parent aec61064
......@@ -492,6 +492,11 @@ static void android_camera2_capture_preprocess(MSFilter *f) {
ms_video_init_framerate_controller(&d->fpsControl, d->fps);
ms_video_init_average_fps(&d->averageFps, d->fps_context);
if (d->frame) {
freemsg(d->frame);
d->frame = NULL;
}
ms_filter_unlock(f);
}
......@@ -518,6 +523,11 @@ static void android_camera2_capture_postprocess(MSFilter *f) {
if (d->capturing) {
android_camera2_capture_stop(d);
}
if (d->frame) {
freemsg(d->frame);
d->frame = NULL;
}
ms_filter_unlock(f);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment