misc: set frame time_base when decoding

To properly get the time_base and framerate in the plugins,
we need to set the frame properties when decoding.

GitLab: https://git.jami.net/savoirfairelinux/jami-plugins/-/issues/23

Change-Id: I69a2235c46b13a15414c4d01821cc1eba5b73987
This commit is contained in:
Aline Gondim Santos
2022-10-05 10:19:27 -03:00
parent 7b6d544630
commit b7dd425660

View File

@ -644,6 +644,7 @@ MediaDecoder::decode(AVPacket& packet)
#endif
auto frame = f->pointer();
ret = avcodec_receive_frame(decoderCtx_, frame);
frame->time_base = decoderCtx_->time_base;
if (resolutionChangedCallback_) {
if (decoderCtx_->width != width_ or decoderCtx_->height != height_) {
JAMI_DBG("Resolution changed from %dx%d to %dx%d",