summaryrefslogtreecommitdiff
path: root/libavcodec/ffv1.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-04-25 12:05:06 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-04-25 12:05:06 +0200
commitc24ca7b88e6388cdd5106bf612b86ba702ac9516 (patch)
tree0eb7437d3314975682e936ea78d2355cf12ca846 /libavcodec/ffv1.c
parent0c278545321373b5bdff926adc0f645c319872a2 (diff)
ffv1: add 1 status byte to slices in in case crcs are stored too.
This will allow storing of information about corrected and uncorrectable errors. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ffv1.c')
-rw-r--r--libavcodec/ffv1.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c
index 5e8fd18750..43ab3964de 100644
--- a/libavcodec/ffv1.c
+++ b/libavcodec/ffv1.c
@@ -1298,7 +1298,9 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
bytes+=3;
}
if(f->ec){
- unsigned v = av_crc(av_crc_get_table(AV_CRC_32_IEEE), 0, buf_p, bytes);
+ unsigned v;
+ buf_p[bytes++] = 0;
+ v = av_crc(av_crc_get_table(AV_CRC_32_IEEE), 0, buf_p, bytes);
AV_WL32(buf_p + bytes, v); bytes += 4;
}
buf_p += bytes;
@@ -1987,7 +1989,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
buf_p= buf + buf_size;
for(i=f->slice_count-1; i>=0; i--){
FFV1Context *fs= f->slice_context[i];
- int trailer = 3 + 4*!!f->ec;
+ int trailer = 3 + 5*!!f->ec;
int v;
if(i || f->ec) v = AV_RB24(buf_p-trailer)+trailer;