OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c084a97
)
lavc: initialize AVFrame.extended_data in avcodec_get_frame_defaults()
author
Anton Khirnov
<anton@khirnov.net>
Fri, 21 Sep 2012 06:30:42 +0000
(08:30 +0200)
committer
Anton Khirnov
<anton@khirnov.net>
Mon, 24 Sep 2012 10:31:24 +0000
(12:31 +0200)
libavcodec/utils.c
patch
|
blob
|
history
diff --git
a/libavcodec/utils.c
b/libavcodec/utils.c
index
a3ab134
..
63ea77f
100644
(file)
--- a/
libavcodec/utils.c
+++ b/
libavcodec/utils.c
@@
-635,12
+635,16
@@
enum PixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum
void avcodec_get_frame_defaults(AVFrame *frame)
{
+ if (frame->extended_data != frame->data)
+ av_freep(&frame->extended_data);
+
memset(frame, 0, sizeof(AVFrame));
frame->pts = AV_NOPTS_VALUE;
frame->key_frame = 1;
frame->sample_aspect_ratio = (AVRational) {0, 1 };
frame->format = -1; /* unknown */
+ frame->extended_data = frame->data;
}
AVFrame *avcodec_alloc_frame(void)