40 #define EXTRADATA1_SIZE (6 + 256 * 3)
42 #define FORM_TAG MKBETAG('F', 'O', 'R', 'M')
43 #define RLV2_TAG MKBETAG('R', 'L', 'V', '2')
44 #define RLV3_TAG MKBETAG('R', 'L', 'V', '3')
79 unsigned int audio_frame_counter = 0;
80 unsigned int video_frame_counter = 0;
81 unsigned int back_size;
82 unsigned short sound_rate;
84 unsigned short channels;
85 unsigned short def_sound_size;
87 unsigned int pts_den = 11025;
88 unsigned int pts_num = 1103;
89 unsigned int* chunk_offset =
NULL;
90 int* chunk_size =
NULL;
102 if(back_size > INT_MAX/2 || frame_count > INT_MAX /
sizeof(uint32_t))
125 if(signature ==
RLV3_TAG && back_size > 0)
142 pts_num = def_sound_size;
163 chunk_size =
av_malloc(frame_count *
sizeof(uint32_t));
164 audio_size =
av_malloc(frame_count *
sizeof(uint32_t));
165 chunk_offset =
av_malloc(frame_count *
sizeof(uint32_t));
167 if(!chunk_size || !audio_size || !chunk_offset){
184 if(chunk_size[i] < 0 || audio_size[i] > chunk_size[i]){
189 if(sound_rate && audio_size[i]){
192 audio_frame_counter += audio_size[i] / channels;
196 ++video_frame_counter;
222 int64_t pos = INT64_MAX;
244 if(ret != sample->
size){