summaryrefslogtreecommitdiff
path: root/libavcodec/cllc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-04-20 05:19:19 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-04-20 05:19:46 +0200
commitfcca7671e29b67812d29af710ff90486944ee428 (patch)
tree8b67f16bdcbb9f1d2de5c35a527271c36ad2a25f /libavcodec/cllc.c
parentf1db984288f21a1ecdff0b5702630456c089ce36 (diff)
parente6fb844f7b736e72da364032d251283bce9e63ad (diff)
downloadffmpeg-fcca7671e29b67812d29af710ff90486944ee428.tar.gz
Merge commit 'e6fb844f7b736e72da364032d251283bce9e63ad'
* commit 'e6fb844f7b736e72da364032d251283bce9e63ad': Implement shared parsing of INFO tag in Canopus family Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/cllc.c')
-rw-r--r--libavcodec/cllc.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/libavcodec/cllc.c b/libavcodec/cllc.c
index 829cb52281..c9ab8b9346 100644
--- a/libavcodec/cllc.c
+++ b/libavcodec/cllc.c
@@ -24,6 +24,7 @@
#include "libavutil/intreadwrite.h"
#include "bswapdsp.h"
+#include "canopus.h"
#include "get_bits.h"
#include "avcodec.h"
#include "internal.h"
@@ -362,7 +363,11 @@ static int cllc_decode_frame(AVCodecContext *avctx, void *data,
GetBitContext gb;
int coding_type, ret;
- /* Skip the INFO header if present */
+ if (avpkt->size < 4 + 4) {
+ av_log(avctx, AV_LOG_ERROR, "Frame is too small %d.\n", avpkt->size);
+ return AVERROR_INVALIDDATA;
+ }
+
info_offset = 0;
info_tag = AV_RL32(src);
if (info_tag == MKTAG('I', 'N', 'F', 'O')) {
@@ -373,11 +378,10 @@ static int cllc_decode_frame(AVCodecContext *avctx, void *data,
info_offset);
return AVERROR_INVALIDDATA;
}
+ ff_canopus_parse_info_tag(avctx, src + 8, info_offset);
info_offset += 8;
src += info_offset;
-
- av_log(avctx, AV_LOG_DEBUG, "Skipping INFO chunk.\n");
}
data_size = (avpkt->size - info_offset) & ~1;