Re: [FFmpeg-devel] [PATCH 1/3] ffmpeg: modify tty state when stderr is redirected

2015-10-11 Thread Ronald S. Bultje
Hi,

On Fri, Jul 31, 2015 at 8:36 AM, Ganesh Ajjanagadde 
wrote:

> Removes unnecessary isatty(), fixes Ticket2964
>
> Signed-off-by: Ganesh Ajjanagadde 
> ---
>  ffmpeg.c | 8 +---
>  1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/ffmpeg.c b/ffmpeg.c
> index 5575e2f..fe250e5 100644
> --- a/ffmpeg.c
> +++ b/ffmpeg.c
> @@ -32,14 +32,12 @@
>  #include 
>  #include 
>
> -#if HAVE_ISATTY
>  #if HAVE_IO_H
>  #include 
>  #endif
>  #if HAVE_UNISTD_H
>  #include 
>  #endif
> -#endif
>
>  #include "libavformat/avformat.h"
>  #include "libavdevice/avdevice.h"
> @@ -370,11 +368,7 @@ void term_init(void)
>  #if HAVE_TERMIOS_H
>  if(!run_as_daemon){
>  struct termios tty;
> -int istty = 1;
> -#if HAVE_ISATTY
> -istty = isatty(0) && isatty(2);
> -#endif
> -if (istty && tcgetattr (0, ) == 0) {
> +if (tcgetattr (0, ) == 0) {
>  oldtty = tty;
>  restore_tty = 1;
>
> --
> 2.5.0


Pushed.

Ronald
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/3] ffmpeg: modify tty state when stderr is redirected

2015-10-11 Thread Ganesh Ajjanagadde
On Sun, Oct 11, 2015 at 5:45 PM, Ronald S. Bultje  wrote:
> Hi,
>
> On Fri, Jul 31, 2015 at 8:36 AM, Ganesh Ajjanagadde 
> wrote:
>>
>> Removes unnecessary isatty(), fixes Ticket2964
>>
>> Signed-off-by: Ganesh Ajjanagadde 
>>
>> ---
>>  ffmpeg.c | 8 +---
>>  1 file changed, 1 insertion(+), 7 deletions(-)
>>
>> diff --git a/ffmpeg.c b/ffmpeg.c
>> index 5575e2f..fe250e5 100644
>> --- a/ffmpeg.c
>> +++ b/ffmpeg.c
>> @@ -32,14 +32,12 @@
>>  #include 
>>  #include 
>>
>> -#if HAVE_ISATTY
>>  #if HAVE_IO_H
>>  #include 
>>  #endif
>>  #if HAVE_UNISTD_H
>>  #include 
>>  #endif
>> -#endif
>>
>>  #include "libavformat/avformat.h"
>>  #include "libavdevice/avdevice.h"
>> @@ -370,11 +368,7 @@ void term_init(void)
>>  #if HAVE_TERMIOS_H
>>  if(!run_as_daemon){
>>  struct termios tty;
>> -int istty = 1;
>> -#if HAVE_ISATTY
>> -istty = isatty(0) && isatty(2);
>> -#endif
>> -if (istty && tcgetattr (0, ) == 0) {
>> +if (tcgetattr (0, ) == 0) {
>>  oldtty = tty;
>>  restore_tty = 1;
>>
>> --
>> 2.5.0
>
>
> Pushed.

Thanks for bearing with my repeated pinging over a few months
regarding this patch. Ticket 2964 can finally be closed.

>
> Ronald
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/3] ffmpeg: modify tty state when stderr is redirected

2015-10-10 Thread Ganesh Ajjanagadde
On Sat, Oct 3, 2015 at 4:43 PM, Ganesh Ajjanagadde  wrote:
> ping

Please note that I am pasting the patch here as a reference, it may be
mangled by gmail:

Removes unnecessary isatty(), fixes Ticket2964

Signed-off-by: Ganesh Ajjanagadde 
---
 ffmpeg.c | 8 +---
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index 5575e2f..fe250e5 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -32,14 +32,12 @@
 #include 
 #include 

-#if HAVE_ISATTY
 #if HAVE_IO_H
 #include 
 #endif
 #if HAVE_UNISTD_H
 #include 
 #endif
-#endif

 #include "libavformat/avformat.h"
 #include "libavdevice/avdevice.h"
@@ -370,11 +368,7 @@ void term_init(void)
 #if HAVE_TERMIOS_H
 if(!run_as_daemon){
 struct termios tty;
-int istty = 1;
-#if HAVE_ISATTY
-istty = isatty(0) && isatty(2);
-#endif
-if (istty && tcgetattr (0, ) == 0) {
+if (tcgetattr (0, ) == 0) {
 oldtty = tty;
 restore_tty = 1;

Actual patch itself:
https://ffmpeg.org/pipermail/ffmpeg-devel/2015-July/176481.html

Ping once more.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/3] ffmpeg: modify tty state when stderr is redirected

2015-10-03 Thread Ganesh Ajjanagadde
ping
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 1/3] ffmpeg: modify tty state when stderr is redirected

2015-07-31 Thread Ganesh Ajjanagadde
Removes unnecessary isatty(), fixes Ticket2964

Signed-off-by: Ganesh Ajjanagadde gajjanaga...@gmail.com
---
 ffmpeg.c | 8 +---
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index 5575e2f..fe250e5 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -32,14 +32,12 @@
 #include limits.h
 #include stdint.h
 
-#if HAVE_ISATTY
 #if HAVE_IO_H
 #include io.h
 #endif
 #if HAVE_UNISTD_H
 #include unistd.h
 #endif
-#endif
 
 #include libavformat/avformat.h
 #include libavdevice/avdevice.h
@@ -370,11 +368,7 @@ void term_init(void)
 #if HAVE_TERMIOS_H
 if(!run_as_daemon){
 struct termios tty;
-int istty = 1;
-#if HAVE_ISATTY
-istty = isatty(0)  isatty(2);
-#endif
-if (istty  tcgetattr (0, tty) == 0) {
+if (tcgetattr (0, tty) == 0) {
 oldtty = tty;
 restore_tty = 1;
 
-- 
2.5.0

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel