The codec time_base is used as hint for some rate control algorithms and
usually the filter time base matches poorly for such usage.
---
Spun from the x265 patchset and the libmfx encoder patchset I'm working on.
avconv.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/avconv.c b/avconv.c
index 64e8321..98e3163 100644
--- a/avconv.c
+++ b/avconv.c
@@ -1735,7 +1735,10 @@ static int transcode_init(void)
codec->time_base = (AVRational){ 1, codec->sample_rate };
break;
case AVMEDIA_TYPE_VIDEO:
- codec->time_base = ost->filter->filter->inputs[0]->time_base;
+ if (icodec)
+ codec->time_base = icodec->time_base;
+ else
+ codec->time_base =
ost->filter->filter->inputs[0]->time_base;
codec->width = ost->filter->filter->inputs[0]->w;
codec->height = ost->filter->filter->inputs[0]->h;
--
1.8.5.1
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel