Browse code

Merge remote branch 'qatar/master'

* qatar/master:
daud: Don't write packets that are too large to have their size expressed in the bytestream.
DUPLICATE pthread: validate_thread_parameters() ignored slice-threading being intentionally off
DUPLICATE Use consistent condition for whether to run slice-threading execute function.
avformat.h: fix a misplaced #endif
DUPLCIATE vaapi: cope with VA-API 0.32, i.e. fix VC-1 decoding on Sandy Bridge.
DUPLICATE vaapi: filter out DELAYED_PIC_REF flag to determine field.

Merged-by: Michael Niedermayer <michaelni@gmx.at>

Michael Niedermayer authored on 2011/04/10 10:31:53
Showing 2 changed files
... ...
@@ -1006,8 +1006,8 @@ void av_pkt_dump_log2(void *avcl, int level, AVPacket *pkt, int dump_payload,
1006 1006
 #if FF_API_PKT_DUMP
1007 1007
 attribute_deprecated void av_pkt_dump(FILE *f, AVPacket *pkt, int dump_payload);
1008 1008
 attribute_deprecated void av_pkt_dump_log(void *avcl, int level, AVPacket *pkt,
1009
-#endif
1010 1009
                                           int dump_payload);
1010
+#endif
1011 1011
 
1012 1012
 /**
1013 1013
  * Initialize libavformat and register all the muxers, demuxers and
... ...
@@ -57,6 +57,11 @@ static int daud_write_header(struct AVFormatContext *s)
57 57
 
58 58
 static int daud_write_packet(struct AVFormatContext *s, AVPacket *pkt)
59 59
 {
60
+    if (pkt->size > 65535) {
61
+        av_log(s, AV_LOG_ERROR,
62
+               "Packet size too large for s302m. (%d > 65535)\n", pkt->size);
63
+        return -1;
64
+    }
60 65
     avio_wb16(s->pb, pkt->size);
61 66
     avio_wb16(s->pb, 0x8010); // unknown
62 67
     avio_write(s->pb, pkt->data, pkt->size);