~ubuntu-branches/debian/wheezy/vlc/wheezy

« back to all changes in this revision

Viewing changes to src/audio_output/dec.c

  • Committer: Package Import Robot
  • Author(s): Benjamin Drung
  • Date: 2012-03-23 19:03:52 UTC
  • mfrom: (1.3.24)
  • Revision ID: package-import@ubuntu.com-20120323190352-umxyxxd5fdxseim8
Tags: 2.0.1-1
* New upstream release (LP: #931318, #943014, #947814).
* Change build dependency from libpng12-dev to libpng-dev. (Closes: #662539)
* Add --enable-dbus to configure flags.
* Drop patches that were backported and accepted by upstream.
* Add missing libxinerama-dev build dependency for the Skins2 interface.
* Add libgtk2.0-dev back to build dependencies for the notify plugin.
* Set urgency to high for security fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 * dec.c : audio output API towards decoders
3
3
 *****************************************************************************
4
4
 * Copyright (C) 2002-2007 VLC authors and VideoLAN
5
 
 * $Id: 7d0316fb9040690723d017fa9820aec2041c4f4e $
 
5
 * $Id: ab612141eb54e64df0c610e0f9aa460cdecc8b54 $
6
6
 *
7
7
 * Authors: Christophe Massiot <massiot@via.ecp.fr>
8
8
 *
97
97
        aout_Shutdown (p_aout);
98
98
    }
99
99
#endif
100
 
    int ret = -1;
 
100
    int ret = 0;
101
101
 
102
102
    /* TODO: reduce lock scope depending on decoder's real need */
103
103
    aout_lock( p_aout );
110
110
    owner->input_format = *p_format;
111
111
    vlc_atomic_set (&owner->restart, 0);
112
112
    if( aout_OutputNew( p_aout, p_format ) < 0 )
 
113
    {
 
114
        ret = -1;
113
115
        goto error;
 
116
    }
114
117
 
115
118
    /* Allocate a software mixer */
116
119
    assert (owner->volume.mixer == NULL);
129
132
    owner->input = aout_InputNew (p_aout, p_format, &owner->mixer_format,
130
133
                                  p_request_vout);
131
134
    if (owner->input == NULL)
 
135
    {
 
136
        struct audio_mixer *mixer = owner->volume.mixer;
 
137
 
 
138
        owner->volume.mixer = NULL;
132
139
        aout_OutputDelete (p_aout);
133
 
    else
134
 
        ret = 0;
 
140
        aout_unlock (p_aout);
 
141
        aout_MixerDelete (mixer);
 
142
        return -1;
 
143
    }
135
144
error:
136
145
    aout_unlock( p_aout );
137
146
    return ret;