@@ -2,6 +2,7 @@
* Copyright (c) 2010 Nicolas George
* Copyright (c) 2011 Stefano Sabatini
* Copyright (c) 2014 Andrey Utkin
+ * Copyright (c) 2018 Brian C. Wiles.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -517,6 +518,11 @@ int main(int argc, char **argv)
return 1;
}
+ av_register_all();
+ avcodec_register_all();
+ avfilter_register_all();
+ avformat_network_init();
+
if ((ret = open_input_file(argv[1])) < 0)
goto end;
if ((ret = open_output_file(argv[2])) < 0)
@@ -554,7 +560,9 @@ int main(int argc, char **argv)
}
if (got_frame) {
- frame->pts = frame->best_effort_timestamp;
+ frame->pts = av_rescale_q(frame->best_effort_timestamp,
+ stream_ctx[stream_index].dec_ctx->time_base,
+ stream_ctx[stream_index].enc_ctx->time_base);
ret = filter_encode_write_frame(frame, stream_index);
av_frame_free(&frame);
if (ret < 0)