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
5ab506a5
Commit
5ab506a5
authored
Mar 20, 2012
by
Janne Grunau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MPV: set reference frame pointers to NULL when allocation of dummy pictures fails
parent
4a584eda
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
mpegvideo.c
libavcodec/mpegvideo.c
+6
-2
No files found.
libavcodec/mpegvideo.c
View file @
5ab506a5
...
@@ -1267,8 +1267,10 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
...
@@ -1267,8 +1267,10 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
/* Allocate a dummy frame */
/* Allocate a dummy frame */
i
=
ff_find_unused_picture
(
s
,
0
);
i
=
ff_find_unused_picture
(
s
,
0
);
s
->
last_picture_ptr
=
&
s
->
picture
[
i
];
s
->
last_picture_ptr
=
&
s
->
picture
[
i
];
if
(
ff_alloc_picture
(
s
,
s
->
last_picture_ptr
,
0
)
<
0
)
if
(
ff_alloc_picture
(
s
,
s
->
last_picture_ptr
,
0
)
<
0
)
{
s
->
last_picture_ptr
=
NULL
;
return
-
1
;
return
-
1
;
}
ff_thread_report_progress
(
&
s
->
last_picture_ptr
->
f
,
INT_MAX
,
0
);
ff_thread_report_progress
(
&
s
->
last_picture_ptr
->
f
,
INT_MAX
,
0
);
ff_thread_report_progress
(
&
s
->
last_picture_ptr
->
f
,
INT_MAX
,
1
);
ff_thread_report_progress
(
&
s
->
last_picture_ptr
->
f
,
INT_MAX
,
1
);
s
->
last_picture_ptr
->
f
.
reference
=
3
;
s
->
last_picture_ptr
->
f
.
reference
=
3
;
...
@@ -1279,8 +1281,10 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
...
@@ -1279,8 +1281,10 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
/* Allocate a dummy frame */
/* Allocate a dummy frame */
i
=
ff_find_unused_picture
(
s
,
0
);
i
=
ff_find_unused_picture
(
s
,
0
);
s
->
next_picture_ptr
=
&
s
->
picture
[
i
];
s
->
next_picture_ptr
=
&
s
->
picture
[
i
];
if
(
ff_alloc_picture
(
s
,
s
->
next_picture_ptr
,
0
)
<
0
)
if
(
ff_alloc_picture
(
s
,
s
->
next_picture_ptr
,
0
)
<
0
)
{
s
->
next_picture_ptr
=
NULL
;
return
-
1
;
return
-
1
;
}
ff_thread_report_progress
(
&
s
->
next_picture_ptr
->
f
,
INT_MAX
,
0
);
ff_thread_report_progress
(
&
s
->
next_picture_ptr
->
f
,
INT_MAX
,
0
);
ff_thread_report_progress
(
&
s
->
next_picture_ptr
->
f
,
INT_MAX
,
1
);
ff_thread_report_progress
(
&
s
->
next_picture_ptr
->
f
,
INT_MAX
,
1
);
s
->
next_picture_ptr
->
f
.
reference
=
3
;
s
->
next_picture_ptr
->
f
.
reference
=
3
;
...
...
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