|
|
@ -62,7 +62,6 @@ static int thp_read_header(AVFormatContext *s, |
|
|
|
int i; |
|
|
|
int i; |
|
|
|
|
|
|
|
|
|
|
|
/* Read the file header. */ |
|
|
|
/* Read the file header. */ |
|
|
|
|
|
|
|
|
|
|
|
get_be32(pb); /* Skip Magic. */ |
|
|
|
get_be32(pb); /* Skip Magic. */ |
|
|
|
thp->version = get_be32(pb); |
|
|
|
thp->version = get_be32(pb); |
|
|
|
|
|
|
|
|
|
|
@ -113,8 +112,7 @@ static int thp_read_header(AVFormatContext *s, |
|
|
|
|
|
|
|
|
|
|
|
if (thp->version == 0x11000) |
|
|
|
if (thp->version == 0x11000) |
|
|
|
get_be32(pb); /* Unknown. */ |
|
|
|
get_be32(pb); /* Unknown. */ |
|
|
|
} |
|
|
|
} else if (thp->components[i] == 1) { |
|
|
|
else if (thp->components[i] == 1) { |
|
|
|
|
|
|
|
if (thp->has_audio != 0) |
|
|
|
if (thp->has_audio != 0) |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
@ -148,7 +146,6 @@ static int thp_read_packet(AVFormatContext *s, |
|
|
|
int ret; |
|
|
|
int ret; |
|
|
|
|
|
|
|
|
|
|
|
if (thp->audiosize == 0) { |
|
|
|
if (thp->audiosize == 0) { |
|
|
|
|
|
|
|
|
|
|
|
/* Terminate when last frame is reached. */ |
|
|
|
/* Terminate when last frame is reached. */ |
|
|
|
if (thp->frame >= thp->framecnt) |
|
|
|
if (thp->frame >= thp->framecnt) |
|
|
|
return AVERROR_IO; |
|
|
|
return AVERROR_IO; |
|
|
@ -176,8 +173,7 @@ static int thp_read_packet(AVFormatContext *s, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
pkt->stream_index = thp->video_stream_index; |
|
|
|
pkt->stream_index = thp->video_stream_index; |
|
|
|
} |
|
|
|
} else { |
|
|
|
else { |
|
|
|
|
|
|
|
ret = av_get_packet(pb, pkt, thp->audiosize); |
|
|
|
ret = av_get_packet(pb, pkt, thp->audiosize); |
|
|
|
if (ret != thp->audiosize) { |
|
|
|
if (ret != thp->audiosize) { |
|
|
|
av_free_packet(pkt); |
|
|
|
av_free_packet(pkt); |
|
|
|