comparison nsvdec.c @ 4526:ae2fe097a3e0 libavformat

use new metadata API in nsv demuxer
author aurel
date Wed, 18 Feb 2009 00:02:38 +0000
parents 042e9a2fdda2
children 0adc245688ca
comparison
equal deleted inserted replaced
4525:c66cf692bea0 4526:ae2fe097a3e0
335 p = strchr(p, quote); 335 p = strchr(p, quote);
336 if (!p || p >= endp) 336 if (!p || p >= endp)
337 break; 337 break;
338 *p++ = '\0'; 338 *p++ = '\0';
339 PRINT(("NSV NSVf INFO: %s='%s'\n", token, value)); 339 PRINT(("NSV NSVf INFO: %s='%s'\n", token, value));
340 if (!strcmp(token, "ASPECT")) { 340 av_metadata_set(&s->metadata, token, value);
341 /* don't care */
342 } else if (!strcmp(token, "CREATOR") || !strcmp(token, "Author")) {
343 strncpy(s->author, value, 512-1);
344 } else if (!strcmp(token, "Copyright")) {
345 strncpy(s->copyright, value, 512-1);
346 } else if (!strcmp(token, "TITLE") || !strcmp(token, "Title")) {
347 strncpy(s->title, value, 512-1);
348 }
349 } 341 }
350 av_free(strings); 342 av_free(strings);
351 } 343 }
352 if (url_feof(pb)) 344 if (url_feof(pb))
353 return -1; 345 return -1;