mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-09 08:55:33 +00:00
avdemux: update the context we use to determine stream's caps
The discovered frame rate is only available on the AVStream itself. Updating the temporary context framerate before building caps from it seems like a pretty non-intrusive approach. Fixes #75 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-libav/-/merge_requests/74>
This commit is contained in:
parent
797c7e1bdf
commit
a5850215ba
1 changed files with 4 additions and 0 deletions
|
@ -951,6 +951,10 @@ gst_ffmpegdemux_get_stream (GstFFMpegDemux * demux, AVStream * avstream)
|
|||
case AVMEDIA_TYPE_VIDEO:
|
||||
templ = oclass->videosrctempl;
|
||||
num = demux->videopads++;
|
||||
/* These are not part of the codec parameters we built the
|
||||
* context from */
|
||||
ctx->framerate.num = avstream->r_frame_rate.num;
|
||||
ctx->framerate.den = avstream->r_frame_rate.den;
|
||||
break;
|
||||
case AVMEDIA_TYPE_AUDIO:
|
||||
templ = oclass->audiosrctempl;
|
||||
|
|
Loading…
Reference in a new issue