Revision e6b244a3 libavformat/rtmpproto.c

View differences:

libavformat/rtmpproto.c
63 63
    uint8_t*      flv_data;                   ///< buffer with data for demuxer
64 64
    int           flv_size;                   ///< current buffer size
65 65
    int           flv_off;                    ///< number of bytes read from current buffer
66
    uint32_t      video_ts;                   ///< current video timestamp in milliseconds
67
    uint32_t      audio_ts;                   ///< current audio timestamp in milliseconds
68 66
} RTMPContext;
69 67

  
70 68
#define PLAYER_KEY_OPEN_PART_LEN 30   ///< length of partial key used for first client digest signing
......
515 513
            uint8_t *p;
516 514
            uint32_t ts = rpkt.timestamp;
517 515

  
518
            if (rpkt.type == RTMP_PT_VIDEO) {
519
                rt->video_ts += rpkt.timestamp;
520
                ts = rt->video_ts;
521
            } else if (rpkt.type == RTMP_PT_AUDIO) {
522
                rt->audio_ts += rpkt.timestamp;
523
                ts = rt->audio_ts;
524
            }
525 516
            // generate packet header and put data into buffer for FLV demuxer
526 517
            rt->flv_off  = 0;
527 518
            rt->flv_size = rpkt.data_size + 15;

Also available in: Unified diff