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
e3cfe541
Commit
e3cfe541
authored
Oct 07, 2011
by
Jordi Ortiz
Committed by
Michael Niedermayer
Oct 30, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dirac now returns AVFrames instead of DiracFrames
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
5d50fcc5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
diracdec.c
libavcodec/diracdec.c
+11
-9
No files found.
libavcodec/diracdec.c
View file @
e3cfe541
...
@@ -1661,7 +1661,7 @@ static int dirac_decode_picture_header(DiracContext *s)
...
@@ -1661,7 +1661,7 @@ static int dirac_decode_picture_header(DiracContext *s)
return
0
;
return
0
;
}
}
static
int
get_delayed_pic
(
DiracContext
*
s
,
Dirac
Frame
*
picture
,
int
*
data_size
)
static
int
get_delayed_pic
(
DiracContext
*
s
,
AV
Frame
*
picture
,
int
*
data_size
)
{
{
DiracFrame
*
out
=
s
->
delay_frames
[
0
];
DiracFrame
*
out
=
s
->
delay_frames
[
0
];
int
i
,
out_idx
=
0
;
int
i
,
out_idx
=
0
;
...
@@ -1678,8 +1678,8 @@ static int get_delayed_pic(DiracContext *s, DiracFrame *picture, int *data_size)
...
@@ -1678,8 +1678,8 @@ static int get_delayed_pic(DiracContext *s, DiracFrame *picture, int *data_size)
if
(
out
)
{
if
(
out
)
{
out
->
avframe
.
reference
^=
DELAYED_PIC_REF
;
out
->
avframe
.
reference
^=
DELAYED_PIC_REF
;
*
data_size
=
sizeof
(
Dirac
Frame
);
*
data_size
=
sizeof
(
AV
Frame
);
*
picture
=
*
out
;
*
(
AVFrame
*
)
picture
=
out
->
avframe
;
}
}
return
0
;
return
0
;
...
@@ -1792,7 +1792,7 @@ static int dirac_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
...
@@ -1792,7 +1792,7 @@ static int dirac_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
// end of stream, so flush delayed pics
// end of stream, so flush delayed pics
if
(
buf_size
==
0
)
if
(
buf_size
==
0
)
return
get_delayed_pic
(
s
,
picture
,
data_size
);
return
get_delayed_pic
(
s
,
(
AVFrame
*
)
data
,
data_size
);
for
(;;)
{
for
(;;)
{
//[DIRAC_STD] Here starts the code from parse_info() defined in 9.6
//[DIRAC_STD] Here starts the code from parse_info() defined in 9.6
...
@@ -1815,10 +1815,12 @@ static int dirac_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
...
@@ -1815,10 +1815,12 @@ static int dirac_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
buf_idx
+=
4
;
buf_idx
+=
4
;
continue
;
continue
;
}
}
// [DIRAC_STD] dirac_decode_data_unit makes reference to the while defined in 9.3 inside the function parse_sequence()
// [DIRAC_STD] dirac_decode_data_unit makes reference to the while defined in 9.3 inside the function parse_sequence()
if
(
dirac_decode_data_unit
(
avctx
,
buf
+
buf_idx
,
data_unit_size
))
if
(
dirac_decode_data_unit
(
avctx
,
buf
+
buf_idx
,
data_unit_size
))
{
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"Error in dirac_decode_data_unit
\n
"
);
return
-
1
;
return
-
1
;
}
buf_idx
+=
data_unit_size
;
buf_idx
+=
data_unit_size
;
}
}
...
@@ -1846,13 +1848,13 @@ static int dirac_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
...
@@ -1846,13 +1848,13 @@ static int dirac_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
if
(
delayed_frame
)
{
if
(
delayed_frame
)
{
delayed_frame
->
avframe
.
reference
^=
DELAYED_PIC_REF
;
delayed_frame
->
avframe
.
reference
^=
DELAYED_PIC_REF
;
*
data_size
=
sizeof
(
DiracFrame
)
;
*
(
AVFrame
*
)
data
=
delayed_frame
->
avframe
;
*
picture
=
*
delayed_frame
;
*
data_size
=
sizeof
(
AVFrame
)
;
}
}
}
else
if
(
s
->
current_picture
->
avframe
.
display_picture_number
==
s
->
frame_number
)
{
}
else
if
(
s
->
current_picture
->
avframe
.
display_picture_number
==
s
->
frame_number
)
{
// The right frame at the right time :-)
// The right frame at the right time :-)
*
data_size
=
sizeof
(
DiracFrame
)
;
*
(
AVFrame
*
)
data
=
s
->
current_picture
->
avframe
;
*
picture
=
*
s
->
current_picture
;
*
data_size
=
sizeof
(
AVFrame
)
;
}
}
if
(
*
data_size
)
if
(
*
data_size
)
...
...
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