mirror of https://git.ffmpeg.org/ffmpeg.git
Merge commit '564b7e0c0095768cd20001b28154d69462be54e7'
* commit '564b7e0c0095768cd20001b28154d69462be54e7': matroskadec: silently skip CodecState element. smacker: fix off-by-one error in palette expanding code Conflicts: libavformat/smacker.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
91db8ff203
|
@ -195,6 +195,7 @@
|
||||||
#define MATROSKA_ID_BLOCK 0xA1
|
#define MATROSKA_ID_BLOCK 0xA1
|
||||||
#define MATROSKA_ID_BLOCKDURATION 0x9B
|
#define MATROSKA_ID_BLOCKDURATION 0x9B
|
||||||
#define MATROSKA_ID_BLOCKREFERENCE 0xFB
|
#define MATROSKA_ID_BLOCKREFERENCE 0xFB
|
||||||
|
#define MATROSKA_ID_CODECSTATE 0xA4
|
||||||
|
|
||||||
/* IDs in the attachments master */
|
/* IDs in the attachments master */
|
||||||
#define MATROSKA_ID_ATTACHEDFILE 0x61A7
|
#define MATROSKA_ID_ATTACHEDFILE 0x61A7
|
||||||
|
|
|
@ -564,6 +564,7 @@ static EbmlSyntax matroska_blockgroup[] = {
|
||||||
{ MATROSKA_ID_SIMPLEBLOCK, EBML_BIN, 0, offsetof(MatroskaBlock,bin) },
|
{ MATROSKA_ID_SIMPLEBLOCK, EBML_BIN, 0, offsetof(MatroskaBlock,bin) },
|
||||||
{ MATROSKA_ID_BLOCKDURATION, EBML_UINT, 0, offsetof(MatroskaBlock,duration) },
|
{ MATROSKA_ID_BLOCKDURATION, EBML_UINT, 0, offsetof(MatroskaBlock,duration) },
|
||||||
{ MATROSKA_ID_BLOCKREFERENCE, EBML_UINT, 0, offsetof(MatroskaBlock,reference) },
|
{ MATROSKA_ID_BLOCKREFERENCE, EBML_UINT, 0, offsetof(MatroskaBlock,reference) },
|
||||||
|
{ MATROSKA_ID_CODECSTATE, EBML_NONE },
|
||||||
{ 1, EBML_UINT, 0, offsetof(MatroskaBlock,non_simple), {.u=1} },
|
{ 1, EBML_UINT, 0, offsetof(MatroskaBlock,non_simple), {.u=1} },
|
||||||
{ 0 }
|
{ 0 }
|
||||||
};
|
};
|
||||||
|
|
|
@ -276,7 +276,7 @@ static int smacker_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||||
} else if(t & 0x40){ /* copy with offset */
|
} else if(t & 0x40){ /* copy with offset */
|
||||||
off = avio_r8(s->pb);
|
off = avio_r8(s->pb);
|
||||||
j = (t & 0x3F) + 1;
|
j = (t & 0x3F) + 1;
|
||||||
if (off + j - 1 > 0xff) {
|
if (off + j > 0x100) {
|
||||||
av_log(s, AV_LOG_ERROR,
|
av_log(s, AV_LOG_ERROR,
|
||||||
"Invalid palette update, offset=%d length=%d extends beyond palette size\n",
|
"Invalid palette update, offset=%d length=%d extends beyond palette size\n",
|
||||||
off, j);
|
off, j);
|
||||||
|
|
Loading…
Reference in New Issue