# HG changeset patch # User nicodvb # Date 1194033142 0 # Node ID 55c96e8711985b3c2c08c60375e470250b4fdb2c # Parent c59a27887e5e1f8f44b3d196d2bd9409209c0713 10l, priv->use_psm can be 1 only if the format is genmpeg2 diff -r c59a27887e5e -r 55c96e871198 libmpdemux/muxer_mpeg.c --- a/libmpdemux/muxer_mpeg.c Fri Nov 02 19:06:15 2007 +0000 +++ b/libmpdemux/muxer_mpeg.c Fri Nov 02 19:52:22 2007 +0000 @@ -2228,6 +2228,7 @@ muxer_t *muxer = stream->muxer; muxer_priv_t *priv = muxer->priv; uint32_t stream_format; + int needs_psm = 0; if(stream->type == MUXER_TYPE_AUDIO) { @@ -2247,7 +2248,7 @@ spriv->max_buffer_size = 16*1024; } else if(stream->wf->wFormatTag == AUDIO_AAC1 || stream->wf->wFormatTag == AUDIO_AAC2) - priv->use_psm = 1; + needs_psm = 1; else if(stream->wf->wFormatTag == AUDIO_MP2 || stream->wf->wFormatTag == AUDIO_MP3) spriv->is_ready = 0; } @@ -2274,11 +2275,12 @@ spriv->is_ready = 1; if(!is_mpeg1(stream_format) && !is_mpeg2(stream_format)) - priv->use_psm = 1; + needs_psm = 1; } - if(priv->is_genmpeg2 && priv->use_psm) + if(priv->is_genmpeg2 && needs_psm) { + priv->use_psm = 1; add_to_psm(priv, spriv->id, stream_format); priv->psm_streams_cnt++; }