You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avformat/mov: Simplify data->hex conversion
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -979,6 +979,7 @@ static int mov_read_adrm(MOVContext *c, AVIOContext *pb, MOVAtom atom)
|
|||||||
uint8_t output[64];
|
uint8_t output[64];
|
||||||
uint8_t file_checksum[20];
|
uint8_t file_checksum[20];
|
||||||
uint8_t calculated_checksum[20];
|
uint8_t calculated_checksum[20];
|
||||||
|
char checksum_string[2 * sizeof(file_checksum) + 1];
|
||||||
struct AVSHA *sha;
|
struct AVSHA *sha;
|
||||||
int i;
|
int i;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
@@ -1003,10 +1004,9 @@ static int mov_read_adrm(MOVContext *c, AVIOContext *pb, MOVAtom atom)
|
|||||||
avio_read(pb, output, 4); // go to offset 4, absolute position 0x28d
|
avio_read(pb, output, 4); // go to offset 4, absolute position 0x28d
|
||||||
avio_read(pb, file_checksum, 20);
|
avio_read(pb, file_checksum, 20);
|
||||||
|
|
||||||
av_log(c->fc, AV_LOG_INFO, "[aax] file checksum == "); // required by external tools
|
// required by external tools
|
||||||
for (i = 0; i < 20; i++)
|
ff_data_to_hex(checksum_string, file_checksum, sizeof(file_checksum), 1);
|
||||||
av_log(c->fc, AV_LOG_INFO, "%02x", file_checksum[i]);
|
av_log(c->fc, AV_LOG_INFO, "[aax] file checksum == %s\n", checksum_string);
|
||||||
av_log(c->fc, AV_LOG_INFO, "\n");
|
|
||||||
|
|
||||||
/* verify activation data */
|
/* verify activation data */
|
||||||
if (!activation_bytes) {
|
if (!activation_bytes) {
|
||||||
|
Reference in New Issue
Block a user