Benoit Fouet <[EMAIL PROTECTED]> added the comment:

Benjamin Larsson wrote:
> Benjamin Larsson <[EMAIL PROTECTED]> added the comment:
>
> Sebastian Jansson wrote:
>   
>> New submission from Sebastian Jansson <[EMAIL PROTECTED]>:
>>
>> I'm using ffmpeg as a lib to receive an udp stream via multicast. That works
>> fine when there is a stream. But when I try to connect to an unavailable
>> ipadress:port it just locks and wait for an connection.
>>   
>>     
>
> Same effect under Linux:
>
> [...]
>
> I think the bt is from the wrong thread.
>
>   

I reproduced it too, here is my gdb backtrace:

gdb --args ffplay_g udp://235.2.2.2:5000
GNU gdb 6.7.1
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) r
Starting program: /home/bfouet/env/open_sources/ffmpeg/ffplay_g
udp://235.2.2.2:5000
[Thread debugging using libthread_db enabled]
[New Thread 0xb77fe6c0 (LWP 2077)]
FFplay version SVN-r14261, Copyright (c) 2003-2008 Fabrice Bellard, et al.
  configuration: --cc=gcc-4.1.2 --prefix=/usr --enable-gpl
--enable-libmp3lame --enable-libxvid --enable-libvorbis --enable-libx264
--enable-libfaad --enable-libfaac --enable-libamr-nb --enable-libamr-wb
--enable-libtheora --enable-liba52 --enable-x11grab --enable-nonfree
--enable-pthreads
  libavutil version: 49.7.0
  libavcodec version: 51.60.0
  libavformat version: 52.17.0
  libavdevice version: 52.0.0
  built on Jul 17 2008 15:14:17, gcc: 4.1.2 (Gentoo 4.1.2 p1.0.2)
[New Thread 0xb77eeb90 (LWP 2080)]
[New Thread 0xb6f66b90 (LWP 2081)]

Program received signal SIGINT, Interrupt.
[Switching to Thread 0xb77fe6c0 (LWP 2077)]
0xffffe410 in __kernel_vsyscall ()
(gdb) thread apply all bt

Thread 3 (Thread 0xb6f66b90 (LWP 2081)):
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb79612b8 in recv () from /lib/libpthread.so.0
#2  0x080da8a6 in udp_read (h=0x876a840, buf=0x876af88
"�\024\225��\024\225�\200�v\b\200�v\b", size=2048) at libavformat/udp.c:445
#3  0x08075252 in get_buffer (s=0x876af30, buf=0x876af88
"�\024\225��\024\225�\200�v\b\200�v\b", size=2048) at
libavformat/aviobuf.c:378
#4  0x08070349 in av_open_input_file (ic_ptr=0xb6f66394,
filename=0xb6fed740 "udp://235.2.2.2:5000", fmt=0x0, buf_size=0,
ap=0xb6f6634c)
    at libavformat/utils.c:483
#5  0x08063291 in decode_thread (arg=0xb6f67020) at ffplay.c:1905
#6  0xb7981d4b in SDL_RunThread () from /usr/lib/libSDL-1.2.so.0
#7  0xb79bb52d in ?? () from /usr/lib/libSDL-1.2.so.0
#8  0x087698c8 in ?? ()
#9  0xb7969ff4 in ?? () from /lib/libpthread.so.0
#10 0xb6f664b8 in ?? ()
#11 0xb795a4e1 in start_thread () from /lib/libpthread.so.0
Backtrace stopped: frame did not save the PC

Thread 2 (Thread 0xb77eeb90 (LWP 2080)):
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7961796 in nanosleep () from /lib/libpthread.so.0
#2  0xb79be28a in SDL_Delay () from /usr/lib/libSDL-1.2.so.0
#3  0xb797da3c in ?? () from /usr/lib/libSDL-1.2.so.0
#4  0x00000001 in ?? ()
#5  0xb79c4688 in ?? () from /usr/lib/libSDL-1.2.so.0
#6  0xb77ee3c8 in ?? ()
#7  0xb7981d4b in SDL_RunThread () from /usr/lib/libSDL-1.2.so.0
Backtrace stopped: frame did not save the PC

Thread 1 (Thread 0xb77fe6c0 (LWP 2077)):
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7961796 in nanosleep () from /lib/libpthread.so.0
#2  0xb79be28a in SDL_Delay () from /usr/lib/libSDL-1.2.so.0
#3  0xb797e14c in SDL_WaitEvent () from /usr/lib/libSDL-1.2.so.0
#4  0x08063d8f in main (argc=0, argv=0x42b724) at ffplay.c:2246

and, for the record, it works as expected when I launch:
$ ./ffplay_g udp://235.2.2.2:500
[...]
dp://235.2.2.2:500: I/O error occurred
Usually that means that input file is truncated and/or corrupted.

----------
title: ffmpeg stalls when trying to play udp stream from an     unavaible 
adress. -> ffmpeg stalls when trying to play udp stream from an unavaible 
adress.

______________________________________________________
FFmpeg issue tracker <[EMAIL PROTECTED]>
<https://roundup.mplayerhq.hu/roundup/ffmpeg/issue539>
______________________________________________________

Reply via email to