#5615(avformat:new): avformat_open_input on dead UDP source link hangs after interrupt_callback signaled exit
#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
#5615: avformat_open_input on dead UDP source link hangs after interrupt_callback signaled exit -------------------------------------+------------------------------------- Reporter: Marlon | Owner: Type: defect | Status: new Priority: normal | Component: avformat Version: git-master | Resolution: Keywords: udp open | Blocked By: callback hang | Reproduced by developer: 0 Blocking: | Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by superware): Can a developer please check this (old) defect? it's very easy to reproduce... Thanks! -- Ticket URL: <https://trac.ffmpeg.org/ticket/5615#comment:1> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5615: avformat_open_input on dead UDP source link hangs after interrupt_callback signaled exit -------------------------------------+------------------------------------- Reporter: Marlon | Owner: Type: defect | Status: new Priority: normal | Component: avformat Version: git-master | Resolution: Keywords: udp open | Blocked By: callback hang | Reproduced by developer: 0 Blocking: | Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by cehoyos): Replying to [comment:1 superware]:
Can a developer please check this (old) defect?
it's very easy to reproduce...
How can the issue be reproduced? -- Ticket URL: <https://trac.ffmpeg.org/ticket/5615#comment:2> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5615: avformat_open_input on dead UDP source link hangs after interrupt_callback signaled exit ------------------------------------+------------------------------------ Reporter: Marlon | Owner: Type: defect | Status: new Priority: normal | Component: avformat Version: git-master | Resolution: Keywords: udp | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ------------------------------------+------------------------------------ Changes (by cehoyos): * keywords: udp open callback hang => udp -- Ticket URL: <https://trac.ffmpeg.org/ticket/5615#comment:3> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5615: avformat_open_input on dead UDP source link hangs after interrupt_callback signaled exit ------------------------------------+------------------------------------ Reporter: Marlon | Owner: Type: defect | Status: new Priority: normal | Component: avformat Version: git-master | Resolution: Keywords: udp | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ------------------------------------+------------------------------------ Comment (by superware): Replying to [comment:2 cehoyos]:
How can the issue be reproduced?
Hi cehoyos, Simply open a non-existing UDP stream, such as "udp://127.0.0.1:8000", and avformat_open_input will hang even if the interrupt_callback.callback returns 1 ("During blocking operations, callback is called with opaque as parameter. If the callback returns 1, the blocking operation will be aborted."). Actually all the details and code are supplied by Marlon above. Thank you in advance. -- Ticket URL: <https://trac.ffmpeg.org/ticket/5615#comment:4> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5615: avformat_open_input on dead UDP source link hangs after interrupt_callback signaled exit ------------------------------------+------------------------------------ Reporter: Marlon | Owner: Type: defect | Status: new Priority: normal | Component: avformat Version: git-master | Resolution: Keywords: udp | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ------------------------------------+------------------------------------ Comment (by superware): Replying to [comment:2 cehoyos]:
How can the issue be reproduced?
Hi cehoyos, have you managed to reproduce the bug? Thanks! -- Ticket URL: <https://trac.ffmpeg.org/ticket/5615#comment:5> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5615: avformat_open_input on dead UDP source link hangs after interrupt_callback signaled exit ------------------------------------+------------------------------------ Reporter: Marlon | Owner: Type: defect | Status: new Priority: normal | Component: avformat Version: git-master | Resolution: Keywords: udp | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ------------------------------------+------------------------------------ Comment (by superware): Marlon, do you have any new information regarding this issue? -- Ticket URL: <https://trac.ffmpeg.org/ticket/5615#comment:6> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5615: avformat_open_input on dead UDP source link hangs after interrupt_callback signaled exit -------------------------------------+------------------------------------- Reporter: Marlon | Owner: Type: defect | Status: new Priority: important | Component: avformat Version: git-master | Resolution: Keywords: udp | Blocked By: regression | Reproduced by developer: 0 Blocking: | Analyzed by developer: 0 | -------------------------------------+------------------------------------- Changes (by cehoyos): * keywords: udp => udp regression * priority: normal => important Comment: Which change introduced the regression? -- Ticket URL: <https://trac.ffmpeg.org/ticket/5615#comment:7> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5615: avformat_open_input on dead UDP source link hangs after interrupt_callback signaled exit -------------------------------------+------------------------------------- Reporter: Marlon | Owner: Type: defect | Status: new Priority: important | Component: avformat Version: git-master | Resolution: Keywords: udp | Blocked By: regression | Reproduced by developer: 0 Blocking: | Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by superware): Thanks cehoyos. Well, it seems Marlon found ffmpeg-20160522-git-566be4f-win32-shared.7z working but ffmpeg-20160525-git-9591ca7-win32-shared.7z not. -- Ticket URL: <https://trac.ffmpeg.org/ticket/5615#comment:8> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5615: avformat_open_input on dead UDP source link hangs after interrupt_callback signaled exit -------------------------------------+------------------------------------- Reporter: Marlon | Owner: Type: defect | Status: new Priority: important | Component: avformat Version: git-master | Resolution: Keywords: udp | Blocked By: regression | Reproduced by developer: 0 Blocking: | Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by cehoyos): Which of the 19 commits between 566be4f and 9591ca7 caused the regression? -- Ticket URL: <https://trac.ffmpeg.org/ticket/5615#comment:9> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5615: avformat_open_input on dead UDP source link hangs after interrupt_callback signaled exit -------------------------------------+------------------------------------- Reporter: Marlon | Owner: Type: defect | Status: new Priority: important | Component: avformat Version: git-master | Resolution: Keywords: udp | Blocked By: regression | Reproduced by developer: 0 Blocking: | Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by superware): I'm not sure. Have you managed to reproduce? -- Ticket URL: <https://trac.ffmpeg.org/ticket/5615#comment:10> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5615: avformat_open_input on dead UDP source link hangs after interrupt_callback signaled exit -------------------------------------+------------------------------------- Reporter: Marlon | Owner: Type: defect | Status: new Priority: important | Component: avformat Version: git-master | Resolution: Keywords: udp | Blocked By: regression | Reproduced by developer: 0 Blocking: | Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by cehoyos): How can the issue be reproduced? -- Ticket URL: <https://trac.ffmpeg.org/ticket/5615#comment:11> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5615: avformat_open_input on dead UDP source link hangs after interrupt_callback signaled exit -------------------------------------+------------------------------------- Reporter: Marlon | Owner: Type: defect | Status: new Priority: important | Component: avformat Version: git-master | Resolution: Keywords: udp | Blocked By: regression | Reproduced by developer: 0 Blocking: | Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by superware): Please see Marlon's code snippet in the description. -- Ticket URL: <https://trac.ffmpeg.org/ticket/5615#comment:12> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5615: avformat_open_input on dead UDP source link hangs after interrupt_callback signaled exit -------------------------------------+------------------------------------- Reporter: Marlon | Owner: Type: defect | Status: new Priority: important | Component: avformat Version: git-master | Resolution: Keywords: udp | Blocked By: regression | Reproduced by developer: 0 Blocking: | Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by Marlon): This issue is fixed in version 4.0.2 or earlier. I have just tested 32 and 64-bit versions from Zeranoe builds: https://ffmpeg.zeranoe.com/builds/win32/dev/ffmpeg-4.0.2-win32-dev.zip https://ffmpeg.zeranoe.com/builds/win64/dev/ffmpeg-4.0.2-win64-dev.zip on Windows 7 and 10 and it's OK. Thanks! -- Ticket URL: <https://trac.ffmpeg.org/ticket/5615#comment:13> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5615: avformat_open_input on dead UDP source link hangs after interrupt_callback signaled exit -------------------------------------+------------------------------------- Reporter: Marlon | Owner: Type: defect | Status: closed Priority: important | Component: avformat Version: git-master | Resolution: fixed Keywords: udp | Blocked By: regression | Reproduced by developer: 0 Blocking: | Analyzed by developer: 0 | -------------------------------------+------------------------------------- Changes (by Marlon): * status: new => closed * resolution: => fixed -- Ticket URL: <https://trac.ffmpeg.org/ticket/5615#comment:14> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
participants (1)
-
FFmpeg