[vlc-devel] commit: Use image_Mime2Fourcc(). (Antoine Cellerier )
git version control
git at videolan.org
Mon Apr 6 23:28:53 CEST 2009
vlc | branch: master | Antoine Cellerier <dionoea at videolan.org> | Mon Apr 6 23:27:50 2009 +0200| [09debb5655fbf336ebdfdb8f6f03a5757dd31d9d] | committer: Antoine Cellerier
Use image_Mime2Fourcc().
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=09debb5655fbf336ebdfdb8f6f03a5757dd31d9d
---
modules/codec/subtitles/subsusf.c | 31 +------------------------------
1 files changed, 1 insertions(+), 30 deletions(-)
diff --git a/modules/codec/subtitles/subsusf.c b/modules/codec/subtitles/subsusf.c
index dfb0db2..330e167 100644
--- a/modules/codec/subtitles/subsusf.c
+++ b/modules/codec/subtitles/subsusf.c
@@ -460,36 +460,7 @@ static int ParseImageAttachments( decoder_t *p_dec )
{
input_attachment_t *p_attach = pp_attachments[k];
- vlc_fourcc_t type = 0;
-
- if( ( !strcmp( p_attach->psz_mime, "image/bmp" ) ) || /* BMP */
- ( !strcmp( p_attach->psz_mime, "image/x-bmp" ) ) ||
- ( !strcmp( p_attach->psz_mime, "image/x-bitmap" ) ) ||
- ( !strcmp( p_attach->psz_mime, "image/x-ms-bmp" ) ) )
- {
- type = VLC_FOURCC('b','m','p',' ');
- }
- else if( ( !strcmp( p_attach->psz_mime, "image/x-portable-anymap" ) ) || /* PNM */
- ( !strcmp( p_attach->psz_mime, "image/x-portable-bitmap" ) ) || /* PBM */
- ( !strcmp( p_attach->psz_mime, "image/x-portable-graymap" ) ) || /* PGM */
- ( !strcmp( p_attach->psz_mime, "image/x-portable-pixmap" ) ) ) /* PPM */
- {
- type = VLC_FOURCC('p','n','m',' ');
- }
- else if ( !strcmp( p_attach->psz_mime, "image/gif" ) ) /* GIF */
- type = VLC_FOURCC('g','i','f',' ');
- else if ( !strcmp( p_attach->psz_mime, "image/jpeg" ) ) /* JPG, JPEG */
- type = VLC_FOURCC('j','p','e','g');
- else if ( !strcmp( p_attach->psz_mime, "image/pcx" ) ) /* PCX */
- type = VLC_FOURCC('p','c','x',' ');
- else if ( !strcmp( p_attach->psz_mime, "image/png" ) ) /* PNG */
- type = VLC_FOURCC('p','n','g',' ');
- else if ( !strcmp( p_attach->psz_mime, "image/tiff" ) ) /* TIF, TIFF */
- type = VLC_FOURCC('t','i','f','f');
- else if ( !strcmp( p_attach->psz_mime, "image/x-tga" ) ) /* TGA */
- type = VLC_FOURCC('t','g','a',' ');
- else if ( !strcmp( p_attach->psz_mime, "image/x-xpixmap") ) /* XPM */
- type = VLC_FOURCC('x','p','m',' ');
+ vlc_fourcc_t type = image_Mime2Fourcc( p_attach->psz_mime );
if( ( type != 0 ) &&
( p_attach->i_data > 0 ) &&
More information about the vlc-devel
mailing list