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
eb192137
Commit
eb192137
authored
Jul 28, 2016
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/ffmpeg: copy the AVPacket in ffmpeg_send_packet()
Revert commit
70495aad
by rewriting it. Turns out, in old FFmpeg versions, copying the AVPacket is necessary.
parent
c25b464f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletion
+20
-1
NEWS
NEWS
+1
-0
FfmpegDecoderPlugin.cxx
src/decoder/plugins/FfmpegDecoderPlugin.cxx
+19
-1
No files found.
NEWS
View file @
eb192137
ver 0.19.18 (not yet released)
* decoder
- ffmpeg: fix crash with older FFmpeg versions (< 3.0)
- ffmpeg: log detailed error message
ver 0.19.17 (2016/07/09)
...
...
src/decoder/plugins/FfmpegDecoderPlugin.cxx
View file @
eb192137
...
...
@@ -419,6 +419,24 @@ ffmpeg_send_packet(Decoder &decoder, InputStream &is,
return
cmd
;
}
static
DecoderCommand
ffmpeg_send_packet
(
Decoder
&
decoder
,
InputStream
&
is
,
const
AVPacket
&
packet
,
AVCodecContext
&
codec_context
,
const
AVStream
&
stream
,
AVFrame
*
frame
,
uint64_t
min_frame
,
size_t
pcm_frame_size
,
FfmpegBuffer
&
buffer
)
{
return
ffmpeg_send_packet
(
decoder
,
is
,
/* copy the AVPacket, because FFmpeg
< 3.0 requires this */
AVPacket
(
packet
),
codec_context
,
stream
,
frame
,
min_frame
,
pcm_frame_size
,
buffer
);
}
gcc_const
static
SampleFormat
ffmpeg_sample_format
(
enum
AVSampleFormat
sample_fmt
)
...
...
@@ -627,7 +645,7 @@ ffmpeg_decode(Decoder &decoder, InputStream &input)
if
(
packet
.
stream_index
==
audio_stream
)
{
cmd
=
ffmpeg_send_packet
(
decoder
,
input
,
std
::
move
(
packet
)
,
packet
,
*
codec_context
,
*
av_stream
,
frame
,
...
...
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