- a = s->buf[stream_ptr++];
- r = s->buf[stream_ptr++];
- g = s->buf[stream_ptr++];
- b = s->buf[stream_ptr++];
- argb = (a << 24) | (r << 16) | (g << 8) | (b << 0);
- *(unsigned int *)(&rgb[pixel_ptr]) = argb;
- pixel_ptr += 4;
+ argb = AV_RB32(s->buf + stream_ptr);
+ AV_WN32A(rgb + pixel_ptr, argb);
+ stream_ptr += 4;
+ pixel_ptr += 4;