mirror of https://github.com/mpv-player/mpv
Use AV_RL32
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23647 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
4d4dd84726
commit
4badc643ae
|
@ -10,6 +10,7 @@
|
||||||
#include "stheader.h"
|
#include "stheader.h"
|
||||||
#include "genres.h"
|
#include "genres.h"
|
||||||
#include "mp3_hdr.h"
|
#include "mp3_hdr.h"
|
||||||
|
#include "libavutil/intreadwrite.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#ifdef MP_DEBUG
|
#ifdef MP_DEBUG
|
||||||
|
@ -219,18 +220,18 @@ get_flac_metadata (demuxer_t* demuxer)
|
||||||
if (stream_read (s, comments, blk_len) == blk_len)
|
if (stream_read (s, comments, blk_len) == blk_len)
|
||||||
{
|
{
|
||||||
uint8_t *p = ptr;
|
uint8_t *p = ptr;
|
||||||
length = p[0] + (p[1] << 8) + (p[2] << 16) + (p[3] << 24);
|
length = AV_RL32(p);
|
||||||
ptr += 4 + length;
|
ptr += 4 + length;
|
||||||
|
|
||||||
p = ptr;
|
p = ptr;
|
||||||
comment_list_len = p[0] + (p[1] << 8) + (p[2] << 16) + (p[3] << 24);
|
comment_list_len = AV_RL32(p);
|
||||||
ptr += 4;
|
ptr += 4;
|
||||||
|
|
||||||
cn = 0;
|
cn = 0;
|
||||||
for (; cn < comment_list_len; cn++)
|
for (; cn < comment_list_len; cn++)
|
||||||
{
|
{
|
||||||
p = ptr;
|
p = ptr;
|
||||||
length = p[0] + (p[1] << 8) + (p[2] << 16) + (p[3] << 24);
|
length = AV_RL32(p);
|
||||||
ptr += 4;
|
ptr += 4;
|
||||||
|
|
||||||
comment = (char *) ptr;
|
comment = (char *) ptr;
|
||||||
|
|
Loading…
Reference in New Issue