Re: [FFmpeg-devel] [PATCH] ffserver: cast PID to int64_t before printing

2015-08-21 Thread Ganesh Ajjanagadde
On Fri, Aug 21, 2015 at 2:06 AM, Clément Bœsch wrote: > On Thu, Aug 20, 2015 at 10:17:15PM -0400, Ganesh Ajjanagadde wrote: >> On Thu, Aug 20, 2015 at 10:03 PM, Ganesh Ajjanagadde >> wrote: >> > On Thu, Aug 20, 2015 at 9:29 PM, Timothy Gu wrote: >> >> On Thu, Aug 20, 2015 at 6:03 PM Ganesh Ajjan

Re: [FFmpeg-devel] [PATCH] ffserver: cast PID to int64_t before printing

2015-08-20 Thread Clément Bœsch
On Thu, Aug 20, 2015 at 10:17:15PM -0400, Ganesh Ajjanagadde wrote: > On Thu, Aug 20, 2015 at 10:03 PM, Ganesh Ajjanagadde > wrote: > > On Thu, Aug 20, 2015 at 9:29 PM, Timothy Gu wrote: > >> On Thu, Aug 20, 2015 at 6:03 PM Ganesh Ajjanagadde > >> wrote: > >>> > >>> -avio_printf(pb,

Re: [FFmpeg-devel] [PATCH] ffserver: cast PID to int64_t before printing

2015-08-20 Thread Ganesh Ajjanagadde
On Thu, Aug 20, 2015 at 10:03 PM, Ganesh Ajjanagadde wrote: > On Thu, Aug 20, 2015 at 9:29 PM, Timothy Gu wrote: >> On Thu, Aug 20, 2015 at 6:03 PM Ganesh Ajjanagadde >> wrote: >>> >>> -avio_printf(pb, "Running as pid %d.\n", stream->pid); >>> +avio_printf(pb, "Running as

Re: [FFmpeg-devel] [PATCH] ffserver: cast PID to int64_t before printing

2015-08-20 Thread Ganesh Ajjanagadde
On Thu, Aug 20, 2015 at 9:29 PM, Timothy Gu wrote: > On Thu, Aug 20, 2015 at 6:03 PM Ganesh Ajjanagadde > wrote: >> >> -avio_printf(pb, "Running as pid %d.\n", stream->pid); >> +avio_printf(pb, "Running as pid %ld.\n", (int64_t) >> stream->pid); > > > You need `"%" PRIi64`

Re: [FFmpeg-devel] [PATCH] ffserver: cast PID to int64_t before printing

2015-08-20 Thread Timothy Gu
On Thu, Aug 20, 2015 at 6:03 PM Ganesh Ajjanagadde wrote: > -avio_printf(pb, "Running as pid %d.\n", stream->pid); > +avio_printf(pb, "Running as pid %ld.\n", (int64_t) > stream->pid); > You need `"%" PRIi64` as the format specifier. Timothy _

[FFmpeg-devel] [PATCH] ffserver: cast PID to int64_t before printing

2015-08-20 Thread Ganesh Ajjanagadde
Unfortunately, there is no portable format specifier for PID's. Furthermore, it is not safe to assume pid_t <= 32 bit in size, see e.g http://unix.derkeiler.com/Mailing-Lists/AIX-L/2010-08/msg8.html. Right now, it is ok to assume pid_t <= 32 bit in size, but this may change in the future. Also