summaryrefslogtreecommitdiff
path: root/libavcodec/pnmenc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/pnmenc.c')
-rw-r--r--libavcodec/pnmenc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libavcodec/pnmenc.c b/libavcodec/pnmenc.c
index 46f7e6e98a..a7e70eb2f3 100644
--- a/libavcodec/pnmenc.c
+++ b/libavcodec/pnmenc.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "avcodec.h"
+#include "bytestream.h"
#include "pnm.h"
@@ -303,9 +304,7 @@ static int pam_encode_frame(AVCodecContext *avctx, unsigned char *outbuf, int bu
for(i=0;i<h;i++) {
for(j=0;j<w;j++) {
v = ((uint32_t *)ptr)[j];
- *s->bytestream++ = v >> 16;
- *s->bytestream++ = v >> 8;
- *s->bytestream++ = v;
+ bytestream_put_be24(&s->bytestream, v);
*s->bytestream++ = v >> 24;
}
ptr += linesize;