42 #define EXTRADATA1_SIZE (6 + 256 * 3)
44 #define FORM_TAG MKBETAG('F', 'O', 'R', 'M')
45 #define RLV2_TAG MKBETAG('R', 'L', 'V', '2')
46 #define RLV3_TAG MKBETAG('R', 'L', 'V', '3')
81 unsigned int audio_frame_counter = 0;
82 unsigned int video_frame_counter = 0;
83 unsigned int back_size;
84 unsigned short sound_rate;
86 unsigned short channels;
87 unsigned short def_sound_size;
89 unsigned int pts_den = 11025;
90 unsigned int pts_num = 1103;
91 unsigned int* chunk_offset = NULL;
92 int* chunk_size = NULL;
104 if(back_size > INT_MAX/2 || frame_count > INT_MAX /
sizeof(uint32_t))
127 if(signature ==
RLV3_TAG && back_size > 0)
135 if (!channels || channels > 42) {
140 pts_num = def_sound_size;
161 chunk_size =
av_malloc(frame_count *
sizeof(uint32_t));
162 audio_size =
av_malloc(frame_count *
sizeof(uint32_t));
163 chunk_offset =
av_malloc(frame_count *
sizeof(uint32_t));
165 if(!chunk_size || !audio_size || !chunk_offset){
182 if(chunk_size[i] < 0 || audio_size[i] > chunk_size[i]){
187 if(sound_rate && audio_size[i]){
190 audio_frame_counter += audio_size[i] / channels;
194 ++video_frame_counter;
220 int64_t pos = INT64_MAX;
242 if(ret != sample->
size){