[FFmpeg-devel] [PATCH 2/3] avformat/libquvi: copy inner format context fields to outer format context
Gilles Chanteperdrix
gilles.chanteperdrix at xenomai.org
Wed Apr 8 19:16:37 CEST 2015
Signed-off-by: Gilles Chanteperdrix <gilles.chanteperdrix at xenomai.org>
---
libavformat/libquvi.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/libavformat/libquvi.c b/libavformat/libquvi.c
index e838b34..8673cb4 100644
--- a/libavformat/libquvi.c
+++ b/libavformat/libquvi.c
@@ -96,6 +96,10 @@ static int libquvi_read_header(AVFormatContext *s)
if (ret < 0)
goto err_quvi_cleanup;
+ ret = avformat_find_stream_info(qc->fmtctx, NULL);
+ if (ret < 0)
+ goto err_close_input;
+
rc = quvi_getprop(m, QUVIPROP_PAGETITLE, &pagetitle);
if (rc == QUVI_OK)
av_dict_set(&s->metadata, "title", pagetitle, 0);
@@ -110,6 +114,9 @@ static int libquvi_read_header(AVFormatContext *s)
avpriv_set_pts_info(st, ist->pts_wrap_bits, ist->time_base.num, ist->time_base.den);
avcodec_copy_context(st->codec, qc->fmtctx->streams[i]->codec);
}
+ s->duration = qc->fmtctx->duration;
+ s->start_time = qc->fmtctx->start_time;
+ s->bit_rate = qc->fmtctx->bit_rate;
return 0;
--
1.8.4
More information about the ffmpeg-devel
mailing list