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
0f583d20
Commit
0f583d20
authored
Sep 29, 2012
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpeg12: fix the semantics of the int* parameter of decode()
It is got_output, not data_size.
parent
d9a2e87b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
mpeg12.c
libavcodec/mpeg12.c
+6
-6
No files found.
libavcodec/mpeg12.c
View file @
0f583d20
...
@@ -2186,7 +2186,7 @@ int ff_mpeg1_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size,
...
@@ -2186,7 +2186,7 @@ int ff_mpeg1_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size,
}
}
static
int
decode_chunks
(
AVCodecContext
*
avctx
,
static
int
decode_chunks
(
AVCodecContext
*
avctx
,
AVFrame
*
picture
,
int
*
data_size
,
AVFrame
*
picture
,
int
*
got_output
,
const
uint8_t
*
buf
,
int
buf_size
)
const
uint8_t
*
buf
,
int
buf_size
)
{
{
Mpeg1Context
*
s
=
avctx
->
priv_data
;
Mpeg1Context
*
s
=
avctx
->
priv_data
;
...
@@ -2215,7 +2215,7 @@ static int decode_chunks(AVCodecContext *avctx,
...
@@ -2215,7 +2215,7 @@ static int decode_chunks(AVCodecContext *avctx,
if
(
slice_end
(
avctx
,
picture
))
{
if
(
slice_end
(
avctx
,
picture
))
{
if
(
s2
->
last_picture_ptr
||
s2
->
low_delay
)
//FIXME merge with the stuff in mpeg_decode_slice
if
(
s2
->
last_picture_ptr
||
s2
->
low_delay
)
//FIXME merge with the stuff in mpeg_decode_slice
*
data_size
=
sizeof
(
AVPicture
)
;
*
got_output
=
1
;
}
}
}
}
s2
->
pict_type
=
0
;
s2
->
pict_type
=
0
;
...
@@ -2417,7 +2417,7 @@ static int decode_chunks(AVCodecContext *avctx,
...
@@ -2417,7 +2417,7 @@ static int decode_chunks(AVCodecContext *avctx,
}
}
static
int
mpeg_decode_frame
(
AVCodecContext
*
avctx
,
static
int
mpeg_decode_frame
(
AVCodecContext
*
avctx
,
void
*
data
,
int
*
data_size
,
void
*
data
,
int
*
got_output
,
AVPacket
*
avpkt
)
AVPacket
*
avpkt
)
{
{
const
uint8_t
*
buf
=
avpkt
->
data
;
const
uint8_t
*
buf
=
avpkt
->
data
;
...
@@ -2433,7 +2433,7 @@ static int mpeg_decode_frame(AVCodecContext *avctx,
...
@@ -2433,7 +2433,7 @@ static int mpeg_decode_frame(AVCodecContext *avctx,
*
picture
=
s2
->
next_picture_ptr
->
f
;
*
picture
=
s2
->
next_picture_ptr
->
f
;
s2
->
next_picture_ptr
=
NULL
;
s2
->
next_picture_ptr
=
NULL
;
*
data_size
=
sizeof
(
AVFrame
)
;
*
got_output
=
1
;
}
}
return
buf_size
;
return
buf_size
;
}
}
...
@@ -2451,12 +2451,12 @@ static int mpeg_decode_frame(AVCodecContext *avctx,
...
@@ -2451,12 +2451,12 @@ static int mpeg_decode_frame(AVCodecContext *avctx,
s
->
slice_count
=
0
;
s
->
slice_count
=
0
;
if
(
avctx
->
extradata
&&
!
avctx
->
frame_number
)
{
if
(
avctx
->
extradata
&&
!
avctx
->
frame_number
)
{
int
ret
=
decode_chunks
(
avctx
,
picture
,
data_size
,
avctx
->
extradata
,
avctx
->
extradata_size
);
int
ret
=
decode_chunks
(
avctx
,
picture
,
got_output
,
avctx
->
extradata
,
avctx
->
extradata_size
);
if
(
ret
<
0
&&
(
avctx
->
err_recognition
&
AV_EF_EXPLODE
))
if
(
ret
<
0
&&
(
avctx
->
err_recognition
&
AV_EF_EXPLODE
))
return
ret
;
return
ret
;
}
}
return
decode_chunks
(
avctx
,
picture
,
data_size
,
buf
,
buf_size
);
return
decode_chunks
(
avctx
,
picture
,
got_output
,
buf
,
buf_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