[Libav-user] av_read_frame() hangup (no timeout)
bsenftner at earthlink.net
bsenftner at earthlink.net
Thu Apr 22 16:29:04 EEST 2021
Are you looking for this?
https://gist.github.com/bsenftner/ba3d493fa36b0b201ffd995e8c2c60a2
That's the modification to av_read_frame() for detecting an unexpected stream termination.
-Blake Senftner
-----Original Message-----
From: Libav-user <libav-user-bounces at ffmpeg.org> On Behalf Of Paul B Mahol
Sent: Sunday, November 17, 2019 3:35 AM
To: This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter. <libav-user at ffmpeg.org>
Subject: Re: [Libav-user] av_read_frame() hangup (no timeout)
On 11/16/19, bsenftner at earthlink.net <bsenftner at earthlink.net> wrote:
>
>
>>I am implementing rtmp reading into my viewer and have run into the
>>unfortunate event that av_read_frame() hangs when reaching the end of
>>the video being sent over the protocol. I was hoping it would return
>>AVERROR_EOF or a timeout error, but none of the sort seems to happen.
>>Thus, my viewer just hangs at the end of the video.
>>
>>I tested with ffplay and the same seems to happen there, where the
>>window close button becomes ineffective.
>>
>
> Please take a look at this:
> https://ffmpeg.org/pipermail/libav-user/2017-February/010086.html
>
> It is a 5 line addition to libavformat/utils.c that adds an
> av_read_frame() I/O callback.
> I added this a few years ago to my local ffmpeg compile, tried to get
> it adopted by the official ffmpeg dev maintainers, but they felt it
> was (incorrectly, IMHO) too specific to streaming playback.
Where is such statement?
> My company uses this av_read_frame()callback to identify when a
> network stream unexpectedly terminates, often caused by someone
> turning off or tripping over a security camera cable.
>
>
> -Blake Senftner, geek.
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/libav-user
>
> To unsubscribe, visit link above, or email
> libav-user-request at ffmpeg.org with subject "unsubscribe".
_______________________________________________
Libav-user mailing list
Libav-user at ffmpeg.org
https://ffmpeg.org/mailman/listinfo/libav-user
To unsubscribe, visit link above, or email libav-user-request at ffmpeg.org with subject "unsubscribe".
More information about the Libav-user
mailing list