test decoder.
This commit is contained in:
parent
ff4eb8bf07
commit
ec8cccc0f9
|
@ -146,13 +146,20 @@ void inline FfmpegDecoder::AVParseData(const void *data, const size_t &size,
|
||||||
}
|
}
|
||||||
uint8_t *frameData = (uint8_t *)data;
|
uint8_t *frameData = (uint8_t *)data;
|
||||||
size_t data_size = size;
|
size_t data_size = size;
|
||||||
|
size_t parse_size = 0;
|
||||||
while (data_size > 0) {
|
while (data_size > 0) {
|
||||||
|
if (data_size > 4096) {
|
||||||
|
parse_size = 4096;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
parse_size = data_size;
|
||||||
|
}
|
||||||
int ret = av_parser_parse2(mParser,
|
int ret = av_parser_parse2(mParser,
|
||||||
mCodecCtx,
|
mCodecCtx,
|
||||||
&mPacket->data,
|
&mPacket->data,
|
||||||
&mPacket->size,
|
&mPacket->size,
|
||||||
frameData,
|
frameData,
|
||||||
data_size,
|
parse_size,
|
||||||
AV_NOPTS_VALUE,
|
AV_NOPTS_VALUE,
|
||||||
AV_NOPTS_VALUE,
|
AV_NOPTS_VALUE,
|
||||||
0);
|
0);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user