Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
external
ffmpeg
Commits
d017ab70
Commit
d017ab70
authored
Oct 09, 2002
by
Fabrice Bellard
Browse files
support buffers containing more than one frame
Originally committed as revision 1016 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
f20dca40
Changes
1
Hide whitespace changes
Inline
Side-by-side
libavcodec/dv.c
View file @
d017ab70
...
...
@@ -494,7 +494,7 @@ static int dvvideo_decode_frame(AVCodecContext *avctx,
UINT8
*
buf
,
int
buf_size
)
{
DVVideoDecodeContext
*
s
=
avctx
->
priv_data
;
int
sct
,
dsf
,
apt
,
ds
,
nb_dif_segs
,
vs
,
size
,
width
,
height
,
i
;
int
sct
,
dsf
,
apt
,
ds
,
nb_dif_segs
,
vs
,
size
,
width
,
height
,
i
,
packet_size
;
UINT8
*
buf_ptr
;
const
UINT16
*
mb_pos_ptr
;
AVPicture
*
picture
;
...
...
@@ -531,17 +531,18 @@ static int dvvideo_decode_frame(AVCodecContext *avctx,
/* init size */
width
=
720
;
if
(
dsf
)
{
if
(
buf_size
!=
PAL_FRAME_SIZE
)
return
-
1
;
packet_size
=
PAL_FRAME_SIZE
;
height
=
576
;
nb_dif_segs
=
12
;
}
else
{
if
(
buf_size
!=
NTSC_FRAME_SIZE
)
return
-
1
;
packet_size
=
NTSC_FRAME_SIZE
;
height
=
480
;
nb_dif_segs
=
10
;
}
/* NOTE: we only accept several full frames */
if
(
buf_size
<
packet_size
)
return
-
1
;
/* XXX: is it correct to assume that 420 is always used in PAL
mode ? */
s
->
sampling_411
=
!
dsf
;
...
...
@@ -604,8 +605,7 @@ static int dvvideo_decode_frame(AVCodecContext *avctx,
picture
->
data
[
i
]
=
s
->
current_picture
[
i
];
picture
->
linesize
[
i
]
=
s
->
linesize
[
i
];
}
return
buf_size
;
return
packet_size
;
}
static
int
dvvideo_decode_end
(
AVCodecContext
*
avctx
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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