Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Seungha Yang
gst-plugins-base
Commits
a3c6d0da
Commit
a3c6d0da
authored
Dec 23, 2012
by
Tim-Philipp Müller
🐠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
encoding-profile: add special-casing for asf/wmv/wma file extensions
https://bugzilla.gnome.org/show_bug.cgi?id=636753
parent
f1948e21
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
1 deletion
+32
-1
gst-libs/gst/pbutils/encoding-profile.c
gst-libs/gst/pbutils/encoding-profile.c
+32
-1
No files found.
gst-libs/gst/pbutils/encoding-profile.c
View file @
a3c6d0da
...
...
@@ -979,9 +979,13 @@ gst_encoding_profile_get_file_extension (GstEncodingProfile * profile)
goto
done
;
}
if
(
num_children
==
0
)
goto
done
;
/* special cases */
has_video
=
gst_encoding_container_profile_has_video
(
cprofile
);
/* Ogg */
if
(
strcmp
(
ext
,
"ogg"
)
==
0
)
{
/* ogg with video => .ogv */
if
(
has_video
)
{
...
...
@@ -1002,8 +1006,35 @@ gst_encoding_profile_get_file_extension (GstEncodingProfile * profile)
goto
done
;
}
if
(
has_video
&&
strcmp
(
ext
,
"mka"
)
==
0
)
/* Matroska */
if
(
has_video
&&
strcmp
(
ext
,
"mka"
)
==
0
)
{
ext
=
"mkv"
;
goto
done
;
}
/* Windows Media / ASF */
if
(
gst_encoding_profile_has_format
(
profile
,
"video/x-ms-asf"
))
{
const
GList
*
l
;
guint
num_wmv
=
0
,
num_wma
=
0
,
num_other
=
0
;
for
(
l
=
cprofile
->
encodingprofiles
;
l
!=
NULL
;
l
=
l
->
next
)
{
if
(
gst_encoding_profile_has_format
(
l
->
data
,
"video/x-wmv"
))
++
num_wmv
;
else
if
(
gst_encoding_profile_has_format
(
l
->
data
,
"audio/x-wma"
))
++
num_wma
;
else
++
num_other
;
}
if
(
num_other
>
0
)
ext
=
"asf"
;
else
if
(
num_wmv
>
0
)
ext
=
"wmv"
;
else
if
(
num_wma
>
0
)
ext
=
"wma"
;
goto
done
;
}
done:
...
...
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