Changeset 0e1777c234a2604ea7fd8588e4c2bfd4c74abd89
- 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
| rffc45b9 |
r0e1777c |
|
| 29 | 29 | #include <vlc/input.h> |
|---|
| 30 | 30 | |
|---|
| | 31 | #include <vlc_interaction.h> |
|---|
| | 32 | |
|---|
| 31 | 33 | #include "vlc_meta.h" |
|---|
| 32 | 34 | #include "codecs.h" |
|---|
| … | … | |
| 198 | 200 | demux_t *p_demux = (demux_t *)p_this; |
|---|
| 199 | 201 | demux_sys_t *p_sys; |
|---|
| | 202 | |
|---|
| | 203 | vlc_bool_t b_index = VLC_FALSE; |
|---|
| 200 | 204 | |
|---|
| 201 | 205 | avi_chunk_t ck_riff; |
|---|
| … | … | |
| 510 | 514 | if( config_GetInt( p_demux, "avi-index" ) ) |
|---|
| 511 | 515 | { |
|---|
| | 516 | aviindex: |
|---|
| 512 | 517 | if( p_sys->b_seekable ) |
|---|
| 513 | 518 | { |
|---|
| … | … | |
| 531 | 536 | (mtime_t)1000000 ) |
|---|
| 532 | 537 | { |
|---|
| 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 | |
|---|
| 535 | 561 | /* fix some BeOS MediaKit generated file */ |
|---|
| 536 | 562 | for( i = 0 ; i < p_sys->i_track; i++ ) |
|---|
| r89518a7 |
r0e1777c |
|
| 139 | 139 | p_dialog->i_return = DIALOG_DEFAULT; |
|---|
| 140 | 140 | 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 ) |
|---|
| 143 | 141 | p_dialog->i_return = DIALOG_CANCELLED; |
|---|
| 144 | 142 | |
|---|