~ubuntu-branches/ubuntu/trusty/libav/trusty-proposed

« back to all changes in this revision

Viewing changes to libavformat/rtmpproto.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2012-10-23 18:49:26 UTC
  • mto: (1.1.18 experimental)
  • mto: This revision was merged to the branch mainline in revision 34.
  • Revision ID: package-import@ubuntu.com-20121023184926-cw5imrodltw6h5o4
Tags: upstream-9~beta2
ImportĀ upstreamĀ versionĀ 9~beta2

Show diffs side-by-side

added added

removed removed

Lines of Context:
859
859
    uint8_t hmac_buf[64+32] = {0};
860
860
    int i;
861
861
 
862
 
    sha = av_mallocz(av_sha_size);
 
862
    sha = av_sha_alloc();
863
863
    if (!sha)
864
864
        return AVERROR(ENOMEM);
865
865
 
1371
1371
    /* By now same epoch will be sent */
1372
1372
    hs_my_epoch = hs_epoch;
1373
1373
    /* Generate random */
1374
 
    for (randomidx = 0; randomidx < (RTMP_HANDSHAKE_PACKET_SIZE);
 
1374
    for (randomidx = 8; randomidx < (RTMP_HANDSHAKE_PACKET_SIZE);
1375
1375
         randomidx += 4)
1376
 
        AV_WB32(hs_s1 + 8 + randomidx, av_get_random_seed());
 
1376
        AV_WB32(hs_s1 + randomidx, av_get_random_seed());
1377
1377
 
1378
1378
    ret = rtmp_send_hs_packet(rt, hs_my_epoch, 0, hs_s1,
1379
1379
                              RTMP_HANDSHAKE_PACKET_SIZE);