提交 347b375a 编写于 作者: A Alex Converse 提交者: Alex Converse

daud: Don't write packets that are too large to have their size expressed in the bytestream.

上级 cf39b461
......@@ -57,6 +57,11 @@ static int daud_write_header(struct AVFormatContext *s)
static int daud_write_packet(struct AVFormatContext *s, AVPacket *pkt)
{
if (pkt->size > 65535) {
av_log(s, AV_LOG_ERROR,
"Packet size too large for s302m. (%d > 65535)\n", pkt->size);
return -1;
}
avio_wb16(s->pb, pkt->size);
avio_wb16(s->pb, 0x8010); // unknown
avio_write(s->pb, pkt->data, pkt->size);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册