summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/demuxers/demux_nsv.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/demuxers/demux_nsv.c b/src/demuxers/demux_nsv.c
index fb2abd252..c0b61c28d 100644
--- a/src/demuxers/demux_nsv.c
+++ b/src/demuxers/demux_nsv.c
@@ -21,7 +21,7 @@
* For more information regarding the NSV file format, visit:
* http://www.pcisys.net/~melanson/codecs/
*
- * $Id: demux_nsv.c,v 1.1 2003/05/19 21:59:46 tmmm Exp $
+ * $Id: demux_nsv.c,v 1.2 2003/05/27 03:39:52 tmmm Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -140,6 +140,8 @@ static int open_nsv_file(demux_nsv_t *this) {
this->input->seek(this->input, 4, SEEK_SET);
}
+ this->data_size = this->input->get_length(this->input);
+
if (BE_32(&preview[0]) == NSVf_TAG) {
/* if there is a NSVs tag, load 24 more header bytes; load starting at
@@ -153,19 +155,20 @@ static int open_nsv_file(demux_nsv_t *this) {
/* skip the rest of the data */
this->input->seek(this->input, LE_32(&preview[4]) - 28, SEEK_CUR);
+ /* get the first 4 bytes of the next chunk */
+ if (this->input->read(this->input, preview, 4) != 4)
+ return 0;
}
- this->data_size = this->input->get_length(this->input);
-
- /* fetch the 16 header bytes of the first chunk to get the relevant
- * information */
- if (this->input->read(this->input, preview, 16) != 16)
- return 0;
-
/* make sure it is a 'NSVs' chunk */
if (preview[3] != 's')
return 0;
+ /* fetch the remaining 12 header bytes of the first chunk to get the
+ * relevant information */
+ if (this->input->read(this->input, &preview[4], 12) != 12)
+ return 0;
+
this->video_fourcc = ME_32(&preview[4]);
if (BE_32(&preview[4]) == NONE_TAG)
this->video_type = 0;
@@ -268,6 +271,11 @@ static int demux_nsv_send_chunk(demux_plugin_t *this_gen) {
this->frame_pts_inc = 3003;
break;
+ case 3:
+ /* 23.976 fps */
+ this->frame_pts_inc = 3753;
+ break;
+
case 5:
/* 14.98 fps */
this->frame_pts_inc = 6006;