summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-06-26 20:50:15 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-06-26 20:50:15 +0000
commitb86f5a02ea105295eb018c762ae61b10b7fbcd0a (patch)
treeca827523cfd3fedfd6c70ad0abbe07c030446723 /ffmpeg.c
parentdce292bb35ddf44982f087fc651db23de568c7d0 (diff)
Register intrrupt_cb() early enough so we dont get stuck with tcp input
for example. Fixes issue66 Originally committed as revision 13992 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 371421de00..4c13bb5ed1 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3785,6 +3785,9 @@ int main(int argc, char **argv)
avdevice_register_all();
av_register_all();
+ if(isatty(STDIN_FILENO))
+ url_set_interrupt_cb(decode_interrupt_cb);
+
for(i=0; i<CODEC_TYPE_NB; i++){
avctx_opts[i]= avcodec_alloc_context2(i);
}