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
b7254437
Commit
b7254437
authored
Dec 27, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpegvideo: fix visualization buffer size.
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
f2f8632a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
12 deletions
+4
-12
mpegvideo.c
libavcodec/mpegvideo.c
+4
-12
No files found.
libavcodec/mpegvideo.c
View file @
b7254437
...
...
@@ -827,15 +827,6 @@ av_cold int MPV_common_init(MpegEncContext *s)
// Note the + 1 is for a quicker mpeg4 slice_end detection
s
->
parse_context
.
state
=
-
1
;
if
((
s
->
avctx
->
debug
&
(
FF_DEBUG_VIS_QP
|
FF_DEBUG_VIS_MB_TYPE
))
||
s
->
avctx
->
debug_mv
)
{
s
->
visualization_buffer
[
0
]
=
av_malloc
((
s
->
mb_width
*
16
+
2
*
EDGE_WIDTH
)
*
s
->
mb_height
*
16
+
2
*
EDGE_WIDTH
);
s
->
visualization_buffer
[
1
]
=
av_malloc
((
s
->
mb_width
*
16
+
2
*
EDGE_WIDTH
)
*
s
->
mb_height
*
16
+
2
*
EDGE_WIDTH
);
s
->
visualization_buffer
[
2
]
=
av_malloc
((
s
->
mb_width
*
16
+
2
*
EDGE_WIDTH
)
*
s
->
mb_height
*
16
+
2
*
EDGE_WIDTH
);
}
s
->
context_initialized
=
1
;
s
->
thread_context
[
0
]
=
s
;
...
...
@@ -1572,9 +1563,10 @@ void ff_print_debug_info(MpegEncContext *s, AVFrame *pict)
avcodec_get_chroma_sub_sample
(
s
->
avctx
->
pix_fmt
,
&
h_chroma_shift
,
&
v_chroma_shift
);
for
(
i
=
0
;
i
<
3
;
i
++
)
{
memcpy
(
s
->
visualization_buffer
[
i
],
pict
->
data
[
i
],
(
i
==
0
)
?
pict
->
linesize
[
i
]
*
height
:
pict
->
linesize
[
i
]
*
height
>>
v_chroma_shift
);
size_t
size
=
(
i
==
0
)
?
pict
->
linesize
[
i
]
*
height
:
pict
->
linesize
[
i
]
*
height
>>
v_chroma_shift
;
s
->
visualization_buffer
[
i
]
=
av_realloc
(
s
->
visualization_buffer
[
i
],
size
);
memcpy
(
s
->
visualization_buffer
[
i
],
pict
->
data
[
i
],
size
);
pict
->
data
[
i
]
=
s
->
visualization_buffer
[
i
];
}
pict
->
type
=
FF_BUFFER_TYPE_COPY
;
...
...
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