[FFmpeg-cvslog] avformat/mpegenc: minor simplification / use AV_WB16()
Michael Niedermayer
git at videolan.org
Thu Sep 26 14:20:12 CEST 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Sep 26 13:36:45 2013 +0200| [cd05c4060a2f170ab061ce59ce896a5fa1c53a15] | committer: Michael Niedermayer
avformat/mpegenc: minor simplification / use AV_WB16()
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cd05c4060a2f170ab061ce59ce896a5fa1c53a15
---
libavformat/mpegenc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c
index 811fe2d..ad07aa6 100644
--- a/libavformat/mpegenc.c
+++ b/libavformat/mpegenc.c
@@ -265,8 +265,7 @@ static int put_system_header(AVFormatContext *ctx, uint8_t *buf,int only_for_str
flush_put_bits(&pb);
size = put_bits_ptr(&pb) - pb.buf;
/* patch packet size */
- buf[4] = (size - 6) >> 8;
- buf[5] = (size - 6) & 0xff;
+ AV_WB16(buf + 4, size - 6);
return size;
}
More information about the ffmpeg-cvslog
mailing list