projects
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7beadfe
)
yuv4mpeg: fix potential alignment bug
author
Michael Niedermayer
<michaelni@gmx.at>
Sat, 8 Sep 2012 11:37:35 +0000
(13:37 +0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sat, 8 Sep 2012 11:37:35 +0000
(13:37 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/yuv4mpeg.c
patch
|
blob
|
history
diff --git
a/libavformat/yuv4mpeg.c
b/libavformat/yuv4mpeg.c
index
5b6d2df
..
a53d30f
100644
(file)
--- a/
libavformat/yuv4mpeg.c
+++ b/
libavformat/yuv4mpeg.c
@@
-121,7
+121,7
@@
static int yuv4_write_packet(AVFormatContext *s, AVPacket *pkt)
{
AVStream *st = s->streams[pkt->stream_index];
AVIOContext *pb = s->pb;
- AVPicture *picture;
+ AVPicture *picture
, picture_tmp
;
int* first_pkt = s->priv_data;
int width, height, h_chroma_shift, v_chroma_shift;
int i;
@@
-129,7
+129,8
@@
static int yuv4_write_packet(AVFormatContext *s, AVPacket *pkt)
char buf1[20];
uint8_t *ptr, *ptr1, *ptr2;
- picture = (AVPicture *)pkt->data;
+ memcpy(&picture_tmp, pkt->data, sizeof(AVPicture));
+ picture = &picture_tmp;
/* for the first packet we have to output the header as well */
if (*first_pkt) {