From 17ca374c7d09b9f0c102709f2437a3a76de7bad0 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sat, 9 Apr 2011 07:30:33 +0200 Subject: avformat.h: fix a misplaced #endif --- libavformat/avformat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavformat') diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 5c8456f337..24c7958111 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -998,8 +998,8 @@ void av_pkt_dump_log2(void *avcl, int level, AVPacket *pkt, int dump_payload, #if FF_API_PKT_DUMP attribute_deprecated void av_pkt_dump(FILE *f, AVPacket *pkt, int dump_payload); attribute_deprecated void av_pkt_dump_log(void *avcl, int level, AVPacket *pkt, -#endif int dump_payload); +#endif /** * Initialize libavformat and register all the muxers, demuxers and -- cgit v1.2.3 From 347b375a80afbb27c887a243097c09370cb95d19 Mon Sep 17 00:00:00 2001 From: Alex Converse Date: Fri, 8 Apr 2011 14:35:17 -0700 Subject: daud: Don't write packets that are too large to have their size expressed in the bytestream. --- libavformat/daud.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libavformat') diff --git a/libavformat/daud.c b/libavformat/daud.c index ca9be27905..1b3cfcf2d9 100644 --- a/libavformat/daud.c +++ b/libavformat/daud.c @@ -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); -- cgit v1.2.3