Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
51c7577c
Commit
51c7577c
authored
May 31, 2010
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/mp4ff: rename and move local variable
Allocate the "tag" object after the file has been checked. That removes one tag_free() call in an error handler.
parent
be308c66
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
mp4ff_decoder_plugin.c
src/decoder/mp4ff_decoder_plugin.c
+5
-6
No files found.
src/decoder/mp4ff_decoder_plugin.c
View file @
51c7577c
...
...
@@ -367,7 +367,6 @@ mp4ff_tag_name_parse(const char *name)
static
struct
tag
*
mp4_stream_tag
(
struct
input_stream
*
is
)
{
struct
tag
*
ret
=
NULL
;
struct
mp4ff_input_stream
mis
;
int32_t
track
;
int32_t
file_time
;
...
...
@@ -384,15 +383,15 @@ mp4_stream_tag(struct input_stream *is)
return
NULL
;
}
ret
=
tag_new
();
file_time
=
mp4ff_get_track_duration_use_offsets
(
mp4fh
,
track
);
scale
=
mp4ff_time_scale
(
mp4fh
,
track
);
if
(
scale
<
0
)
{
mp4ff_close
(
mp4fh
);
tag_free
(
ret
);
return
NULL
;
}
ret
->
time
=
((
float
)
file_time
)
/
scale
+
0
.
5
;
struct
tag
*
tag
=
tag_new
();
tag
->
time
=
((
float
)
file_time
)
/
scale
+
0
.
5
;
for
(
i
=
0
;
i
<
mp4ff_meta_get_num_items
(
mp4fh
);
i
++
)
{
char
*
item
;
...
...
@@ -402,7 +401,7 @@ mp4_stream_tag(struct input_stream *is)
enum
tag_type
type
=
mp4ff_tag_name_parse
(
item
);
if
(
type
!=
TAG_NUM_OF_ITEM_TYPES
)
tag_add_item
(
ret
,
type
,
value
);
tag_add_item
(
tag
,
type
,
value
);
free
(
item
);
free
(
value
);
...
...
@@ -410,7 +409,7 @@ mp4_stream_tag(struct input_stream *is)
mp4ff_close
(
mp4fh
);
return
ret
;
return
tag
;
}
static
const
char
*
const
mp4_suffixes
[]
=
{
"m4a"
,
"mp4"
,
NULL
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment