Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
226eb263
Commit
226eb263
authored
Nov 04, 2020
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
filter/ffmpeg: interleave the output AVFrame
If the FFmpeg filter outputs planar data, interleave it, just like the FFmpeg decoder plugin does.
parent
2d606fa9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
1 deletion
+6
-1
NEWS
NEWS
+1
-0
FfmpegFilter.cxx
src/filter/plugins/FfmpegFilter.cxx
+2
-1
FfmpegFilter.hxx
src/filter/plugins/FfmpegFilter.hxx
+3
-0
No files found.
NEWS
View file @
226eb263
...
...
@@ -3,6 +3,7 @@ ver 0.22.3 (not yet released)
- add option "as_directory", making CUE file expansion optional
* filter
- fix garbage after "Audio format not supported by filter" message
- ffmpeg: support planar output
ver 0.22.2 (2020/10/28)
* database
...
...
src/filter/plugins/FfmpegFilter.cxx
View file @
226eb263
...
...
@@ -18,6 +18,7 @@
*/
#include "FfmpegFilter.hxx"
#include "lib/ffmpeg/Interleave.hxx"
#include "lib/ffmpeg/SampleFormat.hxx"
#include "util/ConstBuffer.hxx"
...
...
@@ -79,5 +80,5 @@ FfmpegFilter::FilterPCM(ConstBuffer<void> src)
/* TODO: call av_buffersink_get_frame() repeatedly? Not
possible with MPD's current Filter API */
return
{
frame
.
GetData
(
0
),
frame
->
nb_samples
*
GetOutAudioFormat
().
GetFrameSize
()}
;
return
Ffmpeg
::
InterleaveFrame
(
*
frame
,
interleave_buffer
)
;
}
src/filter/plugins/FfmpegFilter.hxx
View file @
226eb263
...
...
@@ -21,6 +21,7 @@
#define MPD_FFMPEG_FILTER__HXX
#include "filter/Filter.hxx"
#include "lib/ffmpeg/Buffer.hxx"
#include "lib/ffmpeg/Filter.hxx"
#include "lib/ffmpeg/Frame.hxx"
...
...
@@ -32,6 +33,8 @@ class FfmpegFilter final : public Filter {
Ffmpeg
::
FilterContext
buffer_src
,
buffer_sink
;
Ffmpeg
::
Frame
frame
;
FfmpegBuffer
interleave_buffer
;
const
int
in_format
,
in_sample_rate
,
in_channels
;
const
size_t
in_audio_frame_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