aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-11-17 18:20:04 +0000
committerGravatar reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-11-17 18:20:04 +0000
commit9424a3431d2a3bf3e8d938425a4a0fa876f60213 (patch)
treed9c841020e6bf29b230264672ef24a8275093c87
parent509ee9591ce26d16df729143c7bba9d7c62f60cd (diff)
Use AV_WB32 instead of manual bit-fiddling when setting DVD speed
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25065 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--stream/stream_dvd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/stream/stream_dvd.c b/stream/stream_dvd.c
index 9a5a6f006f..757031062d 100644
--- a/stream/stream_dvd.c
+++ b/stream/stream_dvd.c
@@ -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 @@ static void dvd_set_speed(char *device, unsigned speed)
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;