[mythtv-commits] Ticket #13440: Uninitialized variable in HLSRingBuffer::ParseM3U8

MythTV noreply at mythtv.org
Thu Nov 21 16:38:50 UTC 2019


#13440: Uninitialized variable in HLSRingBuffer::ParseM3U8
-------------------------------------+---------------------------
 Reporter:  David Hampton            |          Owner:  cpinkham
     Type:  Bug Report - General     |         Status:  new
 Priority:  minor                    |      Milestone:  30.1
Component:  MythTV - HTTP Streaming  |        Version:  v30-fixes
 Severity:  medium                   |     Resolution:
 Keywords:                           |  Ticket locked:  0
-------------------------------------+---------------------------

Comment (by thebitpit):

 Please close this ticket as this is not a bug.

 This is the code in question:

 {{{
  else if (line.startsWith(QLatin1String("#EXT-X-VERSION")))
             {
                 int version2;
                 if (!M3U::ParseVersion(line, StreamURL(), version2))
                     return false;
                 hls->SetVersion(version2);
             }

 }}}

 It does not need an initial value for version2 since version2 is passed by
 reference (see header file mythtv/mythtv/libs/libmythtv/HLS/m3u.h ):

 {{{
 bool ParseVersion(const QString& line, const QString& loc, int& version);
 }}}

 Variable version 2 is always set by {{{ParseVersion}}} unless it returns
 false, then {{{SetVersion}}} is not called.

 This is not a bug.

-- 
Ticket URL: <https://code.mythtv.org/trac/ticket/13440#comment:1>
MythTV <http://www.mythtv.org>
MythTV Media Center


More information about the mythtv-commits mailing list