ref: 015be736a83adbb73a140a536d70f97625dc5053
parent: 08c77342b9170ca3f1376b493b9fbb086e2fec97
author: Sigrid Solveig Haflínudóttir <[email protected]>
date: Fri Feb 5 11:56:39 EST 2021
declare Theora format
--- a/common.h
+++ b/common.h
@@ -14,6 +14,7 @@
FmtVorbis = 0x766f7262u,
FmtSrt = 0x00737274u, /* srt subtitles */
FmtMp3 = 0x006d7033u,
+ FmtTheora = 0x74687261,
};
#define min(a,b) ((a)<=(b)?(a):(b))
--- a/matroska.c
+++ b/matroska.c
@@ -121,6 +121,7 @@
e->duration *= e->timestampscale;
c = format(e);
if(e->tracktype == Etrackvideo){
+ e->fpacket = ivfpacket;
if(strcmp(c, "vp9") == 0)
e->fmt = FmtVp09;
else if(strcmp(c, "vp8") == 0)
@@ -127,9 +128,11 @@
e->fmt = FmtVp08;
else if(strcmp(c, "h264") == 0)
e->fmt = FmtAvc1;
- else
+ else if(strcmp(c, "theora") == 0){
+ e->fmt = FmtTheora;
+ e->fpacket = oggpacket;
+ }else
goto err;
- e->fpacket = ivfpacket;
return 0;
}else if(e->tracktype == Etrackaudio){
if(strcmp(c, "vorbis") == 0){