libdvr: guarded_segment_size needs to be backward compatible [1/1]

PD#SWPL-100948

Problem:
S905C3 pvr record failed on Android T.
Irdeto MW didn't rely on dvr_wrapper but called dvr_record API directly.
The problem is that recently introduced segment guarding mechanism passes a
guarded_segment_size from dvr_wrapper to dvr_record when a record is opened.
As a result, in Irdeto's situation, guarded_segment_size is uninitialized.
A too small guarded_segment_size 0 can lead to recording failure.

Solution:
Handle guarded_segment_size value 0 situation. Treat it as an indicator
to disable segment guarding mechanism. With the guarding function off,
recording can work normally as before.

Verify:
Locally tested OK in RDK AH212 environment.

Signed-off-by: Wentao.MA <wentao.ma@amlogic.com>
Change-Id: I382d90091f105af8c1058d890044f2f3beb35d97
1 file changed
tree: f0abe9e0a1998516ba935d6bbb9dd36e2ca8721b
  1. include/
  2. src/
  3. test/
  4. Android.bp
  5. Android.mk
  6. Doxyfile
  7. LICENSE
  8. Makefile