提交 3d1af11d 编写于 作者: M Mans Rullgard

sol: use AV_RL32 instead of raw pointer cast

Signed-off-by: NMans Rullgard <mans@mansr.com>
上级 b7581b5c
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
* Based on documents from Game Audio Player and own research * Based on documents from Game Audio Player and own research
*/ */
#include "libavutil/bswap.h" #include "libavutil/intreadwrite.h"
#include "avformat.h" #include "avformat.h"
#include "pcm.h" #include "pcm.h"
...@@ -33,8 +33,7 @@ ...@@ -33,8 +33,7 @@
static int sol_probe(AVProbeData *p) static int sol_probe(AVProbeData *p)
{ {
/* check file header */ /* check file header */
uint16_t magic; uint16_t magic = AV_RL32(p->buf);
magic=av_le2ne16(*((uint16_t*)p->buf));
if ((magic == 0x0B8D || magic == 0x0C0D || magic == 0x0C8D) && if ((magic == 0x0B8D || magic == 0x0C0D || magic == 0x0C8D) &&
p->buf[2] == 'S' && p->buf[3] == 'O' && p->buf[2] == 'S' && p->buf[3] == 'O' &&
p->buf[4] == 'L' && p->buf[5] == 0) p->buf[4] == 'L' && p->buf[5] == 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册