Revision b9b8ed2a

View differences:

libavformat/rtpdec_h264.c
134 134

  
135 135
            packet_size= av_base64_decode(decoded_packet, base64packet, sizeof(decoded_packet));
136 136
            if (packet_size) {
137
                uint8_t *dest= av_malloc(packet_size+sizeof(start_sequence)+codec->extradata_size);
137
                uint8_t *dest = av_malloc(packet_size + sizeof(start_sequence) +
138
                                         codec->extradata_size +
139
                                         FF_INPUT_BUFFER_PADDING_SIZE);
138 140
                if(dest)
139 141
                {
140 142
                    if(codec->extradata_size)
......
146 148

  
147 149
                    memcpy(dest+codec->extradata_size, start_sequence, sizeof(start_sequence));
148 150
                    memcpy(dest+codec->extradata_size+sizeof(start_sequence), decoded_packet, packet_size);
151
                    memset(dest+codec->extradata_size+sizeof(start_sequence)+
152
                           packet_size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
149 153

  
150 154
                    codec->extradata= dest;
151 155
                    codec->extradata_size+= sizeof(start_sequence)+packet_size;

Also available in: Unified diff