[FFmpeg-cvslog] avcodec/jpeg2000dec: Add placeholder for PLT parsing

Michael Niedermayer git at videolan.org
Tue Jun 9 16:45:15 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Jun  9 15:16:46 2015 +0200| [45db92180693b0a4663bc4c30ada0af1da041558] | committer: Michael Niedermayer

avcodec/jpeg2000dec: Add placeholder for PLT parsing

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/jpeg2000dec.c |   20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index c5a3bd2..aecc6eb 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -673,6 +673,22 @@ static uint8_t get_tlm(Jpeg2000DecoderContext *s, int n)
     return 0;
 }
 
+static uint8_t get_plt(Jpeg2000DecoderContext *s, int n)
+{
+    int i;
+
+    av_log(s->avctx, AV_LOG_ERROR,
+            "PLT marker at pos 0x%X\n", bytestream2_tell(&s->g) - 4);
+
+    /*Zplt =*/ bytestream2_get_byte(&s->g);
+
+    for (i = 0; i < n - 3; i++) {
+        bytestream2_get_byte(&s->g);
+    }
+
+    return 0;
+}
+
 static int init_tile(Jpeg2000DecoderContext *s, int tileno)
 {
     int compno;
@@ -1469,6 +1485,10 @@ static int jpeg2000_read_main_headers(Jpeg2000DecoderContext *s)
             // Tile-part lengths
             ret = get_tlm(s, len);
             break;
+        case JPEG2000_PLT:
+            // Packet length, tile-part header
+            ret = get_plt(s, len);
+            break;
         default:
             av_log(s->avctx, AV_LOG_ERROR,
                    "unsupported marker 0x%.4"PRIX16" at pos 0x%X\n",



More information about the ffmpeg-cvslog mailing list