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
7bf8db4d
Commit
7bf8db4d
authored
Sep 22, 2016
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tdsc: use the new decoding API
parent
de2ae3c1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
tdsc.c
libavcodec/tdsc.c
+9
-6
No files found.
libavcodec/tdsc.c
View file @
7bf8db4d
...
@@ -343,7 +343,6 @@ static int tdsc_decode_jpeg_tile(AVCodecContext *avctx, int tile_size,
...
@@ -343,7 +343,6 @@ static int tdsc_decode_jpeg_tile(AVCodecContext *avctx, int tile_size,
{
{
TDSCContext
*
ctx
=
avctx
->
priv_data
;
TDSCContext
*
ctx
=
avctx
->
priv_data
;
AVPacket
jpkt
;
AVPacket
jpkt
;
int
got_frame
=
0
;
int
ret
;
int
ret
;
/* Prepare a packet and send to the MJPEG decoder */
/* Prepare a packet and send to the MJPEG decoder */
...
@@ -351,12 +350,16 @@ static int tdsc_decode_jpeg_tile(AVCodecContext *avctx, int tile_size,
...
@@ -351,12 +350,16 @@ static int tdsc_decode_jpeg_tile(AVCodecContext *avctx, int tile_size,
jpkt
.
data
=
ctx
->
tilebuffer
;
jpkt
.
data
=
ctx
->
tilebuffer
;
jpkt
.
size
=
tile_size
;
jpkt
.
size
=
tile_size
;
ret
=
avcodec_decode_video2
(
ctx
->
jpeg_avctx
,
ctx
->
jpgframe
,
ret
=
avcodec_send_packet
(
ctx
->
jpeg_avctx
,
&
jpkt
);
&
got_frame
,
&
jpkt
);
if
(
ret
<
0
)
{
if
(
ret
<
0
||
!
got_frame
||
ctx
->
jpgframe
->
format
!=
AV_PIX_FMT_YUVJ420P
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Error submitting a packet for decoding
\n
"
);
return
ret
;
}
ret
=
avcodec_receive_frame
(
ctx
->
jpeg_avctx
,
ctx
->
jpgframe
);
if
(
ret
<
0
||
ctx
->
jpgframe
->
format
!=
AV_PIX_FMT_YUVJ420P
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
av_log
(
avctx
,
AV_LOG_ERROR
,
"JPEG decoding error (%d) for (%d) frame.
\n
"
,
"JPEG decoding error (%d).
\n
"
,
ret
);
ret
,
got_frame
);
/* Normally skip, error if explode */
/* Normally skip, error if explode */
if
(
avctx
->
err_recognition
&
AV_EF_EXPLODE
)
if
(
avctx
->
err_recognition
&
AV_EF_EXPLODE
)
...
...
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