2687
|
1 // VIVO file parser by A'rpi
|
2784
|
2 // VIVO text header parser by alex
|
2687
|
3
|
|
4 #include <stdio.h>
|
|
5 #include <stdlib.h>
|
|
6 #include <unistd.h>
|
2928
|
7 #include <string.h> /* strtok */
|
2687
|
8
|
|
9 #include "config.h"
|
|
10 #include "mp_msg.h"
|
|
11 #include "help_mp.h"
|
|
12
|
|
13 #include "stream.h"
|
|
14 #include "demuxer.h"
|
|
15 #include "stheader.h"
|
|
16
|
|
17 #include "bswap.h"
|
|
18
|
|
19 typedef struct {
|
2784
|
20 /* generic */
|
|
21 int supported;
|
|
22 /* info */
|
|
23 char *title;
|
|
24 char *author;
|
|
25 char *copyright;
|
|
26 char *producer;
|
|
27 /* video */
|
|
28 float fps;
|
|
29 int width;
|
|
30 int height;
|
|
31 int disp_width;
|
|
32 int disp_height;
|
|
33 /* audio */
|
|
34 int br;
|
|
35 int samplerate;
|
2687
|
36 } vivo_priv_t;
|
|
37
|
2784
|
38 /* parse all possible extra headers */
|
|
39 /* (audio headers are seperate - mostly with recordtype=3) */
|
|
40 #define TEXTPARSE_ALL 1
|
|
41
|
|
42 static void vivo_parse_text_header(demuxer_t *demux, int header_len)
|
|
43 {
|
|
44 vivo_priv_t* priv = demux->priv;
|
|
45 char *buf;
|
|
46 int i;
|
|
47 char *token;
|
|
48 char *opt, *param;
|
|
49
|
|
50 if (!demux->priv)
|
|
51 {
|
|
52 priv = malloc(sizeof(vivo_priv_t));
|
|
53 memset(priv, 0, sizeof(vivo_priv_t));
|
|
54 demux->priv = priv;
|
|
55 priv->supported = 0;
|
|
56 }
|
|
57
|
|
58 buf = malloc(header_len);
|
|
59 opt = malloc(header_len);
|
|
60 param = malloc(header_len);
|
|
61 stream_read(demux->stream, buf, header_len);
|
|
62 i=0;
|
|
63 while(i<header_len && buf[i]==0x0D && buf[i+1]==0x0A) i+=2; // skip empty lines
|
|
64
|
|
65 token = strtok(buf, (char *)&("\x0d\x0a"));
|
|
66 while (token && (header_len>2))
|
|
67 {
|
|
68 header_len -= strlen(token)+2;
|
|
69 if (sscanf(token, "%[^:]:%[^\n]", opt, param) != 2)
|
|
70 {
|
|
71 mp_msg(MSGT_DEMUX, MSGL_V, "viv_text_header_parser: bad line: '%s' at ~%p\n",
|
|
72 token, stream_tell(demux->stream));
|
|
73 break;
|
|
74 }
|
|
75 mp_msg(MSGT_DEMUX, MSGL_DBG3, "token: '%s' (%d bytes/%d bytes left)\n",
|
|
76 token, strlen(token), header_len);
|
|
77 mp_msg(MSGT_DEMUX, MSGL_DBG3, "token => o: '%s', p: '%s'\n",
|
|
78 opt, param);
|
|
79
|
|
80 /* checking versions: only v1 or v2 is suitable (or known?:) */
|
|
81 if (!strcmp(opt, "Version"))
|
|
82 {
|
|
83 mp_msg(MSGT_DEMUX, MSGL_DBG2, "Version: %s\n", param);
|
2928
|
84 if (!strncmp(param, "Vivo/1", 6) || !strncmp(param, "Vivo/2", 6))
|
|
85 // if (atoi(param) == 1 || atoi(param) == 2)
|
2784
|
86 priv->supported = 1;
|
|
87 }
|
|
88
|
|
89 /* video specific */
|
|
90 if (!strcmp(opt, "FPS"))
|
|
91 {
|
|
92 mp_msg(MSGT_DEMUX, MSGL_DBG2, "FPS: %f\n", atof(param));
|
|
93 priv->fps = atof(param);
|
|
94 }
|
|
95 if (!strcmp(opt, "Width"))
|
|
96 {
|
|
97 mp_msg(MSGT_DEMUX, MSGL_DBG2, "Width: %d\n", atoi(param));
|
|
98 priv->width = atoi(param);
|
|
99 }
|
|
100 if (!strcmp(opt, "Height"))
|
|
101 {
|
|
102 mp_msg(MSGT_DEMUX, MSGL_DBG2, "Height: %d\n", atoi(param));
|
|
103 priv->height = atoi(param);
|
|
104 }
|
|
105 if (!strcmp(opt, "DisplayWidth"))
|
|
106 {
|
|
107 mp_msg(MSGT_DEMUX, MSGL_DBG2, "Display Width: %d\n", atoi(param));
|
|
108 priv->disp_width = atoi(param);
|
|
109 }
|
|
110 if (!strcmp(opt, "DisplayHeight"))
|
|
111 {
|
|
112 mp_msg(MSGT_DEMUX, MSGL_DBG2, "Display Height: %d\n", atoi(param));
|
|
113 priv->disp_height = atoi(param);
|
|
114 }
|
|
115
|
|
116 /* audio specific */
|
|
117 if (!strcmp(opt, "NominalBitrate"))
|
|
118 {
|
|
119 mp_msg(MSGT_DEMUX, MSGL_DBG2, "Bitrate: %d\n", atoi(param));
|
|
120 priv->br = atoi(param);
|
|
121 }
|
|
122 if (!strcmp(opt, "SamplingFrequency"))
|
|
123 {
|
|
124 mp_msg(MSGT_DEMUX, MSGL_DBG2, "Samplerate: %d\n", atoi(param));
|
|
125 priv->samplerate = atoi(param);
|
|
126 }
|
|
127
|
|
128 /* only for displaying some informations about movie*/
|
|
129 if (!strcmp(opt, "Title"))
|
|
130 {
|
|
131 mp_msg(MSGT_DEMUX, MSGL_INFO, " Title: %s\n", param);
|
|
132 priv->title = malloc(strlen(param));
|
|
133 strcpy(priv->title, param);
|
|
134 }
|
|
135 if (!strcmp(opt, "Author"))
|
|
136 {
|
|
137 mp_msg(MSGT_DEMUX, MSGL_INFO, " Author: %s\n", param);
|
|
138 priv->author = malloc(strlen(param));
|
|
139 strcpy(priv->author, param);
|
|
140 }
|
|
141 if (!strcmp(opt, "Copyright"))
|
|
142 {
|
|
143 mp_msg(MSGT_DEMUX, MSGL_INFO, " Copyright: %s\n", param);
|
|
144 priv->copyright = malloc(strlen(param));
|
|
145 strcpy(priv->copyright, param);
|
|
146 }
|
|
147 if (!strcmp(opt, "Producer"))
|
|
148 {
|
|
149 mp_msg(MSGT_DEMUX, MSGL_INFO, " Producer: %s\n", param);
|
|
150 priv->producer = malloc(strlen(param));
|
|
151 strcpy(priv->producer, param);
|
|
152 }
|
|
153
|
|
154 /* get next token */
|
|
155 token = strtok(NULL, (char *)&("\x0d\x0a"));
|
|
156 }
|
2788
|
157
|
|
158 if (buf)
|
|
159 free(buf);
|
|
160 if (opt)
|
|
161 free(opt);
|
|
162 if (param)
|
|
163 free(param);
|
2784
|
164 }
|
|
165
|
2687
|
166 int vivo_check_file(demuxer_t* demuxer){
|
|
167 int flags=0;
|
|
168 int i=0;
|
|
169 int len;
|
|
170 int len2;
|
|
171 int c;
|
|
172 unsigned char buf[2048+256];
|
|
173 vivo_priv_t* priv;
|
2784
|
174 int orig_pos = stream_tell(demuxer->stream);
|
2687
|
175
|
|
176 mp_msg(MSGT_DEMUX,MSGL_V,"Checking for VIVO\n");
|
|
177
|
|
178 c=stream_read_char(demuxer->stream);
|
2792
|
179 if(c==-256) return 0;
|
2687
|
180 len=0;
|
|
181 while((c=stream_read_char(demuxer->stream))>=0x80){
|
|
182 len+=0x80*(c-0x80);
|
|
183 if(len>1024) return 0;
|
|
184 }
|
|
185 len+=c;
|
|
186 printf("header block 1 size: %d\n",len);
|
|
187 //stream_skip(demuxer->stream,len);
|
2928
|
188
|
|
189 priv=malloc(sizeof(vivo_priv_t));
|
|
190 memset(priv,0,sizeof(vivo_priv_t));
|
|
191 demuxer->priv=priv;
|
2784
|
192
|
2805
|
193 #if 0
|
2785
|
194 vivo_parse_text_header(demuxer, len);
|
2784
|
195 if (priv->supported == 0)
|
|
196 return 0;
|
|
197 #else
|
2928
|
198 /* this is enought for check (for now) */
|
|
199 stream_read(demuxer->stream,buf,len);
|
|
200 buf[len]=0;
|
|
201 // printf("VIVO header: '%s'\n",buf);
|
|
202
|
2687
|
203 // parse header:
|
|
204 i=0;
|
|
205 while(i<len && buf[i]==0x0D && buf[i+1]==0x0A) i+=2; // skip empty lines
|
2695
|
206 if(strncmp(buf+i,"Version:Vivo/",13)) return 0; // bad version/type!
|
2784
|
207 #endif
|
2687
|
208
|
2695
|
209 #if 0
|
2687
|
210 c=stream_read_char(demuxer->stream);
|
|
211 if(c) return 0;
|
|
212 len2=0;
|
|
213 while((c=stream_read_char(demuxer->stream))>=0x80){
|
|
214 len2+=0x80*(c-0x80);
|
|
215 if(len+len2>2048) return 0;
|
|
216 }
|
|
217 len2+=c;
|
|
218 printf("header block 2 size: %d\n",len2);
|
|
219 stream_skip(demuxer->stream,len2);
|
|
220 // stream_read(demuxer->stream,buf+len,len2);
|
2695
|
221 #endif
|
2687
|
222
|
|
223 // c=stream_read_char(demuxer->stream);
|
|
224 // printf("first packet: %02X\n",c);
|
|
225
|
2784
|
226 stream_seek(demuxer->stream, orig_pos);
|
|
227
|
2687
|
228 return 1;
|
|
229 }
|
|
230
|
|
231 // return value:
|
|
232 // 0 = EOF or no stream found
|
|
233 // 1 = successfully read a packet
|
|
234 int demux_vivo_fill_buffer(demuxer_t *demux){
|
|
235 demux_stream_t *ds=NULL;
|
|
236 int c;
|
|
237 int len=0;
|
|
238 int seq;
|
|
239 demux->filepos=stream_tell(demux->stream);
|
|
240
|
|
241 c=stream_read_char(demux->stream);
|
2792
|
242 if (c == -256) /* EOF */
|
|
243 return 0;
|
2695
|
244 // printf("c=%02X\n",c);
|
2687
|
245 switch(c&0xF0){
|
2695
|
246 case 0x00: // header - skip it!
|
2784
|
247 {
|
2687
|
248 len=stream_read_char(demux->stream);
|
2695
|
249 if(len>=0x80) len=0x80*(len-0x80)+stream_read_char(demux->stream);
|
|
250 printf("vivo extra header: %d bytes\n",len);
|
2784
|
251 #ifdef TEXTPARSE_ALL
|
|
252 {
|
|
253 int pos;
|
|
254 /* also try to parse all headers */
|
|
255 pos = stream_tell(demux->stream);
|
|
256 vivo_parse_text_header(demux, len);
|
|
257 stream_seek(demux->stream, pos);
|
|
258 }
|
|
259 #endif
|
2687
|
260 break;
|
2784
|
261 }
|
2687
|
262 case 0x10: // video packet
|
|
263 len=128;
|
|
264 ds=demux->video;
|
|
265 break;
|
|
266 case 0x20: // video packet
|
|
267 len=stream_read_char(demux->stream);
|
|
268 ds=demux->video;
|
|
269 break;
|
2695
|
270 case 0x30: // audio ?
|
|
271 len=0x28;
|
|
272 ds=demux->audio;
|
|
273 break;
|
2687
|
274 case 0x40: // audio packet
|
|
275 len=24;
|
|
276 ds=demux->audio;
|
|
277 break;
|
|
278 default:
|
|
279 mp_msg(MSGT_DEMUX,MSGL_WARN,"VIVO - unknown ID found: %02X contact author!\n",c);
|
|
280 }
|
|
281
|
2695
|
282 if(!ds || ds->id<-1){
|
2687
|
283 if(len) stream_skip(demux->stream,len);
|
|
284 return 1;
|
|
285 }
|
|
286
|
|
287 seq=c&0x0F;
|
|
288
|
|
289 if(ds->asf_packet){
|
|
290 if(ds->asf_seq!=seq){
|
|
291 // closed segment, finalize packet:
|
|
292 ds_add_packet(ds,ds->asf_packet);
|
|
293 ds->asf_packet=NULL;
|
2695
|
294 // printf("packet!\n");
|
2687
|
295 } else {
|
|
296 // append data to it!
|
|
297 demux_packet_t* dp=ds->asf_packet;
|
|
298 dp->buffer=realloc(dp->buffer,dp->len+len);
|
|
299 //memcpy(dp->buffer+dp->len,data,len);
|
|
300 stream_read(demux->stream,dp->buffer+dp->len,len);
|
|
301 mp_dbg(MSGT_DEMUX,MSGL_DBG4,"data appended! %d+%d\n",dp->len,len);
|
|
302 dp->len+=len;
|
|
303 // we are ready now.
|
2695
|
304 if((c&0xF0)==0x20) --ds->asf_seq; // hack!
|
2687
|
305 return 1;
|
|
306 }
|
|
307 }
|
|
308 // create new packet:
|
|
309 { demux_packet_t* dp;
|
|
310 dp=new_demux_packet(len);
|
|
311 //memcpy(dp->buffer,data,len);
|
|
312 stream_read(demux->stream,dp->buffer,len);
|
|
313 // dp->pts=time*0.001f;
|
|
314 // dp->flags=keyframe;
|
|
315 // if(ds==demux->video) printf("ASF time: %8d dur: %5d \n",time,dur);
|
|
316 dp->pos=demux->filepos;
|
|
317 ds->asf_packet=dp;
|
|
318 ds->asf_seq=seq;
|
|
319 // we are ready now.
|
|
320 return 1;
|
|
321 }
|
|
322
|
|
323 }
|
|
324
|
|
325 static const short h263_format[8][2] = {
|
|
326 { 0, 0 },
|
|
327 { 128, 96 },
|
|
328 { 176, 144 },
|
|
329 { 352, 288 },
|
|
330 { 704, 576 },
|
|
331 { 1408, 1152 },
|
2784
|
332 { 320, 240 } // ??????? or 240x180 (found in vivo2) ?
|
2687
|
333 };
|
|
334
|
|
335 static unsigned char* buffer;
|
|
336 static int bufptr=0;
|
|
337 static int bitcnt=0;
|
|
338 static unsigned char buf=0;
|
|
339 static int format, width, height;
|
|
340
|
|
341 static unsigned int x_get_bits(int n){
|
|
342 unsigned int x=0;
|
|
343 while(n-->0){
|
|
344 if(!bitcnt){
|
|
345 // fill buff
|
|
346 buf=buffer[bufptr++];
|
|
347 bitcnt=8;
|
|
348 }
|
|
349 //x=(x<<1)|(buf&1);buf>>=1;
|
|
350 x=(x<<1)|(buf>>7);buf<<=1;
|
|
351 --bitcnt;
|
|
352 }
|
|
353 return x;
|
|
354 }
|
|
355
|
|
356 #define get_bits(xxx,n) x_get_bits(n)
|
|
357 #define get_bits1(xxx) x_get_bits(1)
|
|
358 #define skip_bits(xxx,n) x_get_bits(n)
|
|
359 #define skip_bits1(xxx) x_get_bits(1)
|
|
360
|
|
361 /* most is hardcoded. should extend to handle all h263 streams */
|
|
362 static int h263_decode_picture_header(unsigned char *b_ptr)
|
|
363 {
|
2928
|
364 // int i;
|
2695
|
365
|
|
366 // for(i=0;i<16;i++) printf(" %02X",b_ptr[i]); printf("\n");
|
2687
|
367
|
|
368 buffer=b_ptr;
|
|
369 bufptr=bitcnt=buf=0;
|
|
370
|
|
371 /* picture header */
|
2695
|
372 if (get_bits(&s->gb, 22) != 0x20){
|
|
373 printf("bad picture header\n");
|
2687
|
374 return -1;
|
2695
|
375 }
|
2687
|
376 skip_bits(&s->gb, 8); /* picture timestamp */
|
|
377
|
2695
|
378 if (get_bits1(&s->gb) != 1){
|
|
379 printf("bad marker\n");
|
2687
|
380 return -1; /* marker */
|
2695
|
381 }
|
|
382 if (get_bits1(&s->gb) != 0){
|
|
383 printf("bad h263 id\n");
|
2687
|
384 return -1; /* h263 id */
|
2695
|
385 }
|
2687
|
386 skip_bits1(&s->gb); /* split screen off */
|
|
387 skip_bits1(&s->gb); /* camera off */
|
|
388 skip_bits1(&s->gb); /* freeze picture release off */
|
|
389
|
|
390 format = get_bits(&s->gb, 3);
|
|
391
|
|
392 if (format != 7) {
|
|
393 printf("h263_plus = 0 format = %d\n",format);
|
|
394 /* H.263v1 */
|
|
395 width = h263_format[format][0];
|
|
396 height = h263_format[format][1];
|
|
397 printf("%d x %d\n",width,height);
|
2695
|
398 // if (!width) return -1;
|
2687
|
399
|
|
400 printf("pict_type=%d\n",get_bits1(&s->gb));
|
|
401 printf("unrestricted_mv=%d\n",get_bits1(&s->gb));
|
|
402 #if 1
|
|
403 printf("SAC: %d\n",get_bits1(&s->gb));
|
|
404 printf("advanced prediction mode: %d\n",get_bits1(&s->gb));
|
|
405 printf("PB frame: %d\n",get_bits1(&s->gb));
|
|
406 #else
|
|
407 if (get_bits1(&s->gb) != 0)
|
|
408 return -1; /* SAC: off */
|
|
409 if (get_bits1(&s->gb) != 0)
|
|
410 return -1; /* advanced prediction mode: off */
|
|
411 if (get_bits1(&s->gb) != 0)
|
|
412 return -1; /* not PB frame */
|
|
413 #endif
|
|
414 printf("qscale=%d\n",get_bits(&s->gb, 5));
|
|
415 skip_bits1(&s->gb); /* Continuous Presence Multipoint mode: off */
|
|
416 } else {
|
|
417 printf("h263_plus = 1\n");
|
|
418 /* H.263v2 */
|
2695
|
419 if (get_bits(&s->gb, 3) != 1){
|
|
420 printf("H.263v2 A error\n");
|
2687
|
421 return -1;
|
2695
|
422 }
|
|
423 if (get_bits(&s->gb, 3) != 6){ /* custom source format */
|
|
424 printf("custom source format\n");
|
2687
|
425 return -1;
|
2695
|
426 }
|
2687
|
427 skip_bits(&s->gb, 12);
|
|
428 skip_bits(&s->gb, 3);
|
|
429 printf("pict_type=%d\n",get_bits(&s->gb, 3) + 1);
|
|
430 // if (s->pict_type != I_TYPE &&
|
|
431 // s->pict_type != P_TYPE)
|
|
432 // return -1;
|
|
433 skip_bits(&s->gb, 7);
|
|
434 skip_bits(&s->gb, 4); /* aspect ratio */
|
|
435 width = (get_bits(&s->gb, 9) + 1) * 4;
|
|
436 skip_bits1(&s->gb);
|
|
437 height = get_bits(&s->gb, 9) * 4;
|
|
438 printf("%d x %d\n",width,height);
|
2695
|
439 //if (height == 0)
|
|
440 // return -1;
|
2687
|
441 printf("qscale=%d\n",get_bits(&s->gb, 5));
|
|
442 }
|
|
443
|
|
444 /* PEI */
|
|
445 while (get_bits1(&s->gb) != 0) {
|
|
446 skip_bits(&s->gb, 8);
|
|
447 }
|
|
448 // s->f_code = 1;
|
|
449 // s->width = width;
|
|
450 // s->height = height;
|
|
451 return 0;
|
|
452 }
|
|
453
|
|
454
|
2695
|
455
|
2687
|
456 void demux_open_vivo(demuxer_t* demuxer){
|
|
457 vivo_priv_t* priv=demuxer->priv;
|
|
458
|
|
459 if(!ds_fill_buffer(demuxer->video)){
|
|
460 mp_msg(MSGT_DEMUX,MSGL_ERR,"VIVO: " MSGTR_MissingVideoStreamBug);
|
|
461 return;
|
|
462 }
|
|
463
|
|
464 h263_decode_picture_header(demuxer->video->buffer);
|
|
465
|
|
466
|
|
467 { sh_video_t* sh=new_sh_video(demuxer,0);
|
|
468
|
|
469 sh->format=0x6f766976; // "vivo"
|
2784
|
470 if(!sh->fps)
|
2928
|
471 {
|
2784
|
472 if (priv->fps)
|
|
473 sh->fps=priv->fps;
|
|
474 else
|
|
475 sh->fps=15.0f;
|
2928
|
476 }
|
2687
|
477 sh->frametime=1.0f/sh->fps;
|
2805
|
478
|
|
479 #warning "FIXME! we can't scale"
|
|
480 priv->disp_width = priv->width;
|
|
481 priv->disp_height = priv->height;
|
|
482
|
2784
|
483 if (priv->disp_width)
|
|
484 sh->disp_w = priv->disp_width;
|
|
485 else
|
|
486 sh->disp_w = width;
|
|
487 if (priv->disp_height)
|
|
488 sh->disp_h = priv->disp_height;
|
|
489 else
|
|
490 sh->disp_h = height;
|
2687
|
491
|
|
492 // emulate BITMAPINFOHEADER:
|
|
493 sh->bih=malloc(sizeof(BITMAPINFOHEADER));
|
|
494 memset(sh->bih,0,sizeof(BITMAPINFOHEADER));
|
|
495 sh->bih->biSize=40;
|
2784
|
496 if (priv->width)
|
|
497 sh->bih->biWidth = priv->width;
|
|
498 else
|
|
499 sh->bih->biWidth = width;
|
|
500 if (priv->height)
|
|
501 sh->bih->biHeight = priv->height;
|
|
502 else
|
|
503 sh->bih->biHeight = height;
|
2687
|
504 sh->bih->biPlanes=1;
|
|
505 sh->bih->biBitCount=24;
|
|
506 sh->bih->biCompression=sh->format;
|
|
507 sh->bih->biSizeImage=sh->bih->biWidth*sh->bih->biHeight*3;
|
|
508 demuxer->video->sh=sh; sh->ds=demuxer->video;
|
|
509 demuxer->video->id=0;
|
2928
|
510
|
|
511 demuxer->seekable = 0;
|
2788
|
512
|
2928
|
513 printf("VIVO Video stream %d size: display: %dx%d, codec: %lux%lu\n",
|
2788
|
514 demuxer->video->id, sh->disp_w, sh->disp_h, sh->bih->biWidth,
|
|
515 sh->bih->biHeight);
|
2687
|
516 }
|
|
517
|
2695
|
518 if(demuxer->audio->id>=-1){
|
2687
|
519 if(!ds_fill_buffer(demuxer->audio)){
|
|
520 mp_msg(MSGT_DEMUX,MSGL_ERR,"VIVO: " MSGTR_MissingAudioStream);
|
|
521 } else
|
|
522 { sh_audio_t* sh=new_sh_audio(demuxer,1);
|
2788
|
523
|
2687
|
524 sh->format=0x111; // 0x112
|
|
525 // Emulate WAVEFORMATEX struct:
|
|
526 sh->wf=malloc(sizeof(WAVEFORMATEX));
|
|
527 memset(sh->wf,0,sizeof(WAVEFORMATEX));
|
|
528 sh->wf->nChannels=1;
|
|
529 sh->wf->wBitsPerSample=16;
|
2788
|
530 // sh->wf->wBitsPerSample=8;
|
2784
|
531 if (priv->samplerate)
|
|
532 sh->wf->nSamplesPerSec=priv->samplerate;
|
|
533 else
|
|
534 sh->wf->nSamplesPerSec=22050;
|
2788
|
535 // sh->wf->nSamplesPerSec=8000;
|
2687
|
536 sh->wf->nAvgBytesPerSec=sh->wf->nChannels*sh->wf->wBitsPerSample*sh->wf->nSamplesPerSec/8;
|
|
537 demuxer->audio->sh=sh; sh->ds=demuxer->audio;
|
|
538 demuxer->audio->id=1;
|
|
539 }
|
2695
|
540 }
|
2687
|
541
|
|
542 }
|
|
543
|
2788
|
544 void demux_close_vivo(demuxer_t *demuxer)
|
|
545 {
|
|
546 vivo_priv_t* priv=demuxer->priv;
|
2809
|
547
|
|
548 if (priv) {
|
|
549 if (priv->title)
|
|
550 free(priv->title);
|
|
551 if (priv->author)
|
|
552 free(priv->author);
|
|
553 if (priv->copyright)
|
|
554 free(priv->copyright);
|
|
555 if (priv->producer)
|
|
556 free(priv->producer);
|
2788
|
557 free(priv);
|
2809
|
558 }
|
2788
|
559 return;
|
|
560 }
|