[libdvdcss-devel] [Git][videolan/libdvdcss][master] Don't close any handle if callback functions are used
Jean-Baptiste Kempf <[email protected]> Tue, 02 Aug 2016 19:09:26 +0200
| Newsgroups | gmane.comp.video.videolan.libdvdcss,gmane.comp.video.videolan.libdvdcss.devel |
|---|---|
| Message-ID | <[email protected]> |
--===============6091066835489525523== Content-Type: multipart/alternative; boundary="--==_mimepart_57a0d3c6507dd_3bb52e58204102536"; charset=UTF-8 Content-Transfer-Encoding: 7bit ----==_mimepart_57a0d3c6507dd_3bb52e58204102536 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Jean-Baptiste Kempf pushed to branch master at videolan / libdvdcss Commits: 5bec036c by Hannes Domani at 2016-08-02T19:08:47+02:00 Don't close any handle if callback functions are used Signed-off-by: Jean-Baptiste Kempf <[email protected]> - - - - - 1 changed file: - src/device.c Changes: ===================================== src/device.c ===================================== --- a/src/device.c +++ b/src/device.c @@ -406,6 +406,11 @@ int dvdcss_open_device ( dvdcss_t dvdcss ) int dvdcss_close_device ( dvdcss_t dvdcss ) { + if( dvdcss->p_stream ) + { + return 0; + } + #if defined( _WIN32 ) /* Free readv temporary buffer */ free( dvdcss->p_readv_buffer ); View it on GitLab: https://code.videolan.org/videolan/libdvdcss/commit/5bec036cfee3950d002f3c46c17bbd4e375d5bd6 ----==_mimepart_57a0d3c6507dd_3bb52e58204102536 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www= .w3.org/TR/REC-html40/loose.dtd"> <html lang=3D"en"> <head> <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type">= <title> GitLab </title> </head> <body> <style type=3D"text/css"> img { max-width: 100%; height: auto; } </style> <div class=3D"content"> <h3> Jean-Baptiste Kempf pushed to branch master at <a href=3D"https://code.videolan.org/videolan/libdvdcss">videolan / li= bdvdcss</a> </h3> <h4> Commits: </h4> <ul> <li> <strong><a href=3D"https://code.videolan.org/videolan/libdvdcss/commit/5b= ec036cfee3950d002f3c46c17bbd4e375d5bd6">5bec036c</a></strong> <div> <span>by Hannes Domani</span> <i>at 2016-08-02T19:08:47+02:00</i> </div> <pre class=3D"commit-message" style=3D"white-space: pre-wrap">Don't close= any handle if callback functions are used Signed-off-by: Jean-Baptiste Kempf <[email protected]> </pre> </li> </ul> <h4>1 changed file:</h4> <ul> <li class=3D"file-stats"> <a href=3D"#diff-0" style=3D"text-decoration: none"> src/device.c </a> </li> </ul> <h4>Changes:</h4> <li id=3D"diff-0"> <a href=3D"https://code.videolan.org/videolan/libdvdcss/commit/5bec036cfe= e3950d002f3c46c17bbd4e375d5bd6#diff-0"><strong>src/device.c</strong></a> <hr> <table class=3D"code white" style=3D"-premailer-cellpadding: 0; -premaile= r-cellspacing: 0; -premailer-width: 100%; background: #fff; border: none;= border-collapse: separate; color: #333; font-family: monospace; margin: = 0; padding: 0; width: 100%" bgcolor=3D"#fff" width=3D"100%" cellpadding=3D= "0" cellspacing=3D"0"> <tr class=3D"line_holder match" id=3D""> <td class=3D" diff-line-num old_line unfold js-unfold" data-linenumber=3D= "406" style=3D"background: #fafafa; border-color: #f0f0f0; border-right-w= idth: 1px; border-style: none solid none none; color: rgba(0,0,0,0.3); fo= nt-family: monospace; font-size: 13px; line-height: 1.5; margin: 0; max-w= idth: 50px; min-width: 35px; padding: 0 5px; text-align: right; width: 35= px" align=3D"right" bgcolor=3D"#fafafa"> ... </td> <td class=3D" diff-line-num new_line unfold js-unfold" data-linenumber=3D= "406" style=3D"background: #fafafa; border-color: #f0f0f0; border-right-w= idth: 1px; border-style: none solid none none; color: rgba(0,0,0,0.3); fo= nt-family: monospace; font-size: 13px; line-height: 1.5; margin: 0; max-w= idth: 50px; min-width: 35px; padding: 0 5px; text-align: right; width: 35= px" align=3D"right" bgcolor=3D"#fafafa"> ... </td> <td class=3D"line_content match" style=3D"background: #fafafa; border: no= ne; color: rgba(0,0,0,0.3); display: block; font-family: monospace; font-= size: 13px; line-height: 1.5; margin: 0; padding: 0 0.5em; white-space: p= re" bgcolor=3D"#fafafa">@@ -406,6 +406,11 @@ int dvdcss_open_device ( dvd= css_t dvdcss )</td> </tr> <tr class=3D"line_holder" id=3D"fad992cf7643687e16eff601c755c1b83e608ffc_= 406_406"> <td class=3D"diff-line-num old_line" data-linenumber=3D"406" style=3D"bac= kground: #fafafa; border-color: #f0f0f0; border-right-width: 1px; border-= style: none solid none none; color: rgba(0,0,0,0.3); font-family: monospa= ce; font-size: 13px; line-height: 1.5; margin: 0; max-width: 50px; min-wi= dth: 35px; padding: 0 5px; text-align: right; width: 35px" align=3D"right= " bgcolor=3D"#fafafa"> 406 </td> <td class=3D"diff-line-num new_line" data-linenumber=3D"406" style=3D"bac= kground: #fafafa; border-color: #f0f0f0; border-right-width: 1px; border-= style: none solid none none; color: rgba(0,0,0,0.3); font-family: monospa= ce; font-size: 13px; line-height: 1.5; margin: 0; max-width: 50px; min-wi= dth: 35px; padding: 0 5px; text-align: right; width: 35px" align=3D"right= " bgcolor=3D"#fafafa"> 406 </td> <td class=3D"line_content noteable_line" style=3D"background: #fff; borde= r: none; color: #333; display: block; font-family: monospace; font-size: = 13px; line-height: 1.5; margin: 0; padding: 0 0.5em; white-space: pre" bg= color=3D"#fff"> <span id=3D"LC406" class=3D"line"></span> </td> </tr> <tr class=3D"line_holder" id=3D"fad992cf7643687e16eff601c755c1b83e608ffc_= 407_407"> <td class=3D"diff-line-num old_line" data-linenumber=3D"407" style=3D"bac= kground: #fafafa; border-color: #f0f0f0; border-right-width: 1px; border-= style: none solid none none; color: rgba(0,0,0,0.3); font-family: monospa= ce; font-size: 13px; line-height: 1.5; margin: 0; max-width: 50px; min-wi= dth: 35px; padding: 0 5px; text-align: right; width: 35px" align=3D"right= " bgcolor=3D"#fafafa"> 407 </td> <td class=3D"diff-line-num new_line" data-linenumber=3D"407" style=3D"bac= kground: #fafafa; border-color: #f0f0f0; border-right-width: 1px; border-= style: none solid none none; color: rgba(0,0,0,0.3); font-family: monospa= ce; font-size: 13px; line-height: 1.5; margin: 0; max-width: 50px; min-wi= dth: 35px; padding: 0 5px; text-align: right; width: 35px" align=3D"right= " bgcolor=3D"#fafafa"> 407 </td> <td class=3D"line_content noteable_line" style=3D"background: #fff; borde= r: none; color: #333; display: block; font-family: monospace; font-size: = 13px; line-height: 1.5; margin: 0; padding: 0 0.5em; white-space: pre" bg= color=3D"#fff"> <span id=3D"LC407" class=3D"line"><span class=3D"kt" styl= e=3D"color: #458; font-weight: bold">int</span> <span class=3D"nf" style=3D= "color: #900; font-weight: bold">dvdcss_close_device</span> <span class=3D= "p">(</span> <span class=3D"n" style=3D"color: #333">dvdcss_t</span> <spa= n class=3D"n" style=3D"color: #333">dvdcss</span> <span class=3D"p">)</sp= an></span> </td> </tr> <tr class=3D"line_holder" id=3D"fad992cf7643687e16eff601c755c1b83e608ffc_= 408_408"> <td class=3D"diff-line-num old_line" data-linenumber=3D"408" style=3D"bac= kground: #fafafa; border-color: #f0f0f0; border-right-width: 1px; border-= style: none solid none none; color: rgba(0,0,0,0.3); font-family: monospa= ce; font-size: 13px; line-height: 1.5; margin: 0; max-width: 50px; min-wi= dth: 35px; padding: 0 5px; text-align: right; width: 35px" align=3D"right= " bgcolor=3D"#fafafa"> 408 </td> <td class=3D"diff-line-num new_line" data-linenumber=3D"408" style=3D"bac= kground: #fafafa; border-color: #f0f0f0; border-right-width: 1px; border-= style: none solid none none; color: rgba(0,0,0,0.3); font-family: monospa= ce; font-size: 13px; line-height: 1.5; margin: 0; max-width: 50px; min-wi= dth: 35px; padding: 0 5px; text-align: right; width: 35px" align=3D"right= " bgcolor=3D"#fafafa"> 408 </td> <td class=3D"line_content noteable_line" style=3D"background: #fff; borde= r: none; color: #333; display: block; font-family: monospace; font-size: = 13px; line-height: 1.5; margin: 0; padding: 0 0.5em; white-space: pre" bg= color=3D"#fff"> <span id=3D"LC408" class=3D"line"><span class=3D"p">{</sp= an></span> </td> </tr> <tr class=3D"line_holder new" id=3D"fad992cf7643687e16eff601c755c1b83e608= ffc_409_409"> <td class=3D"diff-line-num new old_line" data-linenumber=3D"409" style=3D= "background: #ddfbe6; border-color: #c7f0d2; border-right-width: 1px; bor= der-style: none solid none none; color: rgba(0,0,0,0.3); font-family: mon= ospace; font-size: 13px; line-height: 1.5; margin: 0; max-width: 50px; mi= n-width: 35px; padding: 0 5px; text-align: right; width: 35px" align=3D"r= ight" bgcolor=3D"#ddfbe6"> = </td> <td class=3D"diff-line-num new new_line" data-linenumber=3D"409" style=3D= "background: #ddfbe6; border-color: #c7f0d2; border-right-width: 1px; bor= der-style: none solid none none; color: rgba(0,0,0,0.3); font-family: mon= ospace; font-size: 13px; line-height: 1.5; margin: 0; max-width: 50px; mi= n-width: 35px; padding: 0 5px; text-align: right; width: 35px" align=3D"r= ight" bgcolor=3D"#ddfbe6"> 409 </td> <td class=3D"line_content new noteable_line" style=3D"background: #ecfdf0= ; border: none; color: #333; display: block; font-family: monospace; font= -size: 13px; line-height: 1.5; margin: 0; padding: 0 0.5em; white-space: = pre" bgcolor=3D"#ecfdf0"> <span id=3D"LC409" class=3D"line"> <span cla= ss=3D"k" style=3D"font-weight: bold">if</span><span class=3D"p">(</span> = <span class=3D"n" style=3D"color: #333">dvdcss</span><span class=3D"o" st= yle=3D"font-weight: bold">-></span><span class=3D"n" style=3D"color: #= 333">p_stream</span> <span class=3D"p">)</span></span> </td> </tr> <tr class=3D"line_holder new" id=3D"fad992cf7643687e16eff601c755c1b83e608= ffc_409_410"> <td class=3D"diff-line-num new old_line" data-linenumber=3D"409" style=3D= "background: #ddfbe6; border-color: #c7f0d2; border-right-width: 1px; bor= der-style: none solid none none; color: rgba(0,0,0,0.3); font-family: mon= ospace; font-size: 13px; line-height: 1.5; margin: 0; max-width: 50px; mi= n-width: 35px; padding: 0 5px; text-align: right; width: 35px" align=3D"r= ight" bgcolor=3D"#ddfbe6"> = </td> <td class=3D"diff-line-num new new_line" data-linenumber=3D"410" style=3D= "background: #ddfbe6; border-color: #c7f0d2; border-right-width: 1px; bor= der-style: none solid none none; color: rgba(0,0,0,0.3); font-family: mon= ospace; font-size: 13px; line-height: 1.5; margin: 0; max-width: 50px; mi= n-width: 35px; padding: 0 5px; text-align: right; width: 35px" align=3D"r= ight" bgcolor=3D"#ddfbe6"> 410 </td> <td class=3D"line_content new noteable_line" style=3D"background: #ecfdf0= ; border: none; color: #333; display: block; font-family: monospace; font= -size: 13px; line-height: 1.5; margin: 0; padding: 0 0.5em; white-space: = pre" bgcolor=3D"#ecfdf0"> <span id=3D"LC410" class=3D"line"> <span cla= ss=3D"p">{</span></span> </td> </tr> <tr class=3D"line_holder new" id=3D"fad992cf7643687e16eff601c755c1b83e608= ffc_409_411"> <td class=3D"diff-line-num new old_line" data-linenumber=3D"409" style=3D= "background: #ddfbe6; border-color: #c7f0d2; border-right-width: 1px; bor= der-style: none solid none none; color: rgba(0,0,0,0.3); font-family: mon= ospace; font-size: 13px; line-height: 1.5; margin: 0; max-width: 50px; mi= n-width: 35px; padding: 0 5px; text-align: right; width: 35px" align=3D"r= ight" bgcolor=3D"#ddfbe6"> = </td> <td class=3D"diff-line-num new new_line" data-linenumber=3D"411" style=3D= "background: #ddfbe6; border-color: #c7f0d2; border-right-width: 1px; bor= der-style: none solid none none; color: rgba(0,0,0,0.3); font-family: mon= ospace; font-size: 13px; line-height: 1.5; margin: 0; max-width: 50px; mi= n-width: 35px; padding: 0 5px; text-align: right; width: 35px" align=3D"r= ight" bgcolor=3D"#ddfbe6"> 411 </td> <td class=3D"line_content new noteable_line" style=3D"background: #ecfdf0= ; border: none; color: #333; display: block; font-family: monospace; font= -size: 13px; line-height: 1.5; margin: 0; padding: 0 0.5em; white-space: = pre" bgcolor=3D"#ecfdf0"> <span id=3D"LC411" class=3D"line"> <span= class=3D"k" style=3D"font-weight: bold">return</span> <span class=3D"mi"= style=3D"color: #099">0</span><span class=3D"p">;</span></span> </td> </tr> <tr class=3D"line_holder new" id=3D"fad992cf7643687e16eff601c755c1b83e608= ffc_409_412"> <td class=3D"diff-line-num new old_line" data-linenumber=3D"409" style=3D= "background: #ddfbe6; border-color: #c7f0d2; border-right-width: 1px; bor= der-style: none solid none none; color: rgba(0,0,0,0.3); font-family: mon= ospace; font-size: 13px; line-height: 1.5; margin: 0; max-width: 50px; mi= n-width: 35px; padding: 0 5px; text-align: right; width: 35px" align=3D"r= ight" bgcolor=3D"#ddfbe6"> = </td> <td class=3D"diff-line-num new new_line" data-linenumber=3D"412" style=3D= "background: #ddfbe6; border-color: #c7f0d2; border-right-width: 1px; bor= der-style: none solid none none; color: rgba(0,0,0,0.3); font-family: mon= ospace; font-size: 13px; line-height: 1.5; margin: 0; max-width: 50px; mi= n-width: 35px; padding: 0 5px; text-align: right; width: 35px" align=3D"r= ight" bgcolor=3D"#ddfbe6"> 412 </td> <td class=3D"line_content new noteable_line" style=3D"background: #ecfdf0= ; border: none; color: #333; display: block; font-family: monospace; font= -size: 13px; line-height: 1.5; margin: 0; padding: 0 0.5em; white-space: = pre" bgcolor=3D"#ecfdf0"> <span id=3D"LC412" class=3D"line"> <span cla= ss=3D"p">}</span></span> </td> </tr> <tr class=3D"line_holder new" id=3D"fad992cf7643687e16eff601c755c1b83e608= ffc_409_413"> <td class=3D"diff-line-num new old_line" data-linenumber=3D"409" style=3D= "background: #ddfbe6; border-color: #c7f0d2; border-right-width: 1px; bor= der-style: none solid none none; color: rgba(0,0,0,0.3); font-family: mon= ospace; font-size: 13px; line-height: 1.5; margin: 0; max-width: 50px; mi= n-width: 35px; padding: 0 5px; text-align: right; width: 35px" align=3D"r= ight" bgcolor=3D"#ddfbe6"> = </td> <td class=3D"diff-line-num new new_line" data-linenumber=3D"413" style=3D= "background: #ddfbe6; border-color: #c7f0d2; border-right-width: 1px; bor= der-style: none solid none none; color: rgba(0,0,0,0.3); font-family: mon= ospace; font-size: 13px; line-height: 1.5; margin: 0; max-width: 50px; mi= n-width: 35px; padding: 0 5px; text-align: right; width: 35px" align=3D"r= ight" bgcolor=3D"#ddfbe6"> 413 </td> <td class=3D"line_content new noteable_line" style=3D"background: #ecfdf0= ; border: none; color: #333; display: block; font-family: monospace; font= -size: 13px; line-height: 1.5; margin: 0; padding: 0 0.5em; white-space: = pre" bgcolor=3D"#ecfdf0"> <span id=3D"LC413" class=3D"line"></span> </td> </tr> <tr class=3D"line_holder" id=3D"fad992cf7643687e16eff601c755c1b83e608ffc_= 409_414"> <td class=3D"diff-line-num old_line" data-linenumber=3D"409" style=3D"bac= kground: #fafafa; border-color: #f0f0f0; border-right-width: 1px; border-= style: none solid none none; color: rgba(0,0,0,0.3); font-family: monospa= ce; font-size: 13px; line-height: 1.5; margin: 0; max-width: 50px; min-wi= dth: 35px; padding: 0 5px; text-align: right; width: 35px" align=3D"right= " bgcolor=3D"#fafafa"> 409 </td> <td class=3D"diff-line-num new_line" data-linenumber=3D"414" style=3D"bac= kground: #fafafa; border-color: #f0f0f0; border-right-width: 1px; border-= style: none solid none none; color: rgba(0,0,0,0.3); font-family: monospa= ce; font-size: 13px; line-height: 1.5; margin: 0; max-width: 50px; min-wi= dth: 35px; padding: 0 5px; text-align: right; width: 35px" align=3D"right= " bgcolor=3D"#fafafa"> 414 </td> <td class=3D"line_content noteable_line" style=3D"background: #fff; borde= r: none; color: #333; display: block; font-family: monospace; font-size: = 13px; line-height: 1.5; margin: 0; padding: 0 0.5em; white-space: pre" bg= color=3D"#fff"> <span id=3D"LC414" class=3D"line"><span class=3D"cp" styl= e=3D"color: #999; font-weight: bold">#if defined( _WIN32 )</span></span> </td> </tr> <tr class=3D"line_holder" id=3D"fad992cf7643687e16eff601c755c1b83e608ffc_= 410_415"> <td class=3D"diff-line-num old_line" data-linenumber=3D"410" style=3D"bac= kground: #fafafa; border-color: #f0f0f0; border-right-width: 1px; border-= style: none solid none none; color: rgba(0,0,0,0.3); font-family: monospa= ce; font-size: 13px; line-height: 1.5; margin: 0; max-width: 50px; min-wi= dth: 35px; padding: 0 5px; text-align: right; width: 35px" align=3D"right= " bgcolor=3D"#fafafa"> 410 </td> <td class=3D"diff-line-num new_line" data-linenumber=3D"415" style=3D"bac= kground: #fafafa; border-color: #f0f0f0; border-right-width: 1px; border-= style: none solid none none; color: rgba(0,0,0,0.3); font-family: monospa= ce; font-size: 13px; line-height: 1.5; margin: 0; max-width: 50px; min-wi= dth: 35px; padding: 0 5px; text-align: right; width: 35px" align=3D"right= " bgcolor=3D"#fafafa"> 415 </td> <td class=3D"line_content noteable_line" style=3D"background: #fff; borde= r: none; color: #333; display: block; font-family: monospace; font-size: = 13px; line-height: 1.5; margin: 0; padding: 0 0.5em; white-space: pre" bg= color=3D"#fff"> <span id=3D"LC415" class=3D"line"> <span class=3D"cm" = style=3D"color: #998; font-style: italic">/* Free readv temporary buffer = */</span></span> </td> </tr> <tr class=3D"line_holder" id=3D"fad992cf7643687e16eff601c755c1b83e608ffc_= 411_416"> <td class=3D"diff-line-num old_line" data-linenumber=3D"411" style=3D"bac= kground: #fafafa; border-color: #f0f0f0; border-right-width: 1px; border-= style: none solid none none; color: rgba(0,0,0,0.3); font-family: monospa= ce; font-size: 13px; line-height: 1.5; margin: 0; max-width: 50px; min-wi= dth: 35px; padding: 0 5px; text-align: right; width: 35px" align=3D"right= " bgcolor=3D"#fafafa"> 411 </td> <td class=3D"diff-line-num new_line" data-linenumber=3D"416" style=3D"bac= kground: #fafafa; border-color: #f0f0f0; border-right-width: 1px; border-= style: none solid none none; color: rgba(0,0,0,0.3); font-family: monospa= ce; font-size: 13px; line-height: 1.5; margin: 0; max-width: 50px; min-wi= dth: 35px; padding: 0 5px; text-align: right; width: 35px" align=3D"right= " bgcolor=3D"#fafafa"> 416 </td> <td class=3D"line_content noteable_line" style=3D"background: #fff; borde= r: none; color: #333; display: block; font-family: monospace; font-size: = 13px; line-height: 1.5; margin: 0; padding: 0 0.5em; white-space: pre" bg= color=3D"#fff"> <span id=3D"LC416" class=3D"line"> <span class=3D"n" s= tyle=3D"color: #333">free</span><span class=3D"p">(</span> <span class=3D= "n" style=3D"color: #333">dvdcss</span><span class=3D"o" style=3D"font-we= ight: bold">-></span><span class=3D"n" style=3D"color: #333">p_readv_b= uffer</span> <span class=3D"p">);</span></span> </td> </tr> </table> <br> </li> </div> <div class=3D"footer" style=3D"margin-top: 10px"> <p style=3D"color: #777; font-size: small"> =E2=80=94 <br> <a href=3D"https://code.videolan.org/videolan/libdvdcss/commit/5bec036cfe= e3950d002f3c46c17bbd4e375d5bd6">View it on GitLab</a>. <br> You're receiving this email because of your account on code.videolan.org.= If you'd like to receive fewer emails, you can adjust your notification settings. <script type=3D"application/ld+json">{"@context":"http://schema.org","@ty= pe":"EmailMessage","action":{"@type":"ViewAction","name":"View Commit","u= rl":"https://code.videolan.org/videolan/libdvdcss/commit/5bec036cfee3950d= 002f3c46c17bbd4e375d5bd6"}}</script> </p> </div> </body> </html> ----==_mimepart_57a0d3c6507dd_3bb52e58204102536-- --===============6091066835489525523== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KbGliZHZkY3Nz LWRldmVsIG1haWxpbmcgbGlzdApsaWJkdmRjc3MtZGV2ZWxAdmlkZW9sYW4ub3JnCmh0dHBzOi8v bWFpbG1hbi52aWRlb2xhbi5vcmcvbGlzdGluZm8vbGliZHZkY3NzLWRldmVsCg== --===============6091066835489525523==--