[FFmpeg-cvslog] jvdemux: correct size for truncated packets

Michael Niedermayer git at videolan.org
Tue Jul 3 05:30:41 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Jul  3 05:24:26 2012 +0200| [9d0c71e5e34dec2c6246bf47da8d9674c92f85c1] | committer: Michael Niedermayer

jvdemux: correct size for truncated packets

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

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

 libavformat/jvdec.c     |    2 +-
 tests/ref/fate/jv       |    2 +-
 tests/ref/fate/jv-demux |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavformat/jvdec.c b/libavformat/jvdec.c
index 3977594..504be08 100644
--- a/libavformat/jvdec.c
+++ b/libavformat/jvdec.c
@@ -164,7 +164,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
 
                 AV_WL32(pkt->data, jvf->video_size);
                 pkt->data[4]      = jvf->video_type;
-                if (avio_read(pb, pkt->data + JV_PREAMBLE_SIZE, size) < 0)
+                if ((size = avio_read(pb, pkt->data + JV_PREAMBLE_SIZE, size)) < 0)
                     return AVERROR(EIO);
 
                 pkt->size         = size + JV_PREAMBLE_SIZE;
diff --git a/tests/ref/fate/jv b/tests/ref/fate/jv
index 7a64348..88b345c 100644
--- a/tests/ref/fate/jv
+++ b/tests/ref/fate/jv
@@ -6,4 +6,4 @@
 0,          5,          5,        1,   192000, 0xb8e331eb
 0,          6,          6,        1,   192000, 0xd35b2053
 0,          7,          7,        1,   192000, 0x01062188
-0,          8,          8,        1,   192000, 0xed783572
+0,          8,          8,        1,   192000, 0xa3a73b87
diff --git a/tests/ref/fate/jv-demux b/tests/ref/fate/jv-demux
index 27f775e..c57fce0 100644
--- a/tests/ref/fate/jv-demux
+++ b/tests/ref/fate/jv-demux
@@ -9,7 +9,7 @@
 0,          5,          5,        1,    13940, 0x064c350a
 0,          6,          6,        1,    14418, 0x078d2dd2
 0,          7,          7,        1,    14539, 0x145167ed
-0,          8,          8,        1,    14700, 0x03de8939
+0,          8,          8,        1,     2552, 0xcf2b1db7
 1,     131072,     131072,     1764,     1764, 0x30be734d
 1,     132836,     132836,     1764,     1764, 0xa4c873a7
 1,     134600,     134600,     1764,     1764, 0xd5f17443



More information about the ffmpeg-cvslog mailing list