Changeset 0e1777c234a2604ea7fd8588e4c2bfd4c74abd89

Show
Ignore:
Timestamp:
12/12/05 19:02:27 (3 years ago)
Author:
Clément Stenac <zorglub@videolan.org>
git-committer:
Clément Stenac <zorglub@videolan.org> 1134410547 +0000
git-parent:

[89518a71429d439c328c2b0ea788672515bace72]

git-author:
Clément Stenac <zorglub@videolan.org> 1134410547 +0000
Message:

Propose to fix AVI index

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/demux/avi/avi.c

    rffc45b9 r0e1777c  
    2929#include <vlc/input.h> 
    3030 
     31#include <vlc_interaction.h> 
     32 
    3133#include "vlc_meta.h" 
    3234#include "codecs.h" 
     
    198200    demux_t  *p_demux = (demux_t *)p_this; 
    199201    demux_sys_t     *p_sys; 
     202 
     203    vlc_bool_t       b_index = VLC_FALSE; 
    200204 
    201205    avi_chunk_t         ck_riff; 
     
    510514    if( config_GetInt( p_demux, "avi-index" ) ) 
    511515    { 
     516aviindex: 
    512517        if( p_sys->b_seekable ) 
    513518        { 
     
    531536                          (mtime_t)1000000 ) 
    532537    { 
    533         msg_Warn( p_demux, "broken or missing index, 'seek' will be axproximative or will have strange behavour" ); 
    534     } 
     538        msg_Warn( p_demux, "broken or missing index, 'seek' will be axproximative or will have " 
     539                           "strange behavour" ); 
     540        if( !b_index ) 
     541        { 
     542            int i_create; 
     543            i_create = intf_UserYesNo( p_demux, "AVI Index", _("This AVI file is broken. Seeking will not " 
     544                                       "work correctly.\nDo you want to " 
     545                                       "try to repair it (this might take a long time) ?" ) ); 
     546            if( i_create == DIALOG_OK_YES ) 
     547            { 
     548                b_index = VLC_TRUE; 
     549                msg_Dbg( p_demux, "Fixing AVI index" ); 
     550                goto aviindex; 
     551            } 
     552            else if( i_create == DIALOG_CANCELLED ) 
     553            { 
     554                /* Kill input */ 
     555                p_demux->p_parent->b_die = VLC_TRUE; 
     556                goto error; 
     557            } 
     558        } 
     559    } 
     560 
    535561    /* fix some BeOS MediaKit generated file */ 
    536562    for( i = 0 ; i < p_sys->i_track; i++ ) 
  • src/interface/interaction.c

    r89518a7 r0e1777c  
    139139            p_dialog->i_return = DIALOG_DEFAULT; 
    140140            if( p_dialog->i_flags & DIALOG_OK_CANCEL ) 
    141                 p_dialog->i_return = DIALOG_CANCELLED; 
    142             if( p_dialog->i_flags & DIALOG_YES_NO_CANCEL ) 
    143141                p_dialog->i_return = DIALOG_CANCELLED; 
    144142