Unified · Split
| @@ -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) { |