Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 75924 Details for
Bug 107818
stepmania-3.9_rc3 fails to compile, ffmpeg errors.
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for ffmpeg related code
ffmpegfix.patch (text/plain), 4.62 KB, created by
Ted Schundler
on 2006-01-01 10:26:01 UTC
(
hide
)
Description:
Patch for ffmpeg related code
Filename:
MIME Type:
Creator:
Ted Schundler
Created:
2006-01-01 10:26:01 UTC
Size:
4.62 KB
patch
obsolete
>--- ../StepMania-3.9-src/src/arch/MovieTexture/MovieTexture_FFMpeg.cpp 2005-10-16 19:25:55.000000000 -0700 >+++ src/arch/MovieTexture/MovieTexture_FFMpeg.cpp 2006-01-01 11:01:28.000000000 -0700 >@@ -306,9 +306,9 @@ > { > if ( GetNextTimestamp ) > { >- if (pkt.dts != int64_t(AV_NOPTS_VALUE)) >- pts = (float)pkt.dts / AV_TIME_BASE; >- else >+ // if (pkt.pts != int64_t(AV_NOPTS_VALUE)) >+ // pts = (float)pkt.pts / AV_TIME_BASE; >+ // else > pts = -1; > GetNextTimestamp = false; > } >@@ -326,7 +326,7 @@ > * to give it a buffer to read from since it tries to read anyway. */ > static uint8_t dummy[FF_INPUT_BUFFER_PADDING_SIZE] = { 0 }; > int len = avcodec::avcodec_decode_video( >- &m_stream->codec, >+ m_stream->codec, > &frame, &got_frame, > pkt.size? pkt.data:dummy, pkt.size ); > CHECKPOINT; >@@ -360,7 +360,8 @@ > } > > /* Length of this frame: */ >- LastFrameDelay = (float)m_stream->codec.frame_rate_base / m_stream->codec.frame_rate; >+ //LastFrameDelay = (float)m_stream->codec->frame_rate_base / m_stream->codec->frame_rate; >+ LastFrameDelay = (float)m_stream->r_frame_rate.den / m_stream->r_frame_rate.num; > LastFrameDelay += frame.repeat_pict * (LastFrameDelay * 0.5f); > > return 1; >@@ -378,8 +379,8 @@ > pict.linesize[0] = m_img->pitch; > > avcodec::img_convert(&pict, AVPixelFormats[m_AVTexfmt].pf, >- (avcodec::AVPicture *) &decoder->frame, decoder->m_stream->codec.pix_fmt, >- decoder->m_stream->codec.width, decoder->m_stream->codec.height); >+ (avcodec::AVPicture *) &decoder->frame, decoder->m_stream->codec->pix_fmt, >+ decoder->m_stream->codec->width, decoder->m_stream->codec->height); > > m_ImageWaiting = FRAME_WAITING; > } >@@ -389,7 +390,7 @@ > for( int stream = 0; stream < m_fctx->nb_streams; ++stream ) > { > avcodec::AVStream *enc = m_fctx->streams[stream]; >- if( enc->codec.codec_type == avcodec::CODEC_TYPE_VIDEO ) >+ if( enc->codec->codec_type == avcodec::CODEC_TYPE_VIDEO ) > return enc; > } > return NULL; >@@ -418,8 +419,8 @@ > m_bThreaded = PREFSMAN->m_bThreadedMovieDecode; > > CreateDecoder(); >- LOG->Trace("Bitrate: %i", decoder->m_stream->codec.bit_rate ); >- LOG->Trace("Codec pixel format: %s", avcodec::avcodec_get_pix_fmt_name(decoder->m_stream->codec.pix_fmt) ); >+ LOG->Trace("Bitrate: %i", decoder->m_stream->codec->bit_rate ); >+ LOG->Trace("Codec pixel format: %s", avcodec::avcodec_get_pix_fmt_name(decoder->m_stream->codec->pix_fmt) ); > > /* Decode one frame, to guarantee that the texture is drawn when this function returns. */ > int ret = decoder->GetFrame(); >@@ -573,15 +574,15 @@ > if ( stream == NULL ) > RageException::Throw( "AVCodec (%s): Couldn't find any video streams", GetID().filename.c_str() ); > >- if( stream->codec.codec_id == avcodec::CODEC_ID_NONE ) >- RageException::ThrowNonfatal( "AVCodec (%s): Unsupported codec %08x", GetID().filename.c_str(), stream->codec.codec_tag ); >+ if( stream->codec->codec_id == avcodec::CODEC_ID_NONE ) >+ RageException::ThrowNonfatal( "AVCodec (%s): Unsupported codec %08x", GetID().filename.c_str(), stream->codec->codec_tag ); > >- avcodec::AVCodec *codec = avcodec::avcodec_find_decoder( stream->codec.codec_id ); >+ avcodec::AVCodec *codec = avcodec::avcodec_find_decoder( stream->codec->codec_id ); > if( codec == NULL ) >- RageException::Throw( "AVCodec (%s): Couldn't find decoder %i", GetID().filename.c_str(), stream->codec.codec_id ); >+ RageException::Throw( "AVCodec (%s): Couldn't find decoder %i", GetID().filename.c_str(), stream->codec->codec_id ); > > LOG->Trace("Opening codec %s", codec->name ); >- ret = avcodec::avcodec_open( &stream->codec, codec ); >+ ret = avcodec::avcodec_open( stream->codec, codec ); > if ( ret < 0 ) > RageException::Throw( averr_ssprintf(ret, "AVCodec (%s): Couldn't open codec \"%s\"", GetID().filename.c_str(), codec->name) ); > >@@ -596,7 +597,7 @@ > { > if( decoder->m_stream ) > { >- avcodec::avcodec_close( &decoder->m_stream->codec ); >+ avcodec::avcodec_close( decoder->m_stream->codec ); > decoder->m_stream = NULL; > } > >@@ -637,8 +638,8 @@ > /* Cap the max texture size to the hardware max. */ > actualID.iMaxSize = min( actualID.iMaxSize, DISPLAY->GetMaxTextureSize() ); > >- m_iSourceWidth = decoder->m_stream->codec.width; >- m_iSourceHeight = decoder->m_stream->codec.height; >+ m_iSourceWidth = decoder->m_stream->codec->width; >+ m_iSourceHeight = decoder->m_stream->codec->height; > > /* image size cannot exceed max size */ > m_iImageWidth = min( m_iSourceWidth, actualID.iMaxSize ); >@@ -818,7 +819,7 @@ > m_FrameSkipMode = true; > } > >- if( m_FrameSkipMode && decoder->m_stream->codec.frame_number % 2 ) >+ if( m_FrameSkipMode && (decoder->m_stream->codec)->frame_number % 2 ) > return -1; /* skip */ > > return 0;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 107818
: 75924