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