|
|
@ -210,7 +210,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt) |
|
|
|
} |
|
|
|
} |
|
|
|
bink->remain_packet_size -= 4 + audio_size; |
|
|
|
bink->remain_packet_size -= 4 + audio_size; |
|
|
|
bink->current_track++; |
|
|
|
bink->current_track++; |
|
|
|
if (audio_size > 0) { |
|
|
|
if (audio_size >= 4) { |
|
|
|
/* get one audio packet per track */ |
|
|
|
/* get one audio packet per track */ |
|
|
|
if ((ret = av_get_packet(pb, pkt, audio_size)) |
|
|
|
if ((ret = av_get_packet(pb, pkt, audio_size)) |
|
|
|
!= audio_size) |
|
|
|
!= audio_size) |
|
|
@ -223,6 +223,8 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt) |
|
|
|
bink->audio_pts[bink->current_track -1] += |
|
|
|
bink->audio_pts[bink->current_track -1] += |
|
|
|
AV_RL32(pkt->data) / (2 * s->streams[bink->current_track]->codec->channels); |
|
|
|
AV_RL32(pkt->data) / (2 * s->streams[bink->current_track]->codec->channels); |
|
|
|
return 0; |
|
|
|
return 0; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
url_fseek(pb, audio_size, SEEK_CUR); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|