s->use_bit_reservoir = flags2 & 0x0002;
s->use_variable_block_len = flags2 & 0x0004;
- if(avctx->channels > MAX_CHANNELS){
- av_log(avctx, AV_LOG_ERROR, "Invalid number of channels (%d)\n", avctx->channels);
- return -1;
- }
-
+ if(avctx->codec->id == CODEC_ID_WMAV2 && avctx->extradata_size >= 8){
+ if(AV_RL16(extradata+4)==0xd && s->use_variable_block_len){
+ av_log(avctx, AV_LOG_WARNING, "Disabling use_variable_block_len, if this fails contact the ffmpeg developers and send us the file\n");
+ s->use_variable_block_len= 0; // this fixes issue1503
+ }
+ }
+
if(ff_wma_init(avctx, flags2)<0)
return -1;
#include <math.h>
#include "attributes.h"
#include "rational.h"
+ #include "intfloat.h"
+#ifndef M_E
+#define M_E 2.7182818284590452354 /* e */
+#endif
+#ifndef M_LN2
+#define M_LN2 0.69314718055994530942 /* log_e 2 */
+#endif
+#ifndef M_LN10
+#define M_LN10 2.30258509299404568402 /* log_e 10 */
+#endif
#ifndef M_LOG2_10
#define M_LOG2_10 3.32192809488736234787 /* log_2 10 */
#endif
#ifndef M_PHI
#define M_PHI 1.61803398874989484820 /* phi / golden ratio */
#endif
+#ifndef M_PI
+#define M_PI 3.14159265358979323846 /* pi */
+#endif
+#ifndef M_SQRT1_2
+#define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */
+#endif
+#ifndef M_SQRT2
+#define M_SQRT2 1.41421356237309504880 /* sqrt(2) */
+#endif
#ifndef NAN
- #define NAN (0.0/0.0)
+ #define NAN av_int2float(0x7fc00000)
#endif
#ifndef INFINITY
- #define INFINITY (1.0/0.0)
+ #define INFINITY av_int2float(0x7f800000)
#endif
/**
#include "eval.h"
#include "dict.h"
#include "log.h"
+#include "parseutils.h"
+#include "pixdesc.h"
+ #include "mathematics.h"
#if FF_API_FIND_OPT
//FIXME order them and do a bin search