Mercurial > mplayer.hg
changeset 25037:ee99e07b2139
Use AV_WB32 instead of manual bit-fiddling when setting DVD speed
author | reimar |
---|---|
date | Sat, 17 Nov 2007 18:20:04 +0000 |
parents | 1bc77e1220f3 |
children | b2ae4a355a54 |
files | stream/stream_dvd.c |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/stream/stream_dvd.c Sat Nov 17 18:17:19 2007 +0000 +++ b/stream/stream_dvd.c Sat Nov 17 18:20:04 2007 +0000 @@ -38,6 +38,7 @@ #include "stream_dvd.h" #include "stream_dvd_common.h" #include "libmpdemux/demuxer.h" +#include "libavutil/intreadwrite.h" extern int stream_cache_size; extern char* dvd_device; @@ -105,10 +106,9 @@ buffer[10] = 0xff; buffer[11] = 0xff; - buffer[12] = buffer[20] = (speed >> 24) & 0xff; /* <speed> kilobyte */ - buffer[13] = buffer[21] = (speed >> 16) & 0xff; - buffer[14] = buffer[22] = (speed >> 8) & 0xff; - buffer[15] = buffer[23] = speed & 0xff; + /* <speed> kilobyte */ + AV_WB32(buffer + 12, speed); + AV_WB32(buffer + 20, speed); buffer[18] = buffer[26] = 0x03; /* 1 second */ buffer[19] = buffer[27] = 0xe8;