Skip to content

Error frames still sent to display, causing video loop on signal loss #133

Description

@TheCryxh

I noticed that when the video signal degrades, the display loops through old frames instead of just freezing on the last good one. This is pretty dangerous and annoying.

Looking at the code in src/main.cpp, I saw that __FRAME_THREAD__ already checks for errinfo and discard flags (lines 332-344) and logs them, but then still sends those bad frames to the display anyway at line 351:

MppBuffer buffer = mpp_frame_get_buffer(frame);
if (buffer) {

Changing that to:

if (buffer && !errinfo && !discard) {

fixes it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions