Skip to content

RTSP stream hangs on camera going offline - #25

Open
magistrser wants to merge 2 commits into
LukasBommes:masterfrom
magistrser:fix-hanging
Open

RTSP stream hangs on camera going offline#25
magistrser wants to merge 2 commits into
LukasBommes:masterfrom
magistrser:fix-hanging

Conversation

@magistrser

Copy link
Copy Markdown

Also when camera returns stream still hangs. I debugged it a little and find out that for

avcodec_decode_video2(this->video_dec_ctx, this->frame, &got_frame, &(this->packet));

got_frame still be 1 even if avcodec_decode_video2 returns 0. It leads to infinity loop in grab function.
I hope this fix is good enough, or may be you know the right way to fix it

@LukasBommes

LukasBommes commented Oct 27, 2024

Copy link
Copy Markdown
Owner

Thanks a lot for your contribution, @magistrser! Due to limited time available I did not include this in the 1.1.0 release but will hopefully find the time to have a look at this soon and included it in the next release.

@LukasBommes

Copy link
Copy Markdown
Owner

I never merged this because I could not accurately reproduce the issue du to lack of a real RTSP source. If anyone runs into the same issue and finds that this PR correctly solves the issues please leave a comment. I can then merge it more confidently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants