Changeset 37558f4a013787f3a197db1de20aa6f0427ab2b1

Show
Ignore:
Timestamp:
03/21/08 22:50:25 (6 months ago)
Author:
Sam Hocevar <sam@zoy.org>
git-committer:
Sam Hocevar <sam@zoy.org> 1206136225 +0100
git-parent:

[5122c9d9e9f5851a84c2b037cc35dbacd3699aef]

git-author:
Sam Hocevar <sam@zoy.org> 1206136225 +0100
Message:

Fix a potential corruption in release_input_thread().

If the media instance owns the input and libvlc_media_instance_release()
is called immediately after libvlc_media_instance_stop(), there is a
chance that we try to free the input resources before the thread is
effectively terminated. To avoid this, we call input_DestroyThread()
instead of vlc_object_release() at the end of release_input_thread() when
the media instance owns the input thread.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/control/media_instance.c

    r5122c9d r37558f4  
    9393        /* We owned this one */ 
    9494        input_StopThread( p_input_thread ); 
     95        input_DestroyThread( p_input_thread ); 
    9596 
    9697        var_Destroy( p_input_thread, "drawable" ); 
    9798    } 
    98  
    99     vlc_object_release( p_input_thread ); 
     99    else 
     100        vlc_object_release( p_input_thread ); 
    100101 
    101102    p_mi->p_input_thread = NULL;