Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
b966a403
Commit
b966a403
authored
Jan 01, 2016
by
Hendrik Leppkes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/utils: fix AVPacket lifetime in seek_frame_generic
Fixes ticket #5117
parent
dbfb2c1a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
utils.c
libavformat/utils.c
+5
-2
No files found.
libavformat/utils.c
View file @
b966a403
...
...
@@ -2142,15 +2142,18 @@ static int seek_frame_generic(AVFormatContext *s, int stream_index,
}
while
(
read_status
==
AVERROR
(
EAGAIN
));
if
(
read_status
<
0
)
break
;
av_packet_unref
(
&
pkt
);
if
(
stream_index
==
pkt
.
stream_index
&&
pkt
.
dts
>
timestamp
)
{
if
(
pkt
.
flags
&
AV_PKT_FLAG_KEY
)
if
(
pkt
.
flags
&
AV_PKT_FLAG_KEY
)
{
av_packet_unref
(
&
pkt
);
break
;
}
if
(
nonkey
++
>
1000
&&
st
->
codec
->
codec_id
!=
AV_CODEC_ID_CDGRAPHICS
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"seek_frame_generic failed as this stream seems to contain no keyframes after the target timestamp, %d non keyframes found
\n
"
,
nonkey
);
av_packet_unref
(
&
pkt
);
break
;
}
}
av_packet_unref
(
&
pkt
);
}
index
=
av_index_search_timestamp
(
st
,
timestamp
,
flags
);
}
...
...
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