[FFmpeg-trac] #666(FFmpeg:new): ffmpeg crashes, when input is /dev/zero

FFmpeg trac at avcodec.org
Fri Nov 18 06:57:50 CET 2011


#666: ffmpeg crashes, when input is /dev/zero
----------------------------------+---------------------------------
               Reporter:  mi      |                  Owner:  michael
                   Type:  defect  |                 Status:  new
               Priority:  normal  |              Component:  FFmpeg
                Version:  0.8.6   |               Keywords:
             Blocked By:          |               Blocking:
Reproduced by developer:  0       |  Analyzed by developer:  0
----------------------------------+---------------------------------
 It seems bizarre to me, but [http://tovid.wikia.com/wiki/Tovid_Wiki tovid]
 (a DVD-authoring tool) invokes ffmpeg with input set to /dev/zero in order
 to obtain a silent audio-file of a certain duration. The actual command
 line reads:

 {{{
 ffmpeg -f s16le -i /dev/zero -ac 2 -ar 48000 -ab 224k -t 4 -acodec ac3 -y
 audio.ac3
 }}}

 This must've worked before -- and, likely, continues to work for the tovid
 developers, but ffmpeg-0.7.7 as well as 0.8.6 crash with a floating-point
 error (SIGFPE), because of an attempt to divide by zero:

 {{{
 Program received signal SIGFPE, Arithmetic exception.
 [Switching to Thread 8078041c0 (LWP 100795/initial thread)]
 0x0000000000408e7c in output_packet (ist=0x807df98a0, ist_index=0,
 ost_table=0x8078660e0, nb_ostreams=1, pkt=0x7fffffffe100)
     at ffmpeg.c:1600
 1600                    ist->next_pts += ((int64_t)AV_TIME_BASE/bps *
 decoded_data_size) /
 (gdb) l
 1595                    if (!got_output) {
 1596                        /* no audio frame */
 1597                        continue;
 1598                    }
 1599                    decoded_data_buf = (uint8_t *)samples;
 1600                    ist->next_pts += ((int64_t)AV_TIME_BASE/bps *
 decoded_data_size) /
 1601                        (ist->st->codec->sample_rate *
 ist->st->codec->channels);
 1602                    break;}
 1603                case AVMEDIA_TYPE_VIDEO:
 1604                        decoded_data_size = (ist->st->codec->width *
 ist->st->codec->height * 3) / 2;
 (gdb) p ist->st->codec->sample_rate
 $1 = 0
 }}}

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/666>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list