diff libmpdemux/muxer_lavf.c @ 19073:8b52dad54b1d

Remove #if LIBAVCODEC_BUILD >= XXX and #if LIBAVFORMAT_BUILD >= XXX jungle. It served no apparent purpose anymore.
author diego
date Thu, 13 Jul 2006 23:02:03 +0000
parents ebf5efd78cb6
children d4d72e5eea07
line wrap: on
line diff
--- a/libmpdemux/muxer_lavf.c	Thu Jul 13 22:56:02 2006 +0000
+++ b/libmpdemux/muxer_lavf.c	Thu Jul 13 23:02:03 2006 +0000
@@ -158,11 +158,7 @@
 	}
 	spriv->avstream->stream_copy = 1;
 	
-#if LIBAVFORMAT_BUILD >= 4629
 	ctx = spriv->avstream->codec;
-#else
-	ctx = &(spriv->avstream->codec);
-#endif
 	ctx->codec_id = muxer->avih.dwStreams;
 	switch(type) 
 	{
@@ -187,12 +183,8 @@
 	muxer_stream_priv_t *spriv = (muxer_stream_priv_t *) stream->priv;
 	AVCodecContext *ctx;
 	
-#if LIBAVFORMAT_BUILD >= 4629
 	ctx = spriv->avstream->codec;
-#else
-	ctx = &(spriv->avstream->codec);
-#endif
-	
+
         if(stream->wf && stream->wf->nAvgBytesPerSec)
             ctx->bit_rate = stream->wf->nAvgBytesPerSec * 8;
         ctx->rc_buffer_size= stream->vbv_size;
@@ -236,13 +228,8 @@
 		ctx->width = stream->bih->biWidth;
 		ctx->height = stream->bih->biHeight;
 		ctx->bit_rate = 800000;
-#if (LIBAVFORMAT_BUILD >= 4624)
 		ctx->time_base.den = stream->h.dwRate;
 		ctx->time_base.num = stream->h.dwScale;
-#else
-		ctx->frame_rate = stream->h.dwRate;
-		ctx->frame_rate_base = stream->h.dwScale;
-#endif
 		if(stream->bih+1 && (stream->bih->biSize > sizeof(BITMAPINFOHEADER)))
 		{
 			ctx->extradata = av_malloc(stream->bih->biSize - sizeof(BITMAPINFOHEADER));
@@ -279,11 +266,7 @@
 	
 	
 	//pkt.pts = AV_NOPTS_VALUE; 
-#if LIBAVFORMAT_BUILD >= 4624
 	pkt.pts = (stream->timer / av_q2d(priv->oc->streams[pkt.stream_index]->time_base) + 0.5);
-#else
-	pkt.pts = AV_TIME_BASE * stream->timer;
-#endif
 //fprintf(stderr, "%Ld %Ld id:%d tb:%f %f\n", pkt.dts, pkt.pts, pkt.stream_index, av_q2d(priv->oc->streams[pkt.stream_index]->time_base), stream->timer);
 	
 	if(av_interleaved_write_frame(priv->oc, &pkt) != 0) //av_write_frame(priv->oc, &pkt)