comparison nsvdec.c @ 2002:1aa1bc9c5be8 libavformat

factorize
author michael
date Sun, 08 Apr 2007 11:37:04 +0000
parents 1a3c9056982a
children 05b383b1c46c
comparison
equal deleted inserted replaced
2001:1a3c9056982a 2002:1aa1bc9c5be8
726 static int nsv_probe(AVProbeData *p) 726 static int nsv_probe(AVProbeData *p)
727 { 727 {
728 int i; 728 int i;
729 // PRINT(("nsv_probe(), buf_size %d\n", p->buf_size)); 729 // PRINT(("nsv_probe(), buf_size %d\n", p->buf_size));
730 /* check file header */ 730 /* check file header */
731 if (p->buf[0] == 'N' && p->buf[1] == 'S' &&
732 p->buf[2] == 'V' && p->buf[3] == 'f')
733 return AVPROBE_SCORE_MAX;
734 /* streamed files might not have any header */ 731 /* streamed files might not have any header */
735 if (p->buf[0] == 'N' && p->buf[1] == 'S' && 732 if (p->buf[0] == 'N' && p->buf[1] == 'S' &&
736 p->buf[2] == 'V' && p->buf[3] == 's') 733 p->buf[2] == 'V' && (p->buf[3] == 'f' || p->buf[3] == 's'))
737 return AVPROBE_SCORE_MAX; 734 return AVPROBE_SCORE_MAX;
738 /* XXX: do streamed files always start at chunk boundary ?? */ 735 /* XXX: do streamed files always start at chunk boundary ?? */
739 /* or do we need to search NSVs in the byte stream ? */ 736 /* or do we need to search NSVs in the byte stream ? */
740 /* seems the servers don't bother starting clean chunks... */ 737 /* seems the servers don't bother starting clean chunks... */
741 /* sometimes even the first header is at 9KB or something :^) */ 738 /* sometimes even the first header is at 9KB or something :^) */