Opened 4 years ago

Closed 4 years ago

#1320 closed defect (fixed)

ffplay hang in avformat_find_stream_info

Reported by: qrtt1 Owned by:
Priority: important Component: avformat
Version: git-master Keywords: http
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

I try to play the streaming url:
./ffplay http://nextmedia-f.akamaihd.net/nexttvlive_1_300@49187

It stuck when invoke avformat_find_stream_info.

My ffplay is built from the latest source code: 4d3787763218de4c3e838b31f0fb2153b8d6af20

I verify it by adding log message:

diff --git a/ffplay.c b/ffplay.c
index 3c5ef68..050398b 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -2499,7 +2499,9 @@ static int read_thread(void *arg)
     opts = setup_find_stream_info_opts(ic, codec_opts);
     orig_nb_streams = ic->nb_streams;
 
+    fprintf(stderr, "before find info\n");
     err = avformat_find_stream_info(ic, opts);
+    fprintf(stderr, "after find info\n");
     if (err < 0) {
         fprintf(stderr, "%s: could not find codec parameters\n", is->filename);
         ret = -1;

Change History (4)

comment:1 Changed 4 years ago by cehoyos

  • Priority changed from normal to important
  • Reproduced by developer set
  • Status changed from new to open

The hang is reproducible.

$ ffplay http://nextmedia-f.akamaihd.net/nexttvlive_1_300@49187
ffplay version N-40763-gdfa988e Copyright (c) 2003-2012 the FFmpeg developers
  built on May 18 2012 12:57:17 with gcc 4.3.2
  configuration: --cc=/usr/local/gcc-4.3.2/bin/gcc --enable-gpl --enable-libopenjpeg --enable-libvorbis --enable-libspeex --enable-libmp3lame --enable-libtheora --extra-ldflags=-lm
  libavutil      51. 53.100 / 51. 53.100
  libavcodec     54. 21.101 / 54. 21.101
  libavformat    54.  5.100 / 54.  5.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 74.100 /  2. 74.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 11.100 /  0. 11.100
  libpostproc    52.  0.100 / 52.  0.100

comment:2 follow-up: Changed 4 years ago by Cigaes

Bogus server: the server pretends to support seeking, but in fact only skips the unwanted data at the rhythm it would have been sent; you would have to wait for 2 Go to have been skipped to look at the end of the file, and then probably watch it fail because it can not seek back to the beginning of the file.

http://ffmpeg.org/pipermail/ffmpeg-devel/2012-May/124787.html contains a patch that adds an option to disable seeking. You would use it like this: http,+seek+0++://nextmedia....

comment:3 in reply to: ↑ 2 Changed 4 years ago by qrtt1

Replying to Cigaes:

Bogus server: the server pretends to support seeking, but in fact only skips the unwanted data at the rhythm it would have been sent; you would have to wait for 2 Go to have been skipped to look at the end of the file, and then probably watch it fail because it can not seek back to the beginning of the file.

http://ffmpeg.org/pipermail/ffmpeg-devel/2012-May/124787.html contains a patch that adds an option to disable seeking. You would use it like this: http,+seek+0++://nextmedia....

Thanks for your patch. It works well now.

comment:4 Changed 4 years ago by cehoyos

  • Keywords http added
  • Resolution set to fixed
  • Status changed from open to closed

Fixed by Michael.

Note: See TracTickets for help on using tickets.