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
260fc0d9
Commit
260fc0d9
authored
Nov 18, 2013
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/libxavs: 2nd attempt to fix compilation after
b18c7c8d
.
parent
71cd83e3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
libxavs.c
libavcodec/libxavs.c
+8
-8
No files found.
libavcodec/libxavs.c
View file @
260fc0d9
...
...
@@ -113,7 +113,7 @@ static int encode_nals(AVCodecContext *ctx, AVPacket *pkt,
static
int
XAVS_frame
(
AVCodecContext
*
avctx
,
AVPacket
*
pkt
,
const
AVFrame
*
frame
,
int
*
got_packet
)
{
XavsContext
*
x4
=
ctx
->
priv_data
;
XavsContext
*
x4
=
av
ctx
->
priv_data
;
xavs_nal_t
*
nal
;
int
nnal
,
i
,
ret
;
xavs_picture_t
pic_out
;
...
...
@@ -129,29 +129,29 @@ static int XAVS_frame(AVCodecContext *avctx, AVPacket *pkt,
x4
->
pic
.
i_pts
=
frame
->
pts
;
x4
->
pic
.
i_type
=
XAVS_TYPE_AUTO
;
x4
->
pts_buffer
[
ctx
->
frame_number
%
(
ctx
->
max_b_frames
+
1
)]
=
frame
->
pts
;
x4
->
pts_buffer
[
avctx
->
frame_number
%
(
av
ctx
->
max_b_frames
+
1
)]
=
frame
->
pts
;
}
if
(
xavs_encoder_encode
(
x4
->
enc
,
&
nal
,
&
nnal
,
frame
?
&
x4
->
pic
:
NULL
,
&
pic_out
)
<
0
)
return
-
1
;
ret
=
encode_nals
(
ctx
,
pkt
,
nal
,
nnal
);
ret
=
encode_nals
(
av
ctx
,
pkt
,
nal
,
nnal
);
if
(
ret
<
0
)
return
-
1
;
if
(
!
ret
)
{
if
(
!
frame
&&
!
(
x4
->
end_of_stream
))
{
if
((
ret
=
ff_alloc_packet2
(
ctx
,
pkt
,
4
))
<
0
)
if
((
ret
=
ff_alloc_packet2
(
av
ctx
,
pkt
,
4
))
<
0
)
return
ret
;
pkt
->
data
[
0
]
=
0x0
;
pkt
->
data
[
1
]
=
0x0
;
pkt
->
data
[
2
]
=
0x01
;
pkt
->
data
[
3
]
=
0xb1
;
pkt
->
dts
=
2
*
x4
->
pts_buffer
[(
x4
->
out_frame_count
-
1
)
%
(
ctx
->
max_b_frames
+
1
)]
-
x4
->
pts_buffer
[(
x4
->
out_frame_count
-
2
)
%
(
ctx
->
max_b_frames
+
1
)];
pkt
->
dts
=
2
*
x4
->
pts_buffer
[(
x4
->
out_frame_count
-
1
)
%
(
av
ctx
->
max_b_frames
+
1
)]
-
x4
->
pts_buffer
[(
x4
->
out_frame_count
-
2
)
%
(
av
ctx
->
max_b_frames
+
1
)];
x4
->
end_of_stream
=
END_OF_STREAM
;
*
got_packet
=
1
;
}
...
...
@@ -160,11 +160,11 @@ static int XAVS_frame(AVCodecContext *avctx, AVPacket *pkt,
avctx
->
coded_frame
->
pts
=
pic_out
.
i_pts
;
pkt
->
pts
=
pic_out
.
i_pts
;
if
(
ctx
->
has_b_frames
)
{
if
(
av
ctx
->
has_b_frames
)
{
if
(
!
x4
->
out_frame_count
)
pkt
->
dts
=
pkt
->
pts
-
(
x4
->
pts_buffer
[
1
]
-
x4
->
pts_buffer
[
0
]);
else
pkt
->
dts
=
x4
->
pts_buffer
[(
x4
->
out_frame_count
-
1
)
%
(
ctx
->
max_b_frames
+
1
)];
pkt
->
dts
=
x4
->
pts_buffer
[(
x4
->
out_frame_count
-
1
)
%
(
av
ctx
->
max_b_frames
+
1
)];
}
else
pkt
->
dts
=
pkt
->
pts
;
...
...
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