Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
106131bb
Commit
106131bb
authored
Mar 22, 2024
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fftools/ffmpeg_filter: remove display matrix if we have applied it
parent
b1aaa1f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
ffmpeg_filter.c
fftools/ffmpeg_filter.c
+7
-0
No files found.
fftools/ffmpeg_filter.c
View file @
106131bb
...
...
@@ -143,6 +143,7 @@ typedef struct InputFilterPriv {
AVBufferRef
*
hw_frames_ctx
;
int
displaymatrix_present
;
int
displaymatrix_applied
;
int32_t
displaymatrix
[
9
];
struct
{
...
...
@@ -1552,6 +1553,7 @@ static int configure_input_video_filter(FilterGraph *fg, AVFilterGraph *graph,
av_assert0
(
desc
);
// TODO: insert hwaccel enabled filters like transpose_vaapi into the graph
ifp
->
displaymatrix_applied
=
0
;
if
((
ifp
->
opts
.
flags
&
IFILTER_FLAG_AUTOROTATE
)
&&
!
(
desc
->
flags
&
AV_PIX_FMT_FLAG_HWACCEL
))
{
int32_t
*
displaymatrix
=
ifp
->
displaymatrix
;
...
...
@@ -1585,6 +1587,8 @@ static int configure_input_video_filter(FilterGraph *fg, AVFilterGraph *graph,
}
if
(
ret
<
0
)
return
ret
;
ifp
->
displaymatrix_applied
=
1
;
}
snprintf
(
name
,
sizeof
(
name
),
"trim_in_%s"
,
ifp
->
opts
.
name
);
...
...
@@ -2681,6 +2685,9 @@ static int send_frame(FilterGraph *fg, FilterGraphThread *fgt,
frame
->
duration
=
av_rescale_q
(
frame
->
duration
,
frame
->
time_base
,
ifp
->
time_base
);
frame
->
time_base
=
ifp
->
time_base
;
if
(
ifp
->
displaymatrix_applied
)
av_frame_remove_side_data
(
frame
,
AV_FRAME_DATA_DISPLAYMATRIX
);
fd
=
frame_data
(
frame
);
if
(
!
fd
)
return
AVERROR
(
ENOMEM
);
...
...
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