Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
9e856ef4
Commit
9e856ef4
authored
Mar 28, 2008
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't crash when deinterlacing fails.
parent
0db15058
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
modules/codec/ffmpeg/deinterlace.c
modules/codec/ffmpeg/deinterlace.c
+10
-8
No files found.
modules/codec/ffmpeg/deinterlace.c
View file @
9e856ef4
...
@@ -119,15 +119,12 @@ static picture_t *Deinterlace( filter_t *p_filter, picture_t *p_pic )
...
@@ -119,15 +119,12 @@ static picture_t *Deinterlace( filter_t *p_filter, picture_t *p_pic )
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
AVPicture
src_pic
,
dest_pic
;
AVPicture
src_pic
,
dest_pic
;
picture_t
*
p_pic_dst
;
picture_t
*
p_pic_dst
;
int
i
;
int
i
,
i_res
=
-
1
;
/* Request output picture */
/* Request output picture */
p_pic_dst
=
p_filter
->
pf_vout_buffer_new
(
p_filter
);
p_pic_dst
=
p_filter
->
pf_vout_buffer_new
(
p_filter
);
if
(
!
p_pic_dst
)
if
(
!
p_pic_dst
)
{
msg_Warn
(
p_filter
,
"can't get output picture"
);
return
NULL
;
return
NULL
;
}
/* Prepare the AVPictures for the conversion */
/* Prepare the AVPictures for the conversion */
for
(
i
=
0
;
i
<
p_pic
->
i_planes
;
i
++
)
for
(
i
=
0
;
i
<
p_pic
->
i_planes
;
i
++
)
...
@@ -141,10 +138,15 @@ static picture_t *Deinterlace( filter_t *p_filter, picture_t *p_pic )
...
@@ -141,10 +138,15 @@ static picture_t *Deinterlace( filter_t *p_filter, picture_t *p_pic )
dest_pic
.
linesize
[
i
]
=
p_pic_dst
->
p
[
i
].
i_pitch
;
dest_pic
.
linesize
[
i
]
=
p_pic_dst
->
p
[
i
].
i_pitch
;
}
}
avpicture_deinterlace
(
&
dest_pic
,
&
src_pic
,
p_sys
->
i_src_ffmpeg_chroma
,
i_res
=
avpicture_deinterlace
(
&
dest_pic
,
&
src_pic
,
p_sys
->
i_src_ffmpeg_chroma
,
p_filter
->
fmt_in
.
video
.
i_width
,
p_filter
->
fmt_in
.
video
.
i_width
,
p_filter
->
fmt_in
.
video
.
i_height
);
p_filter
->
fmt_in
.
video
.
i_height
);
if
(
i_res
==
-
1
)
{
msg_Err
(
p_filter
,
"deinterlacing picture failed"
);
p_filter
->
pf_vout_buffer_del
(
p_filter
,
p_pic_dst
);
return
NULL
;
}
p_pic_dst
->
date
=
p_pic
->
date
;
p_pic_dst
->
date
=
p_pic
->
date
;
p_pic_dst
->
b_force
=
p_pic
->
b_force
;
p_pic_dst
->
b_force
=
p_pic
->
b_force
;
p_pic_dst
->
i_nb_fields
=
p_pic
->
i_nb_fields
;
p_pic_dst
->
i_nb_fields
=
p_pic
->
i_nb_fields
;
...
...
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