Advertisement
Guest User

package.patch

a guest
May 3rd, 2021
320
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 5.57 KB | None | 0 0
  1. diff --unified --recursive --text mjpegtools-2.1.0__/lavtools/jpeg2yuv.c mjpegtools-2.1.0_new/lavtools/jpeg2yuv.c
  2. --- mjpegtools-2.1.0__/lavtools/jpeg2yuv.c  2008-01-06 10:28:00.000000000 +0700
  3. +++ mjpegtools-2.1.0_new/lavtools/jpeg2yuv.c    2021-05-03 22:36:39.305610545 +0700
  4. @@ -451,7 +451,7 @@
  5.            
  6.             if (firstjpeg) {
  7.                 p = firstjpeg;
  8. -               sprintf(jpegname, firstjpeg);
  9. +               sprintf(jpegname, "%s", firstjpeg);
  10.                 firstjpeg = NULL;
  11.             }
  12.             else {
  13. diff --unified --recursive --text mjpegtools-2.1.0__/lavtools/lav_io.c mjpegtools-2.1.0_new/lavtools/lav_io.c
  14. --- mjpegtools-2.1.0__/lavtools/lav_io.c    2007-09-10 05:16:53.000000000 +0700
  15. +++ mjpegtools-2.1.0_new/lavtools/lav_io.c  2021-05-03 22:09:25.671303996 +0700
  16. @@ -926,7 +926,7 @@
  17.              strcat(errmsg, ", quicktime");
  18.  #endif
  19.         strcat(errmsg, ").\n");
  20. -            fprintf(stderr, errmsg);
  21. +            fprintf(stderr, "%s", errmsg);
  22.         free(lav_fd);
  23.         internal_error = ERROR_FORMAT; /* Format not recognized */
  24.         return 0;
  25. diff --unified --recursive --text mjpegtools-2.1.0__/lavtools/lavaddwav.c mjpegtools-2.1.0_new/lavtools/lavaddwav.c
  26. --- mjpegtools-2.1.0__/lavtools/lavaddwav.c 2005-11-22 12:33:16.000000000 +0700
  27. +++ mjpegtools-2.1.0_new/lavtools/lavaddwav.c   2021-05-03 22:42:46.111067764 +0700
  28. @@ -352,7 +352,7 @@
  29.    {
  30.      if( imulti_out )
  31.        /* build output filename */
  32. -      sprintf(chOutFile, argv[optind+2], iOutNum++);
  33. +      sprintf(chOutFile, "%s%i", argv[optind+2], iOutNum++);
  34.  
  35.      /* Create output file */
  36.      lav_out = lav_open_output_file(chOutFile,
  37. @@ -576,7 +576,7 @@
  38.      if( ulOutputBytes == 0 )
  39.      {
  40.        /* build output filename */
  41. -      sprintf(chOutFile, argv[optind+2], iOutNum++);
  42. +      sprintf(chOutFile, "%s%i", argv[optind+2], iOutNum++);
  43.        
  44.        /* Create output file */
  45.        lav_out = lav_open_output_file(chOutFile,
  46. diff --unified --recursive --text mjpegtools-2.1.0__/lavtools/lavtrans.c mjpegtools-2.1.0_new/lavtools/lavtrans.c
  47. --- mjpegtools-2.1.0__/lavtools/lavtrans.c  2005-10-03 00:01:30.000000000 +0700
  48. +++ mjpegtools-2.1.0_new/lavtools/lavtrans.c    2021-05-03 22:09:29.964701223 +0700
  49. @@ -275,7 +275,7 @@
  50.     if (process_image_frame != -1)
  51.     {
  52.        nv = el_get_video_frame(vbuff, process_image_frame, &el);
  53. -      sprintf(imgfname,outfile);
  54. +      sprintf(imgfname,"%s", outfile);
  55.        imgfd = fopen(imgfname,"wb");
  56.        if (imgfd==0) system_error("opening image file","fopen");
  57.        res = fwrite(vbuff,nv,1,imgfd);
  58. @@ -307,7 +307,7 @@
  59.              break;
  60.  
  61.           case 'i':
  62. -            sprintf(imgfname,outfile,nframe);
  63. +            sprintf(imgfname,"%s%i", outfile,nframe);
  64.              imgfd = fopen(imgfname,"wb");
  65.              if (imgfd==0) system_error("opening image file","fopen");
  66.              res = fwrite(vbuff,nv,1,imgfd);
  67. diff --unified --recursive --text mjpegtools-2.1.0__/lavtools/yuv2lav.c mjpegtools-2.1.0_new/lavtools/yuv2lav.c
  68. --- mjpegtools-2.1.0__/lavtools/yuv2lav.c   2010-12-31 15:06:33.000000000 +0700
  69. +++ mjpegtools-2.1.0_new/lavtools/yuv2lav.c 2021-05-03 22:56:24.844266970 +0700
  70. @@ -330,7 +330,7 @@
  71.     if (strstr(param_output,"%"))
  72.     {
  73.        char buff[256];
  74. -      sprintf(buff, param_output, filenum++);
  75. +      sprintf(buff, "%s%i", param_output, filenum++);
  76.        output = lav_open_output_file (buff, param_format,
  77.                                    y4m_si_get_width(&streaminfo),
  78.                   y4m_si_get_height(&streaminfo),
  79. @@ -408,7 +408,7 @@
  80.                 mjpeg_error("Closing output file: %s",lav_strerror());
  81.                 exit(1);
  82.              }
  83. -            sprintf(buff, param_output, filenum++);
  84. +            sprintf(buff, "%s%i", param_output, filenum++);
  85.              output = lav_open_output_file (buff, param_format,
  86.                                          y4m_si_get_width(&streaminfo),
  87.                                          y4m_si_get_height(&streaminfo),
  88. diff --unified --recursive --text mjpegtools-2.1.0__/mplex/main.cpp mjpegtools-2.1.0_new/mplex/main.cpp
  89. --- mjpegtools-2.1.0__/mplex/main.cpp   2011-12-11 15:53:59.000000000 +0700
  90. +++ mjpegtools-2.1.0_new/mplex/main.cpp 2021-05-03 23:03:21.748287013 +0700
  91. @@ -614,7 +614,7 @@
  92.                  if( flag_table[flag].longname != 0 )
  93.                      message += sep;
  94.              }
  95. -            mjpeg_error( message.c_str() );
  96. +            mjpeg_error( "%s", message.c_str() );
  97.              return false;
  98.          }
  99.  
  100. diff --unified --recursive --text mjpegtools-2.1.0__/yuvfilters/yuvfilters.h mjpegtools-2.1.0_new/yuvfilters/yuvfilters.h
  101. --- mjpegtools-2.1.0__/yuvfilters/yuvfilters.h  2005-02-28 05:46:56.000000000 +0700
  102. +++ mjpegtools-2.1.0_new/yuvfilters/yuvfilters.h    2021-05-03 23:07:52.398224866 +0700
  103. @@ -34,8 +34,8 @@
  104.  
  105.  #ifdef MJPEGTOOLS
  106.  # define perror(MSG) mjpeg_error("%s: %s", MSG, strerror(errno))
  107. -# define WERROR(MSG) mjpeg_error(MSG)
  108. -# define WERRORL(MSG) mjpeg_error(MSG)
  109. +# define WERROR(MSG) mjpeg_error("%s", MSG)
  110. +# define WERRORL(MSG) mjpeg_error("%s", MSG)
  111.  # define WWARN(MSG) mjpeg_warn(MSG)
  112.  #else
  113.  # define WERROR(MSG) write(2, MSG "\n", sizeof MSG)
  114. diff --unified --recursive --text mjpegtools-2.1.0__/yuvfilters/yuvkineco.c mjpegtools-2.1.0_new/yuvfilters/yuvkineco.c
  115. --- mjpegtools-2.1.0__/yuvfilters/yuvkineco.c   2005-12-05 12:06:06.000000000 +0700
  116. +++ mjpegtools-2.1.0_new/yuvfilters/yuvkineco.c 2021-05-04 00:32:23.719589714 +0700
  117. @@ -48,7 +48,7 @@
  118.      } else {
  119.  #ifdef MJPEGTOOLS
  120.        buf[n] = '\0';
  121. -      mjpeg_debug(buf);
  122. +      mjpeg_debug("%s", buf);
  123.  #else
  124.        fputs(buf, stderr);
  125.  #endif
  126.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement