Ticket #3778: patchrtmpproto.diff

File patchrtmpproto.diff, 1.9 KB (added by Carl Eugen Hoyos, 12 years ago)
  • libavformat/rtmpproto.c

    diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
    index 3814da8..ec989ec 100644
    a b typedef struct RTMPContext {  
    9393    int           flv_off;                    ///< number of bytes read from current buffer
    9494    int           flv_nb_packets;             ///< number of flv packets published
    9595    RTMPPacket    out_pkt;                    ///< rtmp packet, created from flv a/v or metadata (for output)
    96     uint32_t      client_report_size;         ///< number of bytes after which client should report to server
    97     uint32_t      bytes_read;                 ///< number of bytes read from server
    98     uint32_t      last_bytes_read;            ///< number of bytes read last reported to server
     96    uint64_t      client_report_size;         ///< number of bytes after which client should report to server
     97    uint64_t      bytes_read;                 ///< number of bytes read from server
     98    uint64_t      last_bytes_read;            ///< number of bytes read last reported to server
    9999    int           skip_bytes;                 ///< number of bytes to skip from the input FLV stream in the next write call
    100100    int           has_audio;                  ///< presence of audio data
    101101    int           has_video;                  ///< presence of video data
    static int handle_client_bw(URLContext *s, RTMPPacket *pkt)  
    15261526
    15271527    rt->client_report_size = AV_RB32(pkt->data);
    15281528    if (rt->client_report_size <= 0) {
    1529         av_log(s, AV_LOG_ERROR, "Incorrect client bandwidth %d\n",
     1529        av_log(s, AV_LOG_ERROR, "Incorrect client bandwidth %"PRId64"\n",
    15301530                rt->client_report_size);
    15311531        return AVERROR_INVALIDDATA;
    15321532
    15331533    }
    1534     av_log(s, AV_LOG_DEBUG, "Client bandwidth = %d\n", rt->client_report_size);
     1534    av_log(s, AV_LOG_DEBUG, "Client bandwidth = %"PRId64"\n", rt->client_report_size);
    15351535    rt->client_report_size >>= 1;
    15361536
    15371537    return 0;