[vlc-commits] demux: avi: simplify [re]creating DV es
Francois Cartegnie
git at videolan.org
Tue Jul 24 14:17:54 CEST 2018
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Jul 24 13:14:23 2018 +0200| [16d2a7c98ac95f21a52e98fc71ab691fcbad5776] | committer: Francois Cartegnie
demux: avi: simplify [re]creating DV es
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=16d2a7c98ac95f21a52e98fc71ab691fcbad5776
---
modules/demux/avi/avi.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c
index dcb94dbd47..ff8f471302 100644
--- a/modules/demux/avi/avi.c
+++ b/modules/demux/avi/avi.c
@@ -2891,13 +2891,15 @@ static void AVI_DvHandleAudio( demux_t *p_demux, avi_track_t *tk, block_t *p_fra
if( tk->p_es_dv_audio && tk->i_dv_audio_rate != (int)fmt.audio.i_rate )
{
es_out_Del( p_demux->out, tk->p_es_dv_audio );
- tk->p_es_dv_audio = es_out_Add( p_demux->out, &fmt );
+ tk->p_es_dv_audio = NULL;
}
- else if( !tk->p_es_dv_audio )
+
+ if( !tk->p_es_dv_audio )
{
tk->p_es_dv_audio = es_out_Add( p_demux->out, &fmt );
+ tk->i_dv_audio_rate = fmt.audio.i_rate;
}
- tk->i_dv_audio_rate = fmt.audio.i_rate;
+
es_format_Clean( &fmt );
block_t *p_frame_audio = dv_extract_audio( p_frame );
More information about the vlc-commits
mailing list