Simplify fx_opj_stream_create_memory_stream().

There is only 1 caller and 2 of the parameters always have the same
value.

Change-Id: I1f226d608ce0bfd89118fb3b65532fb3c69ed887
Reviewed-on: https://pdfium-review.googlesource.com/c/45730
Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/core/fxcodec/codec/ccodec_jpxmodule.cpp b/core/fxcodec/codec/ccodec_jpxmodule.cpp
index fb197de..7cdd30c 100644
--- a/core/fxcodec/codec/ccodec_jpxmodule.cpp
+++ b/core/fxcodec/codec/ccodec_jpxmodule.cpp
@@ -25,13 +25,12 @@
 
 void fx_ignore_callback(const char* msg, void* client_data) {}
 
-opj_stream_t* fx_opj_stream_create_memory_stream(DecodeData* data,
-                                                 OPJ_SIZE_T p_size,
-                                                 OPJ_BOOL p_is_read_stream) {
+opj_stream_t* fx_opj_stream_create_memory_stream(DecodeData* data) {
   if (!data || !data->src_data || data->src_size <= 0)
     return nullptr;
 
-  opj_stream_t* stream = opj_stream_create(p_size, p_is_read_stream);
+  opj_stream_t* stream = opj_stream_create(OPJ_J2K_STREAM_CHUNK_SIZE,
+                                           /*p_is_input=*/OPJ_TRUE);
   if (!stream)
     return nullptr;
 
@@ -484,9 +483,7 @@
   m_SrcData = src_data;
   m_DecodeData =
       pdfium::MakeUnique<DecodeData>(src_data.data(), src_data.size());
-  m_Stream = fx_opj_stream_create_memory_stream(
-      m_DecodeData.get(), static_cast<unsigned int>(OPJ_J2K_STREAM_CHUNK_SIZE),
-      1);
+  m_Stream = fx_opj_stream_create_memory_stream(m_DecodeData.get());
   if (!m_Stream)
     return false;