mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-03-31 23:59:34 +00:00
Factor tag reading code out of wav read_header()
Originally committed as revision 26369 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
925aa96915
commit
724b1f6a05
@ -140,6 +140,13 @@ AVOutputFormat wav_muxer = {
|
|||||||
|
|
||||||
|
|
||||||
#if CONFIG_WAV_DEMUXER
|
#if CONFIG_WAV_DEMUXER
|
||||||
|
|
||||||
|
static int64_t next_tag(ByteIOContext *pb, unsigned int *tag)
|
||||||
|
{
|
||||||
|
*tag = get_le32(pb);
|
||||||
|
return get_le32(pb);
|
||||||
|
}
|
||||||
|
|
||||||
/* return the size of the found tag */
|
/* return the size of the found tag */
|
||||||
static int64_t find_tag(ByteIOContext *pb, uint32_t tag1)
|
static int64_t find_tag(ByteIOContext *pb, uint32_t tag1)
|
||||||
{
|
{
|
||||||
@ -149,8 +156,7 @@ static int64_t find_tag(ByteIOContext *pb, uint32_t tag1)
|
|||||||
for (;;) {
|
for (;;) {
|
||||||
if (url_feof(pb))
|
if (url_feof(pb))
|
||||||
return -1;
|
return -1;
|
||||||
tag = get_le32(pb);
|
size = next_tag(pb, &tag);
|
||||||
size = get_le32(pb);
|
|
||||||
if (tag == tag1)
|
if (tag == tag1)
|
||||||
break;
|
break;
|
||||||
url_fseek(pb, size, SEEK_CUR);
|
url_fseek(pb, size, SEEK_CUR);
|
||||||
|
Loading…
Reference in New Issue
Block a user