diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-08-18 17:10:13 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-08-18 17:20:32 +0400 |
commit | 6c180b35c43f0738d8a3d5c08a01209b51eda569 (patch) | |
tree | b278223305ed9dc4af792f53a376a558ad9155ee /libavformat/rtmpdh.c | |
parent | 69fc2489c4059886fcda2de91029b43447330951 (diff) | |
parent | 7f9aaa499b8a5ce066cc17aac6ebbdf0111980b6 (diff) |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
mpegvideo_enc: don't use deprecated avcodec_encode_video().
cmdutils: refactor -codecs option.
avconv: make -shortest a per-output file option.
lavc: add avcodec_descriptor_get_by_name().
lavc: add const to AVCodec* function parameters.
swf(dec): replace CODEC_ID with AV_CODEC_ID
dvenc: don't use deprecated AVCODEC_MAX_AUDIO_FRAME_SIZE
rtmpdh: Do not generate the same private key every time when using libnettle
rtp: remove ff_rtp_get_rtcp_file_handle().
rtsp.c: use ffurl_get_multi_file_handle() instead of ff_rtp_get_rtcp_file_handle()
avio: add (ff)url_get_multi_file_handle() for getting more than one fd
h264: vdpau: fix crash with unsupported colorspace
amrwbdec: Decode the fr_quality bit properly
Conflicts:
Changelog
cmdutils.c
cmdutils_common_opts.h
doc/ffmpeg.texi
ffmpeg.c
ffmpeg.h
ffmpeg_opt.c
libavcodec/h264.c
libavcodec/options.c
libavcodec/utils.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtmpdh.c')
-rw-r--r-- | libavformat/rtmpdh.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libavformat/rtmpdh.c b/libavformat/rtmpdh.c index 03582eafb9..7d6734daac 100644 --- a/libavformat/rtmpdh.c +++ b/libavformat/rtmpdh.c @@ -28,6 +28,7 @@ #include "config.h" #include "rtmpdh.h" +#include "libavutil/random_seed.h" #define P1024 \ "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1" \ @@ -78,7 +79,14 @@ ret = (mpz_set_str(bn, buf, 16) == 0); \ } while (0) #define bn_modexp(bn, y, q, p) mpz_powm(bn, y, q, p) -#define bn_random(bn, num_bytes) mpz_random(bn, num_bytes); +#define bn_random(bn, num_bytes) \ + do { \ + gmp_randstate_t rs; \ + gmp_randinit_mt(rs); \ + gmp_randseed_ui(rs, av_get_random_seed()); \ + mpz_urandomb(bn, rs, num_bytes); \ + gmp_randclear(rs); \ + } while (0) #elif CONFIG_GCRYPT #define bn_new(bn) bn = gcry_mpi_new(1) #define bn_free(bn) gcry_mpi_release(bn) |