On Sat, Oct 21, 2017 at 08:13:15AM +0000, Dixit, Vishwanath wrote: > Hi, [...]
> @@ -1324,17 +1345,183 @@ static const char * > get_default_pattern_localtime_fmt(AVFormatContext *s) > return (HAVE_LIBC_MSVCRT || !strftime(b, sizeof(b), "%s", p) || > !strcmp(b, "%s")) ? "-%Y%m%d%H%M%S.ts" : "-%s.ts"; > } > > +static int format_name(char *name, int name_buf_len, int i) > +{ > + char *p; > + char extension[10] = {'\0'}; > + > + p = strrchr(name, '.'); > + if (p) { > + strcpy(extension, p); > + *p = '\0'; > + } > + > + sprintf(name + strlen(name), POSTFIX_PATTERN, i); please always use snprintf() it is safer [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Avoid a single point of failure, be that a person or equipment.
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel