Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit a84a5a30 authored by Gopalakrishnan Nallasamy's avatar Gopalakrishnan Nallasamy
Browse files

rate_control.cpp:removed redundant NULL checks

First argument (VideoEncData *) of the functions RC_UpdateBuffer, targetBitCalculation and
calculateQuantizer_Multipass in rate_control.cpp file of libstagefright_m4vh263enc SoftMPEG4Encoder
was checked against NULL after it was already refered successfully.
Hence, those redundant checks are removed now.  Above mentioned functions' VideoEncData pointer
argument can't be null as those functions are called only after successful initialisation in
PVInitVideoEncoder by SoftMPEG4Encoder::initEncoder.
rate_control.cpp is compiled as a part of static library : libstagefright_m4vh263enc.
This library can only be used using SoftMPEG4Encoder wrapper which makes sure VideoEncData * was
allocated required memory.

Bug: 112154365

Test: Encoded a YUV file using test case libstagefright_m4vh263enc_test and generated a bit stream
      output file without any error.

Change-Id: Id7f08cc57350bc70729a82afebbc79ba83dac72d
parent 771ffb62
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment