Revision e63a3628 libavformat/pva.c

View differences:

libavformat/pva.c
75 75
recover:
76 76
    startpos = url_ftell(pb);
77 77

  
78
    syncword = get_be16(pb);
79
    streamid = get_byte(pb);
80
    get_byte(pb);               /* counter not used */
81
    reserved = get_byte(pb);
82
    flags    = get_byte(pb);
83
    length   = get_be16(pb);
78
    syncword = avio_rb16(pb);
79
    streamid = avio_r8(pb);
80
    avio_r8(pb);               /* counter not used */
81
    reserved = avio_r8(pb);
82
    flags    = avio_r8(pb);
83
    length   = avio_rb16(pb);
84 84

  
85 85
    pts_flag = flags & 0x10;
86 86

  
......
101 101
    }
102 102

  
103 103
    if (streamid == PVA_VIDEO_PAYLOAD && pts_flag) {
104
        pva_pts = get_be32(pb);
104
        pva_pts = avio_rb32(pb);
105 105
        length -= 4;
106 106
    } else if (streamid == PVA_AUDIO_PAYLOAD) {
107 107
        /* PVA Audio Packets either start with a signaled PES packet or
......
113 113
                pes_flags;
114 114
            unsigned char pes_header_data[256];
115 115

  
116
            pes_signal             = get_be24(pb);
117
            get_byte(pb);
118
            pes_packet_length      = get_be16(pb);
119
            pes_flags              = get_be16(pb);
120
            pes_header_data_length = get_byte(pb);
116
            pes_signal             = avio_rb24(pb);
117
            avio_r8(pb);
118
            pes_packet_length      = avio_rb16(pb);
119
            pes_flags              = avio_rb16(pb);
120
            pes_header_data_length = avio_r8(pb);
121 121

  
122 122
            if (pes_signal != 1) {
123 123
                pva_log(s, AV_LOG_WARNING, "expected signaled PES packet, "
......
128 128
                goto recover;
129 129
            }
130 130

  
131
            get_buffer(pb, pes_header_data, pes_header_data_length);
131
            avio_read(pb, pes_header_data, pes_header_data_length);
132 132
            length -= 9 + pes_header_data_length;
133 133

  
134 134
            pes_packet_length -= 3 + pes_header_data_length;

Also available in: Unified diff