History

yuv4mpeg: fix potential alignment bug

Michael Niedermayer committed 14 years ago

Commit b86e18f1 parent 7beadfe1 file · +3 −2Browse files

Unified · Split

libavformat/yuv4mpeg.c+3−2
@@ -121,7 +121,7 @@ static int yuv4_write_packet(AVFormatContext *s, AVPacket *pkt) · 120 unmodified lines
121{121{
122 AVStream *st = s->streams[pkt->stream_index];122 AVStream *st = s->streams[pkt->stream_index];
123 AVIOContext *pb = s->pb;123 AVIOContext *pb = s->pb;
124 AVPicture *picture;124 AVPicture *picture, picture_tmp;
125 int* first_pkt = s->priv_data;125 int* first_pkt = s->priv_data;
126 int width, height, h_chroma_shift, v_chroma_shift;126 int width, height, h_chroma_shift, v_chroma_shift;
127 int i;127 int i;
@@ -129,7 +129,8 @@ static int yuv4_write_packet(AVFormatContext *s, AVPacket *pkt) · 1 unmodified line
129 char buf1[20];129 char buf1[20];
130 uint8_t *ptr, *ptr1, *ptr2;130 uint8_t *ptr, *ptr1, *ptr2;
131 131
132 picture = (AVPicture *)pkt->data;132 memcpy(&picture_tmp, pkt->data, sizeof(AVPicture));
133 picture = &picture_tmp;
133 134
134 /* for the first packet we have to output the header as well */135 /* for the first packet we have to output the header as well */
135 if (*first_pkt) {136 if (*first_pkt) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t