[FFmpeg-cvslog] pnm: remove nonsense code
Paul B Mahol
git at videolan.org
Mon Nov 5 00:28:28 CET 2012
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Nov 4 23:17:12 2012 +0000| [a0348d0966a81a66f3a1bf061576b24d5296b933] | committer: Paul B Mahol
pnm: remove nonsense code
If maxval is more than 255 than each value takes 2 bytes with most
significant byte first.
Signed-off-by: Paul B Mahol <onemda at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a0348d0966a81a66f3a1bf061576b24d5296b933
---
libavcodec/pnm.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/libavcodec/pnm.c b/libavcodec/pnm.c
index c5c600b..1baf1a7 100644
--- a/libavcodec/pnm.c
+++ b/libavcodec/pnm.c
@@ -163,8 +163,6 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s)
if (s->maxval >= 256) {
if (avctx->pix_fmt == AV_PIX_FMT_GRAY8) {
avctx->pix_fmt = AV_PIX_FMT_GRAY16BE;
- if (s->maxval != 65535)
- avctx->pix_fmt = AV_PIX_FMT_GRAY16;
} else if (avctx->pix_fmt == AV_PIX_FMT_RGB24) {
if (s->maxval > 255)
avctx->pix_fmt = AV_PIX_FMT_RGB48BE;
More information about the ffmpeg-cvslog
mailing list