History

better "disabled sync" fix

Sigrid Solveig Haflínudóttir committed 5 years ago

Commit adf32271 parent 8aaeeb13 files · +5 −4Browse files

Unified · Split

3 files
  1. ivf.c +0 −2
  2. main.c +3 −2
  3. util.h +2 −0
ivf.c+0−2
@@ -4,8 +4,6 @@ · 3 unmodified lines
4#include "ivf.h"4#include "ivf.h"
5#include "util.h"5#include "util.h"
6 6
7#define Zns₀ (~0ULL)
8
9static int7static int
10Bu16le(Biobuf *b, u16int *o)8Bu16le(Biobuf *b, u16int *o)
11{9{
main.c+3−2
@@ -31,12 +31,13 @@ audio(void *aux) · 30 unmodified lines
31 31
32 a = aux;32 a = aux;
33 memset(&af, 0, sizeof(af));33 memset(&af, 0, sizeof(af));
34 af.ns₀ = Zns₀;
34 for(;;){35 for(;;){
35 if(adtsread(a, &af) != 0)36 if(adtsread(a, &af) != 0)
36 goto err;37 goto err;
37 if(af.sz == 0) /* eof */38 if(af.sz == 0) /* eof */
38 break;39 break;
39 ms = ((af.ns₀ ? af.ns₀-ns₀ : 0) + af.ns)/1000000ULL;40 ms = ((af.ns₀ != Zns₀ ? af.ns₀-ns₀ : 0) + af.ns)/1000000ULL;
40 41
41 if(rtmpdata(r, sid, ms, Taudio, af.buf, af.sz) != 0){42 if(rtmpdata(r, sid, ms, Taudio, af.buf, af.sz) != 0){
42err:43err:
@@ -102,7 +103,7 @@ threadmain(int argc, char **argv) · 59 unmodified lines
102 sysfatal("%r");103 sysfatal("%r");
103 if(vf.sz == 0)104 if(vf.sz == 0)
104 break;105 break;
105 ms = ((ivf.ns₀ ? ivf.ns₀-ns₀ : 0) + vf.ns)/1000000ULL;106 ms = ((ivf.ns₀ != Zns₀ ? ivf.ns₀-ns₀ : 0) + vf.ns)/1000000ULL;
106 if(rtmpdata(r, sid, ms, Tvideo, vf.buf, vf.sz) != 0){107 if(rtmpdata(r, sid, ms, Tvideo, vf.buf, vf.sz) != 0){
107 fprint(2, "%r\n");108 fprint(2, "%r\n");
108 break;109 break;
util.h+2−0
@@ -1,3 +1,5 @@
1#define Zns₀ (~0ULL)
2
1void *emalloc(usize sz);3void *emalloc(usize sz);
2void *ecalloc(ulong nel, usize elsz);4void *ecalloc(ulong nel, usize elsz);
3void *erealloc(void *p, usize sz);5void *erealloc(void *p, usize sz);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t