Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
c01d738a
Commit
c01d738a
authored
Feb 02, 2004
by
Laurent Aimar
Browse files
* nsv: full fractional frame rate support.
Patch from Vitalijus dot Slavinskas at stud dot ktu dot lt
parent
90a72314
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/demux/nsv.c
View file @
c01d738a
...
...
@@ -2,7 +2,7 @@
* nsv.c: NullSoft Video demuxer.
*****************************************************************************
* Copyright (C) 2004 VideoLAN
* $Id: nsv.c,v 1.
5
2004/0
1/25 20:05:28 hartman
Exp $
* $Id: nsv.c,v 1.
6
2004/0
2/02 10:34:22 fenrir
Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
...
...
@@ -444,25 +444,32 @@ static int ReadNSVs( demux_t *p_demux )
if
(
header
[
16
]
&
0x80
)
{
switch
(
header
[
16
]
&
0x7f
)
/* Fractional frame rate */
switch
(
header
[
16
]
&
0x03
)
{
case
1
:
/*
29.97
fps */
p_sys
->
i_pcr_inc
=
333
67
;
case
0
:
/*
30
fps */
p_sys
->
i_pcr_inc
=
333
33
;
/* 300000/9 */
break
;
case
3
:
/* 2
3
.97
6
fps */
p_sys
->
i_pcr_inc
=
41708
;
case
1
:
/* 2
9
.97 fps */
p_sys
->
i_pcr_inc
=
33367
;
/* 300300/9 */
break
;
case
5
:
/*
14.98
fps */
p_sys
->
i_pcr_inc
=
66755
;
case
2
:
/*
25
fps */
p_sys
->
i_pcr_inc
=
40000
;
/* 360000/9 */
break
;
default:
msg_Dbg
(
p_demux
,
"unknown fps (0x%x)"
,
header
[
16
]
);
p_sys
->
i_pcr_inc
=
40000
;
case
3
:
/* 23.98 fps */
p_sys
->
i_pcr_inc
=
41700
;
/* 375300/9 */
break
;
}
if
(
header
[
16
]
<
0xc0
)
p_sys
->
i_pcr_inc
=
p_sys
->
i_pcr_inc
*
(((
header
[
16
]
^
0x80
)
>>
2
)
+
1
);
else
p_sys
->
i_pcr_inc
=
p_sys
->
i_pcr_inc
/
(((
header
[
16
]
^
0xc0
)
>>
2
)
+
1
);
}
}
else
if
(
header
[
16
]
!=
0
)
{
/* Integer frame rate */
p_sys
->
i_pcr_inc
=
1000000
/
header
[
16
];
}
else
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment