Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
ce326c11
Commit
ce326c11
authored
Mar 14, 2012
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avconv: check for get_filtered_frame() failure.
parent
2636e691
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
avconv.c
avconv.c
+7
-3
No files found.
avconv.c
View file @
ce326c11
...
@@ -2015,8 +2015,8 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int
...
@@ -2015,8 +2015,8 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int
decoded_frame
->
pts
,
decoded_frame
->
sample_aspect_ratio
);
decoded_frame
->
pts
,
decoded_frame
->
sample_aspect_ratio
);
if
(
!
ist
->
filtered_frame
&&
!
(
ist
->
filtered_frame
=
avcodec_alloc_frame
()))
{
if
(
!
ist
->
filtered_frame
&&
!
(
ist
->
filtered_frame
=
avcodec_alloc_frame
()))
{
av_free
(
buffer_to_free
);
ret
=
AVERROR
(
ENOMEM
);
return
AVERROR
(
ENOMEM
)
;
goto
fail
;
}
else
}
else
avcodec_get_frame_defaults
(
ist
->
filtered_frame
);
avcodec_get_frame_defaults
(
ist
->
filtered_frame
);
filtered_frame
=
ist
->
filtered_frame
;
filtered_frame
=
ist
->
filtered_frame
;
...
@@ -2024,7 +2024,10 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int
...
@@ -2024,7 +2024,10 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int
frame_available
=
avfilter_poll_frame
(
ost
->
output_video_filter
->
inputs
[
0
]);
frame_available
=
avfilter_poll_frame
(
ost
->
output_video_filter
->
inputs
[
0
]);
while
(
frame_available
)
{
while
(
frame_available
)
{
AVRational
ist_pts_tb
;
AVRational
ist_pts_tb
;
get_filtered_video_frame
(
ost
->
output_video_filter
,
filtered_frame
,
&
ost
->
picref
,
&
ist_pts_tb
);
if
((
ret
=
get_filtered_video_frame
(
ost
->
output_video_filter
,
filtered_frame
,
&
ost
->
picref
,
&
ist_pts_tb
))
<
0
)
goto
fail
;
if
(
ost
->
picref
)
if
(
ost
->
picref
)
filtered_frame
->
pts
=
av_rescale_q
(
ost
->
picref
->
pts
,
ist_pts_tb
,
AV_TIME_BASE_Q
);
filtered_frame
->
pts
=
av_rescale_q
(
ost
->
picref
->
pts
,
ist_pts_tb
,
AV_TIME_BASE_Q
);
if
(
ost
->
picref
->
video
&&
!
ost
->
frame_aspect_ratio
)
if
(
ost
->
picref
->
video
&&
!
ost
->
frame_aspect_ratio
)
...
@@ -2045,6 +2048,7 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int
...
@@ -2045,6 +2048,7 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int
#endif
#endif
}
}
fail:
av_free
(
buffer_to_free
);
av_free
(
buffer_to_free
);
return
ret
;
return
ret
;
}
}
...
...
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