Mercurial > libavformat.hg
comparison nutdec.c @ 2189:da71207a7cf1 libavformat
use new string functions
based on patch by Reimar Dffinger
author | mru |
---|---|
date | Sat, 23 Jun 2007 23:10:32 +0000 |
parents | 4452d75a9298 |
children | 06083249909c |
comparison
equal
deleted
inserted
replaced
2188:4c2924cebe00 | 2189:da71207a7cf1 |
---|---|
21 * | 21 * |
22 */ | 22 */ |
23 | 23 |
24 #include "tree.h" | 24 #include "tree.h" |
25 #include "nut.h" | 25 #include "nut.h" |
26 #include "avstring.h" | |
26 | 27 |
27 #undef NDEBUG | 28 #undef NDEBUG |
28 #include <assert.h> | 29 #include <assert.h> |
29 | 30 |
30 static uint64_t get_v(ByteIOContext *bc){ | 31 static uint64_t get_v(ByteIOContext *bc){ |
402 type= "v"; | 403 type= "v"; |
403 } | 404 } |
404 | 405 |
405 if(chapter_id==0 && !strcmp(type, "UTF-8")){ | 406 if(chapter_id==0 && !strcmp(type, "UTF-8")){ |
406 if (!strcmp(name, "Author")) | 407 if (!strcmp(name, "Author")) |
407 pstrcpy(s->author , sizeof(s->author) , str_value); | 408 av_strlcpy(s->author , str_value, sizeof(s->author)); |
408 else if(!strcmp(name, "Title")) | 409 else if(!strcmp(name, "Title")) |
409 pstrcpy(s->title , sizeof(s->title) , str_value); | 410 av_strlcpy(s->title , str_value, sizeof(s->title)); |
410 else if(!strcmp(name, "Copyright")) | 411 else if(!strcmp(name, "Copyright")) |
411 pstrcpy(s->copyright, sizeof(s->copyright), str_value); | 412 av_strlcpy(s->copyright, str_value, sizeof(s->copyright)); |
412 else if(!strcmp(name, "Description")) | 413 else if(!strcmp(name, "Description")) |
413 pstrcpy(s->comment , sizeof(s->comment) , str_value); | 414 av_strlcpy(s->comment , str_value, sizeof(s->comment)); |
414 } | 415 } |
415 } | 416 } |
416 | 417 |
417 if(skip_reserved(bc, end) || get_checksum(bc)){ | 418 if(skip_reserved(bc, end) || get_checksum(bc)){ |
418 av_log(s, AV_LOG_ERROR, "Info header checksum mismatch\n"); | 419 av_log(s, AV_LOG_ERROR, "Info header checksum mismatch\n"); |