Commit eaf6234
Georgi Chorbadzhiyski
Prevent crash on exit.
Calling pthread_cancel( NULL ) results in the same crash as calling
pthread_join( NULL, ... )
This fixes the following:
Start obecli.
obecli> set input decklink
obecli> set input opts card-idx=0
obecli> probe input
Probing device: Decklink card 0. Timeout 20 seconds
Detected input streams:
Input-stream-id: 0 - Video: RAW 720x576i 25/1fps
Input-stream-id: 1 - Audio: PCM 16 channels 48kHz
Encoder outputs:
Output-stream-id: 0 - Input-stream-id: 0 - Video: AVC
Output-stream-id: 1 - Input-stream-id: 1 - Audio: RAW - SDI audio pair: 1
obecli> quit
closing obe
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6675be1 in pthread_cancel () from /lib64/libpthread.so.0
(gdb) bt
#0 0x00007ffff6675be1 in pthread_cancel () from /lib64/libpthread.so.0
ob-encoder#1 0x00000000004483d1 in obe_close (h=0x1417860) at obe.c:1233
ob-encoder#2 0x000000000044433f in stop_encode (command=command@entry=0x0, child=child@entry=0x0) at obecli.c:1353
ob-encoder#3 0x0000000000446d92 in main (argc=<optimized out>, argv=<optimized out>) at obecli.c:15341 parent 5f44c3a commit eaf6234
1 file changed
+10
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
559 | 559 | | |
560 | 560 | | |
561 | 561 | | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
562 | 569 | | |
563 | 570 | | |
564 | 571 | | |
| |||
665 | 672 | | |
666 | 673 | | |
667 | 674 | | |
668 | | - | |
| 675 | + | |
669 | 676 | | |
670 | 677 | | |
671 | 678 | | |
| |||
1230 | 1237 | | |
1231 | 1238 | | |
1232 | 1239 | | |
1233 | | - | |
| 1240 | + | |
1234 | 1241 | | |
1235 | 1242 | | |
1236 | 1243 | | |
| |||
1304 | 1311 | | |
1305 | 1312 | | |
1306 | 1313 | | |
1307 | | - | |
| 1314 | + | |
1308 | 1315 | | |
1309 | 1316 | | |
1310 | 1317 | | |
| |||
0 commit comments