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
f3b73b82
Commit
f3b73b82
authored
Feb 03, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffmpeg: check if the time stamp is valid
When ffmpeg cannot estimate the elapsed time, it sets AVPacket.pts=AV_NOPTS_VALUE. Our ffmpeg decoder plugin did not check for that special value.
parent
81b6c0d7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
NEWS
NEWS
+1
-0
ffmpeg_plugin.c
src/decoder/ffmpeg_plugin.c
+5
-4
No files found.
NEWS
View file @
f3b73b82
...
@@ -38,6 +38,7 @@ ver 0.14.2 (2009/??/??)
...
@@ -38,6 +38,7 @@ ver 0.14.2 (2009/??/??)
* decoders:
* decoders:
- ffmpeg: added support for the tags comment, genre, year
- ffmpeg: added support for the tags comment, genre, year
- ffmpeg: don't warn of empty packet output
- ffmpeg: don't warn of empty packet output
- ffmpeg: check if the time stamp is valid
- wavpack: pass NULL if the .wvc file fails to open
- wavpack: pass NULL if the .wvc file fails to open
- mikmod: call MikMod_Exit() only in the finish() method
- mikmod: call MikMod_Exit() only in the finish() method
* audio outputs:
* audio outputs:
...
...
src/decoder/ffmpeg_plugin.c
View file @
f3b73b82
...
@@ -230,10 +230,6 @@ ffmpeg_send_packet(struct decoder *decoder, struct input_stream *is,
...
@@ -230,10 +230,6 @@ ffmpeg_send_packet(struct decoder *decoder, struct input_stream *is,
&
audio_size
,
&
audio_size
,
packet_data
,
packet_size
);
packet_data
,
packet_size
);
position
=
av_rescale_q
(
packet
->
pts
,
*
time_base
,
(
AVRational
){
1
,
1
});
if
(
len
<
0
)
{
if
(
len
<
0
)
{
/* if error, we skip the frame */
/* if error, we skip the frame */
g_message
(
"decoding failed
\n
"
);
g_message
(
"decoding failed
\n
"
);
...
@@ -246,6 +242,11 @@ ffmpeg_send_packet(struct decoder *decoder, struct input_stream *is,
...
@@ -246,6 +242,11 @@ ffmpeg_send_packet(struct decoder *decoder, struct input_stream *is,
if
(
audio_size
<=
0
)
if
(
audio_size
<=
0
)
continue
;
continue
;
position
=
packet
->
pts
!=
(
int64_t
)
AV_NOPTS_VALUE
?
av_rescale_q
(
packet
->
pts
,
*
time_base
,
(
AVRational
){
1
,
1
})
:
0
;
cmd
=
decoder_data
(
decoder
,
is
,
cmd
=
decoder_data
(
decoder
,
is
,
audio_buf
,
audio_size
,
audio_buf
,
audio_size
,
position
,
position
,
...
...
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