Changeset 347c0fec445debf826f6194aca3fec9aeddd6db0
- Timestamp:
- 07/24/02 17:21:47
(6 years ago)
- Author:
- Sam Hocevar <sam@videolan.org>
- git-committer:
- Sam Hocevar <sam@videolan.org> 1027524107 +0000
- git-parent:
[bd0431f64f0b1f41777f5eb4aaad5cf575a6858c]
- git-author:
- Sam Hocevar <sam@videolan.org> 1027524107 +0000
- Message:
- ./plugins/mpeg_system/mpeg_es.c: fixed a segfault when no decoder was
found (p_fifo might be NULL).
- ./plugins/mpeg_system/mpeg_es.c, ./src/input/input_ext-dec.c: fixed
a deadlock issue with demuxers waiting on p_fifo->data_lock.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r64d33dc |
r347c0fe |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 2001 VideoLAN |
|---|
| 5 | | * $Id: mpeg_es.c,v 1.10 2002/07/23 00:39:17 sam Exp $ |
|---|
| | 5 | * $Id: mpeg_es.c,v 1.11 2002/07/24 15:21:47 sam Exp $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Christophe Massiot <massiot@via.ecp.fr> |
|---|
| … | … | |
| 173 | 173 | pes_packet_t * p_pes; |
|---|
| 174 | 174 | data_packet_t * p_data; |
|---|
| 175 | | |
|---|
| | 175 | |
|---|
| | 176 | if( p_fifo == NULL ) |
|---|
| | 177 | { |
|---|
| | 178 | return -1; |
|---|
| | 179 | } |
|---|
| | 180 | |
|---|
| 176 | 181 | i_read = input_SplitBuffer( p_input, &p_data, ES_PACKET_SIZE ); |
|---|
| 177 | 182 | |
|---|
| 178 | 183 | if ( i_read <= 0 ) |
|---|
| 179 | 184 | { |
|---|
| 180 | | return( i_read ); |
|---|
| | 185 | return i_read; |
|---|
| 181 | 186 | } |
|---|
| 182 | 187 | |
|---|
| … | … | |
| 187 | 192 | msg_Err( p_input, "out of memory" ); |
|---|
| 188 | 193 | input_DeletePacket( p_input->p_method_data, p_data ); |
|---|
| 189 | | return( -1 ); |
|---|
| | 194 | return -1; |
|---|
| 190 | 195 | } |
|---|
| 191 | 196 | |
|---|
| … | … | |
| 195 | 200 | |
|---|
| 196 | 201 | vlc_mutex_lock( &p_fifo->data_lock ); |
|---|
| | 202 | |
|---|
| | 203 | /* If the decoder is waiting for us, wake him up */ |
|---|
| | 204 | vlc_cond_signal( &p_fifo->data_wait ); |
|---|
| | 205 | |
|---|
| 197 | 206 | if( p_fifo->i_depth >= MAX_PACKETS_IN_FIFO ) |
|---|
| 198 | 207 | { |
|---|
| … | … | |
| 214 | 223 | input_DecodePES( p_fifo, p_pes ); |
|---|
| 215 | 224 | |
|---|
| 216 | | return( 1 ); |
|---|
| 217 | | } |
|---|
| 218 | | |
|---|
| | 225 | return 1; |
|---|
| | 226 | } |
|---|
| | 227 | |
|---|
| r9e3ab28 |
r347c0fe |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 1998-2001 VideoLAN |
|---|
| 5 | | * $Id: input_ext-dec.c,v 1.32 2002/06/01 12:32:01 sam Exp $ |
|---|
| | 5 | * $Id: input_ext-dec.c,v 1.33 2002/07/24 15:21:47 sam Exp $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Christophe Massiot <massiot@via.ecp.fr> |
|---|
| … | … | |
| 99 | 99 | p_fifo->p_first = NULL; |
|---|
| 100 | 100 | p_fifo->pp_last = &p_fifo->p_first; |
|---|
| | 101 | |
|---|
| | 102 | /* If the input is waiting for us, tell him to stop */ |
|---|
| | 103 | vlc_cond_signal( &p_fifo->data_wait ); |
|---|
| 101 | 104 | |
|---|
| 102 | 105 | /* Waiting for the input thread to put new PES packets in the fifo */ |
|---|