]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/tiffenc.c
Add a missing break, before av_set_number would always return NULL for
[ffmpeg] / libavcodec / tiffenc.c
index b25d453e41f4d10daa1819c2332cb8a081c05d63..5b567aeec6e24a0e3916de43972129ca6d27bfaf 100644 (file)
@@ -17,7 +17,6 @@
  * You should have received a copy of the GNU Lesser General Public
  * License along with FFmpeg; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
  */
 
 /**
@@ -332,8 +331,8 @@ static int encode_frame(AVCodecContext * avctx, unsigned char *buf,
                 j += s->subsampling[1] - 1;
             }
             else
-            memcpy(zbuf + j * bytes_per_row,
-                   p->data[0] + j * p->linesize[0], bytes_per_row);
+                memcpy(zbuf + j * bytes_per_row,
+                       p->data[0] + j * p->linesize[0], bytes_per_row);
             zn += bytes_per_row;
         }
         n = encode_strip(s, zbuf, ptr, zn, s->compr);
@@ -402,6 +401,8 @@ static int encode_frame(AVCodecContext * avctx, unsigned char *buf,
     add_entry(s, TIFF_XRES,              TIFF_RATIONAL, 1,      res);
     add_entry(s, TIFF_YRES,              TIFF_RATIONAL, 1,      res);
     add_entry1(s,TIFF_RES_UNIT,          TIFF_SHORT,            2);
+
+    if(!(avctx->flags & CODEC_FLAG_BITEXACT))
     add_entry(s, TIFF_SOFTWARE_NAME,     TIFF_STRING,
               strlen(LIBAVCODEC_IDENT) + 1, LIBAVCODEC_IDENT);