Browse Source

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

tags/n0.8
Alex Converse Alex Converse 15 years ago
parent
commit
347b375a80
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      libavformat/daud.c

+ 5
- 0
libavformat/daud.c View File

@@ -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);


Loading…
Cancel
Save