Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
13a3e2a9
Commit
13a3e2a9
authored
Sep 24, 2023
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/rtv1: stop returning incomplete frames
parent
b61733f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
rtv1.c
libavcodec/rtv1.c
+5
-3
No files found.
libavcodec/rtv1.c
View file @
13a3e2a9
...
...
@@ -54,7 +54,7 @@ static int decode_rtv1(GetByteContext *gb, uint8_t *dst, ptrdiff_t linesize,
int
a
,
b
;
if
(
bytestream2_get_bytes_left
(
gb
)
<
4
)
break
;
return
AVERROR_INVALIDDATA
;
a
=
bytestream2_get_le16u
(
gb
);
b
=
bytestream2_get_le16u
(
gb
);
...
...
@@ -77,7 +77,7 @@ static int decode_rtv1(GetByteContext *gb, uint8_t *dst, ptrdiff_t linesize,
dxt1_block
(
dst
+
x
,
linesize
,
block
);
}
else
{
if
(
bytestream2_get_bytes_left
(
gb
)
<
12
*
4
)
break
;
return
AVERROR_INVALIDDATA
;
for
(
int
by
=
0
;
by
<
4
;
by
++
)
{
for
(
int
bx
=
0
;
bx
<
4
;
bx
++
)
...
...
@@ -126,7 +126,9 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p,
dst
=
p
->
data
[
0
]
+
p
->
linesize
[
0
]
*
(
avctx
->
coded_height
-
1
);
linesize
=
-
p
->
linesize
[
0
];
decode_rtv1
(
&
gb
,
dst
,
linesize
,
width
,
height
,
flags
,
dsp
->
dxt1_block
);
ret
=
decode_rtv1
(
&
gb
,
dst
,
linesize
,
width
,
height
,
flags
,
dsp
->
dxt1_block
);
if
(
ret
<
0
)
return
ret
;
p
->
pict_type
=
AV_PICTURE_TYPE_I
;
p
->
flags
|=
AV_FRAME_FLAG_KEY
;
...
...
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