[FFmpeg-trac] #5615(avformat:new): avformat_open_input on dead UDP source link hangs after interrupt_callback signaled exit
FFmpeg
trac at avcodec.org
Mon Jun 6 16:48:47 CEST 2016
#5615: avformat_open_input on dead UDP source link hangs after interrupt_callback
signaled exit
-------------------------------------+-------------------------------------
Reporter: Marlon | Type: defect
Status: new | Priority: normal
Component: avformat | Version: git-
Keywords: udp open | master
callback hang | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Udp source is not active.
After returning 1 from interrupt_callback (exit), avformat_open_input does
not return.
Using Win32 dll from Zeranoe on W10 64bit, Microsoft compiler
2015-05-22 Working
https://ffmpeg.zeranoe.com/builds/win32/shared/ffmpeg-20160522-git-
566be4f-win32-shared.7z
2015-05-25 Not working
https://ffmpeg.zeranoe.com/builds/win32/shared/ffmpeg-20160525-git-
9591ca7-win32-shared.7z
How to reproduce:
GetTickCount used can be any time function returning miliseconds.
{{{
unsigned long TimePrev=0;
//callback
static int cb_open(void *ctx)
{
//timeout after 3 seconds
if(GetTickCount() - TimePrev > 3000)
{
printf("---interrupt_cb: Exit\n");
return 1;
}
return 0;
}
void main()
{
avformat_network_init();
AVFormatContext *pFmtCtx = avformat_alloc_context();
pFmtCtx->interrupt_callback.callback = cb_open;
pFmtCtx->interrupt_callback.opaque = 0;
const char *url="udp://127.0.0.1:8000";
printf("avformat_open_input %s\n", url);
TimePrev=GetTickCount();
int nRet=avformat_open_input(&pFmtCtx, url, NULL, NULL);
//here never called
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/5615>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list