comparison libmpdemux/muxer_mpeg.c @ 24909:55c96e871198

10l, priv->use_psm can be 1 only if the format is genmpeg2
author nicodvb
date Fri, 02 Nov 2007 19:52:22 +0000
parents c59a27887e5e
children 74ae00838094
comparison
equal deleted inserted replaced
24908:c59a27887e5e 24909:55c96e871198
2226 { 2226 {
2227 muxer_headers_t *spriv = stream->priv; 2227 muxer_headers_t *spriv = stream->priv;
2228 muxer_t *muxer = stream->muxer; 2228 muxer_t *muxer = stream->muxer;
2229 muxer_priv_t *priv = muxer->priv; 2229 muxer_priv_t *priv = muxer->priv;
2230 uint32_t stream_format; 2230 uint32_t stream_format;
2231 int needs_psm = 0;
2231 2232
2232 if(stream->type == MUXER_TYPE_AUDIO) 2233 if(stream->type == MUXER_TYPE_AUDIO)
2233 { 2234 {
2234 stream_format = stream->wf->wFormatTag; 2235 stream_format = stream->wf->wFormatTag;
2235 spriv->is_ready = 1; 2236 spriv->is_ready = 1;
2245 spriv->id = 0xbd; 2246 spriv->id = 0xbd;
2246 if(!conf_abuf_size) 2247 if(!conf_abuf_size)
2247 spriv->max_buffer_size = 16*1024; 2248 spriv->max_buffer_size = 16*1024;
2248 } 2249 }
2249 else if(stream->wf->wFormatTag == AUDIO_AAC1 || stream->wf->wFormatTag == AUDIO_AAC2) 2250 else if(stream->wf->wFormatTag == AUDIO_AAC1 || stream->wf->wFormatTag == AUDIO_AAC2)
2250 priv->use_psm = 1; 2251 needs_psm = 1;
2251 else if(stream->wf->wFormatTag == AUDIO_MP2 || stream->wf->wFormatTag == AUDIO_MP3) 2252 else if(stream->wf->wFormatTag == AUDIO_MP2 || stream->wf->wFormatTag == AUDIO_MP3)
2252 spriv->is_ready = 0; 2253 spriv->is_ready = 0;
2253 } 2254 }
2254 else //video 2255 else //video
2255 { 2256 {
2272 spriv->is_ready = 0; 2273 spriv->is_ready = 0;
2273 else 2274 else
2274 spriv->is_ready = 1; 2275 spriv->is_ready = 1;
2275 2276
2276 if(!is_mpeg1(stream_format) && !is_mpeg2(stream_format)) 2277 if(!is_mpeg1(stream_format) && !is_mpeg2(stream_format))
2277 priv->use_psm = 1; 2278 needs_psm = 1;
2278 } 2279 }
2279 2280
2280 if(priv->is_genmpeg2 && priv->use_psm) 2281 if(priv->is_genmpeg2 && needs_psm)
2281 { 2282 {
2283 priv->use_psm = 1;
2282 add_to_psm(priv, spriv->id, stream_format); 2284 add_to_psm(priv, spriv->id, stream_format);
2283 priv->psm_streams_cnt++; 2285 priv->psm_streams_cnt++;
2284 } 2286 }
2285 } 2287 }
2286 2288