mirror of https://git.ffmpeg.org/ffmpeg.git
avformat/mxfenc: Remove redundant DNXHD frame size checks
The actual frame_size is no longer used since commit 3d38e45eb85c7a2420cb48a9cd45625c28644b2e; and the check for "< 0" is equivalent to the CID being valid. But this is already checked by avpriv_dnxhd_get_interlaced() (and is actually already ensured by mxf_dnxhd_codec_uls containing this CID). Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
6a3df0dfa9
commit
b9a26b9d55
|
@ -2065,7 +2065,7 @@ static int mxf_parse_dnxhd_frame(AVFormatContext *s, AVStream *st, AVPacket *pkt
|
||||||
{
|
{
|
||||||
MXFContext *mxf = s->priv_data;
|
MXFContext *mxf = s->priv_data;
|
||||||
MXFStreamContext *sc = st->priv_data;
|
MXFStreamContext *sc = st->priv_data;
|
||||||
int i, cid, frame_size = 0;
|
int i, cid;
|
||||||
|
|
||||||
if (mxf->header_written)
|
if (mxf->header_written)
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -2093,12 +2093,6 @@ static int mxf_parse_dnxhd_frame(AVFormatContext *s, AVStream *st, AVPacket *pkt
|
||||||
if (!sc->component_depth)
|
if (!sc->component_depth)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if ((frame_size = avpriv_dnxhd_get_frame_size(cid)) == DNXHD_VARIABLE) {
|
|
||||||
frame_size = avpriv_dnxhd_get_hr_frame_size(cid, st->codecpar->width, st->codecpar->height);
|
|
||||||
}
|
|
||||||
if (frame_size < 0)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (cid >= 1270) { // RI raster
|
if (cid >= 1270) { // RI raster
|
||||||
av_reduce(&sc->aspect_ratio.num, &sc->aspect_ratio.den,
|
av_reduce(&sc->aspect_ratio.num, &sc->aspect_ratio.den,
|
||||||
st->codecpar->width, st->codecpar->height,
|
st->codecpar->width, st->codecpar->height,
|
||||||
|
|
Loading…
Reference in New Issue