Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
7d0e62b8
Commit
7d0e62b8
authored
Dec 15, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Used picture_NewFromFormat when appropriate.
parent
93b2554a
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
11 additions
and
25 deletions
+11
-25
modules/gui/fbosd.c
modules/gui/fbosd.c
+1
-3
modules/misc/freetype.c
modules/misc/freetype.c
+2
-2
modules/misc/quartztext.c
modules/misc/quartztext.c
+1
-1
modules/misc/svg.c
modules/misc/svg.c
+1
-1
modules/misc/win32text.c
modules/misc/win32text.c
+1
-1
modules/stream_out/mosaic_bridge.c
modules/stream_out/mosaic_bridge.c
+1
-4
modules/stream_out/transcode/video.c
modules/stream_out/transcode/video.c
+2
-8
modules/video_filter/motiondetect.c
modules/video_filter/motiondetect.c
+1
-2
modules/video_filter/scene.c
modules/video_filter/scene.c
+1
-3
No files found.
modules/gui/fbosd.c
View file @
7d0e62b8
...
@@ -622,9 +622,7 @@ static void CloseTextRenderer( intf_thread_t *p_intf )
...
@@ -622,9 +622,7 @@ static void CloseTextRenderer( intf_thread_t *p_intf )
*****************************************************************************/
*****************************************************************************/
static
picture_t
*
AllocatePicture
(
video_format_t
*
p_fmt
)
static
picture_t
*
AllocatePicture
(
video_format_t
*
p_fmt
)
{
{
picture_t
*
p_picture
=
picture_New
(
p_fmt
->
i_chroma
,
picture_t
*
p_picture
=
picture_NewFromFormat
(
p_fmt
);
p_fmt
->
i_width
,
p_fmt
->
i_height
,
p_fmt
->
i_aspect
);
if
(
!
p_picture
)
if
(
!
p_picture
)
return
NULL
;
return
NULL
;
...
...
modules/misc/freetype.c
View file @
7d0e62b8
...
@@ -632,7 +632,7 @@ static int Render( filter_t *p_filter, subpicture_region_t *p_region,
...
@@ -632,7 +632,7 @@ static int Render( filter_t *p_filter, subpicture_region_t *p_region,
fmt
.
i_x_offset
=
fmt
.
i_y_offset
=
0
;
fmt
.
i_x_offset
=
fmt
.
i_y_offset
=
0
;
assert
(
!
p_region
->
p_picture
);
assert
(
!
p_region
->
p_picture
);
p_region
->
p_picture
=
picture_New
(
fmt
.
i_chroma
,
fmt
.
i_width
,
fmt
.
i_height
,
fmt
.
i_aspec
t
);
p_region
->
p_picture
=
picture_New
FromFormat
(
&
fm
t
);
if
(
!
p_region
->
p_picture
)
if
(
!
p_region
->
p_picture
)
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
p_region
->
fmt
=
fmt
;
p_region
->
fmt
=
fmt
;
...
@@ -897,7 +897,7 @@ static int RenderYUVA( filter_t *p_filter, subpicture_region_t *p_region,
...
@@ -897,7 +897,7 @@ static int RenderYUVA( filter_t *p_filter, subpicture_region_t *p_region,
fmt
.
i_visible_height
=
p_region
->
fmt
.
i_visible_height
;
fmt
.
i_visible_height
=
p_region
->
fmt
.
i_visible_height
;
fmt
.
i_x_offset
=
fmt
.
i_y_offset
=
0
;
fmt
.
i_x_offset
=
fmt
.
i_y_offset
=
0
;
p_region
->
p_picture
=
picture_New
(
fmt
.
i_chroma
,
fmt
.
i_width
,
fmt
.
i_height
,
fmt
.
i_aspec
t
);
p_region
->
p_picture
=
picture_New
FromFormat
(
&
fm
t
);
if
(
!
p_region
->
p_picture
)
if
(
!
p_region
->
p_picture
)
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
p_region
->
fmt
=
fmt
;
p_region
->
fmt
=
fmt
;
...
...
modules/misc/quartztext.c
View file @
7d0e62b8
...
@@ -1050,7 +1050,7 @@ static int RenderYUVA( filter_t *p_filter, subpicture_region_t *p_region,
...
@@ -1050,7 +1050,7 @@ static int RenderYUVA( filter_t *p_filter, subpicture_region_t *p_region,
fmt
.
i_height
=
fmt
.
i_visible_height
=
__MIN
(
i_height
,
i_textblock_height
+
VERTICAL_MARGIN
*
2
);
fmt
.
i_height
=
fmt
.
i_visible_height
=
__MIN
(
i_height
,
i_textblock_height
+
VERTICAL_MARGIN
*
2
);
fmt
.
i_x_offset
=
fmt
.
i_y_offset
=
0
;
fmt
.
i_x_offset
=
fmt
.
i_y_offset
=
0
;
p_region
->
p_picture
=
picture_New
(
fmt
.
i_chroma
,
fmt
.
i_width
,
fmt
.
i_height
,
fmt
.
i_aspec
t
);
p_region
->
p_picture
=
picture_New
FromFormat
(
&
fm
t
);
if
(
!
p_region
->
p_picture
)
if
(
!
p_region
->
p_picture
)
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
p_region
->
fmt
=
fmt
;
p_region
->
fmt
=
fmt
;
...
...
modules/misc/svg.c
View file @
7d0e62b8
...
@@ -283,7 +283,7 @@ static int Render( filter_t *p_filter, subpicture_region_t *p_region,
...
@@ -283,7 +283,7 @@ static int Render( filter_t *p_filter, subpicture_region_t *p_region,
fmt
.
i_height
=
fmt
.
i_visible_height
=
i_height
;
fmt
.
i_height
=
fmt
.
i_visible_height
=
i_height
;
fmt
.
i_x_offset
=
fmt
.
i_y_offset
=
0
;
fmt
.
i_x_offset
=
fmt
.
i_y_offset
=
0
;
p_region
->
p_picture
=
picture_New
(
fmt
.
i_chroma
,
fmt
.
i_width
,
fmt
.
i_height
,
fmt
.
i_aspec
t
);
p_region
->
p_picture
=
picture_New
FromFormat
(
&
fm
t
);
if
(
!
p_region
->
p_picture
)
if
(
!
p_region
->
p_picture
)
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
p_region
->
fmt
=
fmt
;
p_region
->
fmt
=
fmt
;
...
...
modules/misc/win32text.c
View file @
7d0e62b8
...
@@ -240,7 +240,7 @@ static int Render( filter_t *p_filter, subpicture_region_t *p_region,
...
@@ -240,7 +240,7 @@ static int Render( filter_t *p_filter, subpicture_region_t *p_region,
fmt
.
p_palette
->
palette
[
i
][
3
]
=
pi_gamma
[
i
];
fmt
.
p_palette
->
palette
[
i
][
3
]
=
pi_gamma
[
i
];
}
}
p_region
->
p_picture
=
picture_New
(
fmt
.
i_chroma
,
fmt
.
i_width
,
fmt
.
i_height
,
fmt
.
i_aspec
t
);
p_region
->
p_picture
=
picture_New
FromFormat
(
&
fm
t
);
if
(
!
p_region
->
p_picture
)
if
(
!
p_region
->
p_picture
)
{
{
free
(
fmt
.
p_palette
);
free
(
fmt
.
p_palette
);
...
...
modules/stream_out/mosaic_bridge.c
View file @
7d0e62b8
...
@@ -666,10 +666,7 @@ static picture_t *video_new_buffer( vlc_object_t *p_this,
...
@@ -666,10 +666,7 @@ static picture_t *video_new_buffer( vlc_object_t *p_this,
/* */
/* */
fmt_out
->
video
.
i_chroma
=
fmt_out
->
i_codec
;
fmt_out
->
video
.
i_chroma
=
fmt_out
->
i_codec
;
return
picture_New
(
fmt_out
->
video
.
i_chroma
,
return
picture_NewFromFormat
(
&
fmt_out
->
video
);
fmt_out
->
video
.
i_width
,
fmt_out
->
video
.
i_height
,
fmt_out
->
video
.
i_aspect
);
}
}
inline
static
void
video_del_buffer_decoder
(
decoder_t
*
p_this
,
inline
static
void
video_del_buffer_decoder
(
decoder_t
*
p_this
,
...
...
modules/stream_out/transcode/video.c
View file @
7d0e62b8
...
@@ -96,19 +96,13 @@ static picture_t *video_new_buffer_decoder( decoder_t *p_dec )
...
@@ -96,19 +96,13 @@ static picture_t *video_new_buffer_decoder( decoder_t *p_dec )
}
}
p_dec
->
fmt_out
.
video
.
i_chroma
=
p_dec
->
fmt_out
.
i_codec
;
p_dec
->
fmt_out
.
video
.
i_chroma
=
p_dec
->
fmt_out
.
i_codec
;
return
picture_New
(
p_dec
->
fmt_out
.
video
.
i_chroma
,
return
picture_NewFromFormat
(
&
p_dec
->
fmt_out
.
video
);
p_dec
->
fmt_out
.
video
.
i_width
,
p_dec
->
fmt_out
.
video
.
i_height
,
p_dec
->
fmt_out
.
video
.
i_aspect
);
}
}
static
picture_t
*
transcode_video_filter_buffer_new
(
filter_t
*
p_filter
)
static
picture_t
*
transcode_video_filter_buffer_new
(
filter_t
*
p_filter
)
{
{
p_filter
->
fmt_out
.
video
.
i_chroma
=
p_filter
->
fmt_out
.
i_codec
;
p_filter
->
fmt_out
.
video
.
i_chroma
=
p_filter
->
fmt_out
.
i_codec
;
return
picture_New
(
p_filter
->
fmt_out
.
video
.
i_chroma
,
return
picture_NewFromFormat
(
&
p_filter
->
fmt_out
.
video
);
p_filter
->
fmt_out
.
video
.
i_width
,
p_filter
->
fmt_out
.
video
.
i_height
,
p_filter
->
fmt_out
.
video
.
i_aspect
);
}
}
static
void
transcode_video_filter_buffer_del
(
filter_t
*
p_filter
,
picture_t
*
p_pic
)
static
void
transcode_video_filter_buffer_del
(
filter_t
*
p_filter
,
picture_t
*
p_pic
)
{
{
...
...
modules/video_filter/motiondetect.c
View file @
7d0e62b8
...
@@ -114,8 +114,7 @@ static int Create( vlc_object_t *p_this )
...
@@ -114,8 +114,7 @@ static int Create( vlc_object_t *p_this )
return
VLC_ENOMEM
;
return
VLC_ENOMEM
;
p_sys
->
b_old
=
false
;
p_sys
->
b_old
=
false
;
p_sys
->
p_old
=
picture_New
(
p_fmt
->
i_chroma
,
p_sys
->
p_old
=
picture_NewFromFormat
(
p_fmt
);
p_fmt
->
i_width
,
p_fmt
->
i_height
,
0
);
p_sys
->
p_buf
=
calloc
(
p_fmt
->
i_width
*
p_fmt
->
i_height
,
sizeof
(
*
p_sys
->
p_buf
)
);
p_sys
->
p_buf
=
calloc
(
p_fmt
->
i_width
*
p_fmt
->
i_height
,
sizeof
(
*
p_sys
->
p_buf
)
);
p_sys
->
p_buf2
=
calloc
(
p_fmt
->
i_width
*
p_fmt
->
i_height
,
sizeof
(
*
p_sys
->
p_buf
)
);
p_sys
->
p_buf2
=
calloc
(
p_fmt
->
i_width
*
p_fmt
->
i_height
,
sizeof
(
*
p_sys
->
p_buf
)
);
...
...
modules/video_filter/scene.c
View file @
7d0e62b8
...
@@ -249,9 +249,7 @@ static void SnapshotRatio( filter_t *p_filter, picture_t *p_pic )
...
@@ -249,9 +249,7 @@ static void SnapshotRatio( filter_t *p_filter, picture_t *p_pic )
p_sys
->
i_height
=
p_pic
->
format
.
i_height
;
p_sys
->
i_height
=
p_pic
->
format
.
i_height
;
}
}
p_sys
->
scene
.
p_pic
=
picture_New
(
p_pic
->
format
.
i_chroma
,
p_sys
->
scene
.
p_pic
=
picture_NewFromFormat
(
&
p_pic
->
format
);
p_pic
->
format
.
i_width
,
p_pic
->
format
.
i_height
,
p_pic
->
format
.
i_sar_num
);
if
(
p_sys
->
scene
.
p_pic
)
if
(
p_sys
->
scene
.
p_pic
)
{
{
picture_Copy
(
p_sys
->
scene
.
p_pic
,
p_pic
);
picture_Copy
(
p_sys
->
scene
.
p_pic
,
p_pic
);
...
...
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