Changeset 21196f47028a9b59d9f882b6abc8f05bb79a34df
- Timestamp:
- 23/01/03 14:44:21
(6 years ago)
- Author:
- Laurent Aimar <fenrir@videolan.org>
- git-committer:
- Laurent Aimar <fenrir@videolan.org> 1043329461 +0000
- git-parent:
[e8ce66c232c2cd62cd8d9535200033a0c210f3e9]
- git-author:
- Laurent Aimar <fenrir@videolan.org> 1043329461 +0000
- Message:
- don't send audio in fast/slow playing speed unless there isn't any video
stream.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r9a5b0b8 |
r21196f4 |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 2001 VideoLAN |
|---|
| 5 | | * $Id: avi.c,v 1.27 2003/01/20 13:01:53 fenrir Exp $ |
|---|
| | 5 | * $Id: avi.c,v 1.28 2003/01/23 13:44:21 fenrir Exp $ |
|---|
| 6 | 6 | * Authors: Laurent Aimar <fenrir@via.ecp.fr> |
|---|
| 7 | 7 | * |
|---|
| … | … | |
| 684 | 684 | demux_sys_t *p_avi ) |
|---|
| 685 | 685 | { |
|---|
| 686 | | int i_stream; |
|---|
| | 686 | int unsigned i_stream; |
|---|
| 687 | 687 | int b_end; |
|---|
| 688 | 688 | |
|---|
| … | … | |
| 1690 | 1690 | unsigned int i_stream; |
|---|
| 1691 | 1691 | vlc_bool_t b_stream; |
|---|
| 1692 | | |
|---|
| | 1692 | vlc_bool_t b_play_audio; |
|---|
| | 1693 | vlc_bool_t b_video; /* is there some video track selected */ |
|---|
| 1693 | 1694 | // cannot be more than 100 stream (dcXX or wbXX) |
|---|
| 1694 | 1695 | avi_stream_toread_t toread[100]; |
|---|
| … | … | |
| 1697 | 1698 | |
|---|
| 1698 | 1699 | /* detect new selected/unselected streams */ |
|---|
| 1699 | | for( i_stream = 0,i_stream_count= 0; |
|---|
| | 1700 | for( i_stream = 0,i_stream_count= 0, b_video = VLC_FALSE; |
|---|
| 1700 | 1701 | i_stream < p_avi->i_streams; i_stream++ ) |
|---|
| 1701 | 1702 | { |
|---|
| … | … | |
| 1718 | 1719 | { |
|---|
| 1719 | 1720 | i_stream_count++; |
|---|
| | 1721 | if( p_stream->i_cat == VIDEO_ES ) |
|---|
| | 1722 | { |
|---|
| | 1723 | b_video = VLC_TRUE; |
|---|
| | 1724 | } |
|---|
| 1720 | 1725 | } |
|---|
| 1721 | 1726 | #undef p_stream |
|---|
| … | … | |
| 1771 | 1776 | } |
|---|
| 1772 | 1777 | #endif |
|---|
| | 1778 | |
|---|
| | 1779 | /* *** send audio data to decoder if rate == DEFAULT_RATE or no video *** */ |
|---|
| | 1780 | vlc_mutex_lock( &p_input->stream.stream_lock ); |
|---|
| | 1781 | if( p_input->stream.control.i_rate == DEFAULT_RATE || !b_video ) |
|---|
| | 1782 | { |
|---|
| | 1783 | b_play_audio = VLC_TRUE; |
|---|
| | 1784 | } |
|---|
| | 1785 | else |
|---|
| | 1786 | { |
|---|
| | 1787 | b_play_audio = VLC_FALSE; |
|---|
| | 1788 | } |
|---|
| | 1789 | vlc_mutex_unlock( &p_input->stream.stream_lock ); |
|---|
| | 1790 | |
|---|
| 1773 | 1791 | /* init toread */ |
|---|
| 1774 | 1792 | for( i_stream = 0; i_stream < p_avi->i_streams; i_stream++ ) |
|---|
| … | … | |
| 1778 | 1796 | |
|---|
| 1779 | 1797 | toread[i_stream].b_ok = p_stream->b_activated; |
|---|
| 1780 | | |
|---|
| 1781 | 1798 | if( p_stream->i_idxposc < p_stream->i_idxnb ) |
|---|
| 1782 | 1799 | { |
|---|
| … | … | |
| 2029 | 2046 | b_stream = VLC_TRUE; // at least one read succeed |
|---|
| 2030 | 2047 | |
|---|
| 2031 | | if( p_stream->p_es && p_stream->p_es->p_decoder_fifo ) |
|---|
| | 2048 | if( p_stream->p_es && p_stream->p_es->p_decoder_fifo && |
|---|
| | 2049 | ( b_play_audio || p_stream->i_cat != AUDIO_ES ) ) |
|---|
| 2032 | 2050 | { |
|---|
| 2033 | 2051 | p_pes->i_dts = |
|---|