fftools/ffmpeg: pass subtitle decoder dimensions to sub2video
Restores behavior from before 20cacfe4936a8d5b643421b5ca93bb098f6b76dd. Eventually this should be handled similarly to audio/video - with a filtergraph reset or a manual scaler.
This commit is contained in:
parent
88f80977eb
commit
1617d1a752
@ -509,6 +509,9 @@ static int transcode_subtitles(InputStream *ist, const AVPacket *pkt,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
frame->width = ist->dec_ctx->width;
|
||||||
|
frame->height = ist->dec_ctx->height;
|
||||||
|
|
||||||
ret = tq_send(d->queue_out, 0, frame);
|
ret = tq_send(d->queue_out, 0, frame);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
av_frame_unref(frame);
|
av_frame_unref(frame);
|
||||||
|
@ -1791,6 +1791,9 @@ int ifilter_sub2video(InputFilter *ifilter, const AVFrame *frame)
|
|||||||
return av_buffersrc_add_frame(ifp->filter, NULL);
|
return av_buffersrc_add_frame(ifp->filter, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ifp->width = frame->width ? frame->width : ifp->width;
|
||||||
|
ifp->height = frame->height ? frame->height : ifp->height;
|
||||||
|
|
||||||
sub2video_update(ifp, INT64_MIN, (const AVSubtitle*)frame->buf[0]->data);
|
sub2video_update(ifp, INT64_MIN, (const AVSubtitle*)frame->buf[0]->data);
|
||||||
} else if (frame) {
|
} else if (frame) {
|
||||||
AVFrame *tmp = av_frame_clone(frame);
|
AVFrame *tmp = av_frame_clone(frame);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user