Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
0a090e33
Commit
0a090e33
authored
Sep 17, 2009
by
Hugo Beauzee-Luyssen
Committed by
Rémi Denis-Courmont
Sep 25, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't store the picture_t inside of the decoder_sys_t
Signed-off-by:
Rémi Denis-Courmont
<
remi@remlab.net
>
parent
ba676907
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
16 deletions
+8
-16
modules/codec/invmem.c
modules/codec/invmem.c
+8
-16
No files found.
modules/codec/invmem.c
View file @
0a090e33
...
@@ -108,8 +108,6 @@ struct decoder_sys_t
...
@@ -108,8 +108,6 @@ struct decoder_sys_t
int
i_pitch
;
int
i_pitch
;
vlc_fourcc_t
i_chroma
;
vlc_fourcc_t
i_chroma
;
picture_t
*
p_pic
;
};
};
...
@@ -219,8 +217,6 @@ static int OpenDecoder( vlc_object_t *p_this )
...
@@ -219,8 +217,6 @@ static int OpenDecoder( vlc_object_t *p_this )
p_sys
->
i_pitch
=
pitch
;
p_sys
->
i_pitch
=
pitch
;
p_sys
->
p_pic
=
NULL
;
/* Set callbacks */
/* Set callbacks */
p_dec
->
pf_decode_video
=
DecodeBlock
;
p_dec
->
pf_decode_video
=
DecodeBlock
;
...
@@ -240,28 +236,27 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
...
@@ -240,28 +236,27 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
{
{
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
block_t
*
p_block
;
block_t
*
p_block
;
picture_t
*
p_pic
;
if
(
!
pp_block
||
!*
pp_block
)
return
NULL
;
if
(
!
pp_block
||
!*
pp_block
)
return
NULL
;
p_block
=
*
pp_block
;
p_block
=
*
pp_block
;
// create new picture
// create new picture
if
(
p_sys
->
p_pic
!=
NULL
)
p_pic
=
decoder_NewPicture
(
p_dec
);
picture_Release
(
p_sys
->
p_pic
);
if
(
!
p_pic
)
return
NULL
;
p_sys
->
p_pic
=
decoder_NewPicture
(
p_dec
);
p_pic
->
b_force
=
true
;
if
(
!
p_sys
->
p_pic
)
return
NULL
;
p_pic
->
p
->
i_pitch
=
p_dec
->
p_sys
->
i_pitch
;
p_sys
->
p_pic
->
b_force
=
true
;
p_pic
->
date
=
p_block
->
i_pts
>
0
?
p_block
->
i_pts
:
p_block
->
i_dts
;
p_sys
->
p_pic
->
p
->
i_pitch
=
p_dec
->
p_sys
->
i_pitch
;
p_sys
->
p_pic
->
date
=
p_block
->
i_pts
>
0
?
p_block
->
i_pts
:
p_block
->
i_dts
;
// lock input and copy to picture
// lock input and copy to picture
p_
sys
->
p_
pic
->
p
->
p_pixels
=
p_sys
->
pf_lock
(
p_dec
->
p_sys
->
p_data
);
p_pic
->
p
->
p_pixels
=
p_sys
->
pf_lock
(
p_dec
->
p_sys
->
p_data
);
// unlock input
// unlock input
p_sys
->
pf_unlock
(
p_dec
->
p_sys
->
p_data
);
p_sys
->
pf_unlock
(
p_dec
->
p_sys
->
p_data
);
block_Release
(
*
pp_block
);
*
pp_block
=
NULL
;
block_Release
(
*
pp_block
);
*
pp_block
=
NULL
;
return
p_
sys
->
p_
pic
;
return
p_pic
;
}
}
/*****************************************************************************
/*****************************************************************************
...
@@ -272,8 +267,5 @@ static void CloseDecoder( vlc_object_t *p_this )
...
@@ -272,8 +267,5 @@ static void CloseDecoder( vlc_object_t *p_this )
decoder_t
*
p_dec
=
(
decoder_t
*
)
p_this
;
decoder_t
*
p_dec
=
(
decoder_t
*
)
p_this
;
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
if
(
p_sys
->
p_pic
!=
NULL
)
picture_Release
(
p_sys
->
p_pic
);
free
(
p_sys
);
free
(
p_sys
);
}
}
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