<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Nov 14, 2019 at 5:32 PM gga <<a href="mailto:ggarra13@gmail.com">ggarra13@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I am implementing rtmp reading into my viewer and have run into the <br>
unfortunate event that av_read_frame() hangs when reaching the end of <br>
the video being sent over the protocol. I was hoping it would return <br>
AVERROR_EOF or a timeout error, but none of the sort seems to happen. <br>
Thus, my viewer just hangs at the end of the video.<br>
<br>
I tested with ffplay and the same seems to happen there, where the <br>
window close button becomes ineffective.<br>
<br>
Is there any way around this?<br></blockquote><div><br></div><div>It sounds like you need to implement your own timeout. You can do that by setting an interrupt callback in the input format context, and checking in the callback to see if the timeout interval has passed. Search for "interrupt_callback" in the documentation for AVFormatContext. It's very general, and won't give you specific help with timing out, but it isn't hard to construct a timeout for yourself.</div><div><br></div><div>- Richard</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org" target="_blank">Libav-user@ffmpeg.org</a><br>
<a href="https://ffmpeg.org/mailman/listinfo/libav-user" rel="noreferrer" target="_blank">https://ffmpeg.org/mailman/listinfo/libav-user</a><br>
<br>
To unsubscribe, visit link above, or email<br>
<a href="mailto:libav-user-request@ffmpeg.org" target="_blank">libav-user-request@ffmpeg.org</a> with subject "unsubscribe".</blockquote></div></div>