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
473a200d
Commit
473a200d
authored
Sep 01, 2005
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
error concealment fix
Originally committed as revision 4543 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
c619ff6d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
rv10.c
libavcodec/rv10.c
+13
-5
No files found.
libavcodec/rv10.c
View file @
473a200d
...
@@ -620,8 +620,14 @@ static int rv10_decode_packet(AVCodecContext *avctx,
...
@@ -620,8 +620,14 @@ static int rv10_decode_packet(AVCodecContext *avctx,
//if(s->pict_type == P_TYPE) return 0;
//if(s->pict_type == P_TYPE) return 0;
if
((
s
->
mb_x
==
0
&&
s
->
mb_y
==
0
)
||
s
->
current_picture_ptr
==
NULL
)
{
if
((
s
->
mb_x
==
0
&&
s
->
mb_y
==
0
)
||
s
->
current_picture_ptr
==
NULL
)
{
if
(
s
->
current_picture_ptr
){
//FIXME write parser so we always have complete frames?
ff_er_frame_end
(
s
);
MPV_frame_end
(
s
);
s
->
mb_x
=
s
->
mb_y
=
s
->
resync_mb_x
=
s
->
resync_mb_y
=
0
;
}
if
(
MPV_frame_start
(
s
,
avctx
)
<
0
)
if
(
MPV_frame_start
(
s
,
avctx
)
<
0
)
return
-
1
;
return
-
1
;
ff_er_frame_start
(
s
);
}
}
#ifdef DEBUG
#ifdef DEBUG
...
@@ -673,7 +679,7 @@ static int rv10_decode_packet(AVCodecContext *avctx,
...
@@ -673,7 +679,7 @@ static int rv10_decode_packet(AVCodecContext *avctx,
s
->
mv_type
=
MV_TYPE_16X16
;
s
->
mv_type
=
MV_TYPE_16X16
;
ret
=
ff_h263_decode_mb
(
s
,
s
->
block
);
ret
=
ff_h263_decode_mb
(
s
,
s
->
block
);
if
(
ret
==
SLICE_ERROR
)
{
if
(
ret
==
SLICE_ERROR
||
s
->
gb
.
size_in_bits
<
get_bits_count
(
&
s
->
gb
)
)
{
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"ERROR at MB %d %d
\n
"
,
s
->
mb_x
,
s
->
mb_y
);
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"ERROR at MB %d %d
\n
"
,
s
->
mb_x
,
s
->
mb_y
);
return
-
1
;
return
-
1
;
}
}
...
@@ -693,6 +699,8 @@ static int rv10_decode_packet(AVCodecContext *avctx,
...
@@ -693,6 +699,8 @@ static int rv10_decode_packet(AVCodecContext *avctx,
if
(
ret
==
SLICE_END
)
break
;
if
(
ret
==
SLICE_END
)
break
;
}
}
ff_er_add_slice
(
s
,
s
->
resync_mb_x
,
s
->
resync_mb_y
,
s
->
mb_x
-
1
,
s
->
mb_y
,
AC_END
|
DC_END
|
MV_END
);
return
buf_size
;
return
buf_size
;
}
}
...
@@ -723,15 +731,14 @@ static int rv10_decode_frame(AVCodecContext *avctx,
...
@@ -723,15 +731,14 @@ static int rv10_decode_frame(AVCodecContext *avctx,
else
else
size
=
avctx
->
slice_offset
[
i
+
1
]
-
offset
;
size
=
avctx
->
slice_offset
[
i
+
1
]
-
offset
;
if
(
rv10_decode_packet
(
avctx
,
buf
+
offset
,
size
)
<
0
)
rv10_decode_packet
(
avctx
,
buf
+
offset
,
size
);
return
-
1
;
}
}
}
else
{
}
else
{
if
(
rv10_decode_packet
(
avctx
,
buf
,
buf_size
)
<
0
)
rv10_decode_packet
(
avctx
,
buf
,
buf_size
);
return
-
1
;
}
}
if
(
s
->
mb_y
>=
s
->
mb_height
){
if
(
s
->
mb_y
>=
s
->
mb_height
){
ff_er_frame_end
(
s
);
MPV_frame_end
(
s
);
MPV_frame_end
(
s
);
if
(
s
->
pict_type
==
B_TYPE
||
s
->
low_delay
){
if
(
s
->
pict_type
==
B_TYPE
||
s
->
low_delay
){
...
@@ -743,6 +750,7 @@ static int rv10_decode_frame(AVCodecContext *avctx,
...
@@ -743,6 +750,7 @@ static int rv10_decode_frame(AVCodecContext *avctx,
}
}
if
(
s
->
last_picture_ptr
||
s
->
low_delay
)
if
(
s
->
last_picture_ptr
||
s
->
low_delay
)
*
data_size
=
sizeof
(
AVFrame
);
*
data_size
=
sizeof
(
AVFrame
);
s
->
current_picture_ptr
=
NULL
;
//so we can detect if frame_end wasnt called (find some nicer solution...)
}
}
return
buf_size
;
return
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