forked from mia/Aegisub
FFmpegSource 1.17
Originally committed to SVN as r2166.
This commit is contained in:
parent
c03fc5b447
commit
f72e6794a3
3 changed files with 15 additions and 1 deletions
|
@ -281,6 +281,14 @@ FFMatroskaSource::FFMatroskaSource(const char *ASource, int AVideoTrack, int AAu
|
||||||
|
|
||||||
if (!SaveTimecodesToFile(ATimecodes, mkv_TruncFloat(VideoTI->TimecodeScale), 1000000))
|
if (!SaveTimecodesToFile(ATimecodes, mkv_TruncFloat(VideoTI->TimecodeScale), 1000000))
|
||||||
Env->ThrowError("FFmpegSource: Failed to write timecodes");
|
Env->ThrowError("FFmpegSource: Failed to write timecodes");
|
||||||
|
|
||||||
|
// Set AR variables
|
||||||
|
int ffsar_num = VideoTI->AV.Video.DisplayWidth * VideoTI->AV.Video.PixelHeight;
|
||||||
|
int ffsar_den = VideoTI->AV.Video.DisplayHeight * VideoTI->AV.Video.PixelWidth;
|
||||||
|
Env->SetVar("FFSAR_NUM", ffsar_num);
|
||||||
|
Env->SetVar("FFSAR_DEN", ffsar_den);
|
||||||
|
Env->SetVar("FFSAR", ffsar_num / (double)ffsar_den);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -219,6 +219,11 @@ FFmpegSource::FFmpegSource(const char *ASource, int AVideoTrack, int AAudioTrack
|
||||||
unsigned int DTSDiff = (unsigned int)FFMAX(Frames[1].DTS - Frames[0].DTS, 1);
|
unsigned int DTSDiff = (unsigned int)FFMAX(Frames[1].DTS - Frames[0].DTS, 1);
|
||||||
VI.fps_denominator *= DTSDiff;
|
VI.fps_denominator *= DTSDiff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set AR variables
|
||||||
|
Env->SetVar("FFSAR_NUM", VideoCodecContext->sample_aspect_ratio.num);
|
||||||
|
Env->SetVar("FFSAR_DEN", VideoCodecContext->sample_aspect_ratio.den);
|
||||||
|
Env->SetVar("FFSAR", av_q2d(VideoCodecContext->sample_aspect_ratio));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -166,9 +166,10 @@ Note that --enable-w32threads is required for multithreaded decoding to work.
|
||||||
<h2>Changes</h2>
|
<h2>Changes</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li>1.17<ul>
|
<li>1.17<ul>
|
||||||
|
<li>Now sets the video SAR (if any) in the variables FFSAR, FFSAR_NUM and FFSAR_DEN when being invoked</li>
|
||||||
<li>Changed error handling slightly in video decoding (most errors are still ignored)</li>
|
<li>Changed error handling slightly in video decoding (most errors are still ignored)</li>
|
||||||
<li>Fixed a bug where the last frame(s) wouldn't be returned properly in h264 with b-frames+pyramid</li>
|
<li>Fixed a bug where the last frame(s) wouldn't be returned properly in h264 with b-frames+pyramid</li>
|
||||||
<li>Updated FFmpeg to rev X</li>
|
<li>Updated FFmpeg to rev 12685</li>
|
||||||
</ul></li>
|
</ul></li>
|
||||||
|
|
||||||
<li>1.16<ul>
|
<li>1.16<ul>
|
||||||
|
|
Loading…
Reference in a new issue