Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 65749 Details for
Bug 102222
Patch for mplayerplug-in to allow easy disabling of only audio files
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
A working patch to implement support for the enable-audio flag in mplayerplug-in.conf
mplayerplug-in-2.85-make_audio_optional.patch (text/plain), 3.07 KB, created by
Stephan Sokolow
on 2005-08-12 04:40:44 UTC
(
hide
)
Description:
A working patch to implement support for the enable-audio flag in mplayerplug-in.conf
Filename:
MIME Type:
Creator:
Stephan Sokolow
Created:
2005-08-12 04:40:44 UTC
Size:
3.07 KB
patch
obsolete
>--- mplayerplug-in/Source/plugin-setup.cpp.orig 2005-08-12 06:17:21.000000000 -0400 >+++ mplayerplug-in/Source/plugin-setup.cpp 2005-08-12 06:29:33.000000000 -0400 >@@ -9,6 +9,7 @@ > int enable_mpeg; > int enable_ogg; > int enable_smil; >+int enable_audio; > > #define MAX_BUF_LEN 255 > #define STATE_RESET 0 >@@ -53,6 +54,7 @@ > enable_mpeg = 1; > enable_ogg = 1; > enable_smil = 1; >+ enable_audio = 1; > use_custom_mime_types = 0; > > DEBUG = 0; //set to 1 when debugging this function >@@ -133,6 +135,15 @@ > printf("mpeg:%i\n", enable_mpeg); > continue; > } >+ // Audio Files >+ if (strncasecmp(buffer, "enable-audio", 11) == 0) { >+ snprintf(parse, 1000, "%s", strtok(buffer, "=")); >+ snprintf(parse, 1000, "%s", strtok(NULL, "=")); >+ sscanf(parse, "%i", &enable_audio); >+ if (DEBUG) >+ printf("mpeg:%i\n", enable_audio); >+ continue; >+ } > // Ogg Vorbis > if (strncasecmp(buffer, "enable-ogg", 11) == 0) { > snprintf(parse, 1000, "%s", strtok(buffer, "=")); >@@ -209,22 +220,29 @@ > "video/x-ms-wmv:wmv:Microsoft WMV video;" > "video/x-ms-wmp:wmp:Windows Media;" > "video/x-ms-wvx:wvx:Windows Media;" >+ "application/x-drm-v2:asx:Windows Media;", >+ sizeof(MimeTypes)); >+ if (enable_audio == 1) { >+ strlcat(MimeTypes, > "audio/x-ms-wax:wax:Windows Media;" > "audio/x-ms-wma:wma:Windows Media;" >- "application/x-drm-v2:asx:Windows Media;" > "audio/wav:wav:Microsoft wave file;" > "audio/x-wav:wav:Microsoft wave file;", > sizeof(MimeTypes)); > } >+ } > > > if (enable_real == 1) { > strlcat(MimeTypes, >+ "application/smil:smil:SMIL;", sizeof(MimeTypes)); >+ if (enable_audio == 1) { >+ strlcat(MimeTypes, > "audio/x-pn-realaudio:ram,rm:RealAudio;" > "audio/x-pn-realaudio-plugin:rpm:RealAudio;" >- "application/smil:smil:SMIL;" > "audio/x-realaudio:ra:RealAudio;", sizeof(MimeTypes)); > } >+ } > > if (enable_real == 0 && enable_qt == 1) { > if (enable_smil == 1) >@@ -235,25 +253,31 @@ > if (enable_mpeg == 1) { > strlcat(MimeTypes, > "video/mpeg:mpg,mpeg:MPEG;" >- "audio/mpeg:mpg,mpeg:MPEG;" > "video/x-mpeg:mpg,mpeg:MPEG;" > "video/x-mpeg2:mpv2,mp2ve:MPEG2;" >+ "video/mp4:mp4:MPEG 4 Video;", sizeof(MimeTypes)); >+ if (enable_audio == 1) { >+ strlcat(MimeTypes, >+ "audio/mpeg:mpg,mpeg:MPEG;" > "audio/mpeg:mpg,mpeg:MPEG;" > "audio/x-mpeg:mpg,mpeg:MPEG;" > "audio/mpeg2:mp2:MPEG audio;" > "audio/x-mpeg2:mp2:MPEG audio;" > "audio/mpeg3:mp3:MPEG audio;" > "audio/x-mpeg3:mp3:MPEG audio;" >- "audio/mp3:mp3:MPEG audio;" >- "video/mp4:mp4:MPEG 4 Video;", sizeof(MimeTypes)); >+ "audio/mp3:mp3:MPEG audio;", sizeof(MimeTypes)); >+ } > } > > if (enable_ogg == 1) { > strlcat(MimeTypes, > "application/x-ogg:ogg:Ogg Vorbis Media;" >- "audio/ogg:ogg:Ogg Vorbis Audio;" > "application/ogg:ogg:Ogg Vorbis / Ogg Theora;", > sizeof(MimeTypes)); >+ if (enable_audio == 1) { >+ strlcat(MimeTypes, >+ "audio/ogg:ogg:Ogg Vorbis Audio;", sizeof(MimeTypes)); >+ } > } > // FLI > strlcat(MimeTypes,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 102222
: 65749