Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
b1acf5d7
Commit
b1acf5d7
authored
Aug 20, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AVRn: fix progressive
Fixes Ticket970 Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
ba2cf854
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
avrndec.c
libavcodec/avrndec.c
+2
-1
No files found.
libavcodec/avrndec.c
View file @
b1acf5d7
...
...
@@ -76,6 +76,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
AVFrame
*
p
=
&
a
->
frame
;
const
uint8_t
*
buf
=
avpkt
->
data
;
int
buf_size
=
avpkt
->
size
;
int
true_height
=
buf_size
/
(
2
*
avctx
->
width
);
int
y
;
if
(
a
->
is_mjpeg
)
...
...
@@ -97,7 +98,6 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
p
->
key_frame
=
1
;
if
(
a
->
interlace
)
{
int
true_height
=
buf_size
/
(
2
*
avctx
->
width
);
buf
+=
(
true_height
-
avctx
->
height
)
*
avctx
->
width
;
for
(
y
=
0
;
y
<
avctx
->
height
-
1
;
y
+=
2
)
{
memcpy
(
p
->
data
[
0
]
+
(
y
+
a
->
tff
)
*
p
->
linesize
[
0
],
buf
,
2
*
avctx
->
width
);
...
...
@@ -105,6 +105,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
buf
+=
2
*
avctx
->
width
;
}
}
else
{
buf
+=
(
true_height
-
avctx
->
height
)
*
avctx
->
width
*
2
;
for
(
y
=
0
;
y
<
avctx
->
height
;
y
++
)
{
memcpy
(
p
->
data
[
0
]
+
y
*
p
->
linesize
[
0
],
buf
,
2
*
avctx
->
width
);
buf
+=
2
*
avctx
->
width
;
...
...
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