[FFmpeg-cvslog] avcodec/fitsdec: write output to frame directly

Paras Chadha git at videolan.org
Thu Sep 7 04:49:34 EEST 2017


ffmpeg | branch: master | Paras Chadha <paraschadha18 at gmail.com> | Sun Sep  3 00:55:21 2017 +0530| [b07faf39ed10f5b24726aa25cd7134aeebb29e68] | committer: James Almer

avcodec/fitsdec: write output to frame directly

Signed-off-by: Paras Chadha <paraschadha18 at gmail.com>
Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b07faf39ed10f5b24726aa25cd7134aeebb29e68
---

 libavcodec/fitsdec.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/libavcodec/fitsdec.c b/libavcodec/fitsdec.c
index 8ede0bcbfa..b0753813c9 100644
--- a/libavcodec/fitsdec.c
+++ b/libavcodec/fitsdec.c
@@ -264,11 +264,10 @@ static int fits_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
             for (j = 0; j < avctx->width; j++) { \
                 t = rd; \
                 if (!header.blank_found || t != header.blank) { \
-                    t = ((t - header.data_min) * ((1 << (sizeof(type) * 8)) - 1)) / (header.data_max - header.data_min); \
+                    *dst++ = ((t - header.data_min) * ((1 << (sizeof(type) * 8)) - 1)) / (header.data_max - header.data_min); \
                 } else { \
-                    t = fitsctx->blank_val; \
+                    *dst++ = fitsctx->blank_val; \
                 } \
-                *dst++ = (type) t; \
                 ptr8 += abs(cas) >> 3; \
             } \
         } \



More information about the ffmpeg-cvslog mailing list