diff --git a/aegisub/FFmpegSource2/ffaudiosource.cpp b/aegisub/FFmpegSource2/ffaudiosource.cpp index 9430dee31..1222924e1 100644 --- a/aegisub/FFmpegSource2/ffaudiosource.cpp +++ b/aegisub/FFmpegSource2/ffaudiosource.cpp @@ -112,8 +112,8 @@ int FFAudioSource::DecodeNextAudioBlock(uint8_t *Buf, int64_t *Count, char *Erro int Ret = -1; *Count = 0; AVPacket Packet, TempPacket; - av_init_packet(&Packet); - av_init_packet(&TempPacket); + init_null_packet(&Packet); + init_null_packet(&TempPacket); while (av_read_frame(FormatContext, &Packet) >= 0) { if (Packet.stream_index == AudioTrack) { @@ -344,7 +344,7 @@ int MatroskaAudioSource::DecodeNextAudioBlock(uint8_t *Buf, int64_t *Count, uint int Ret = -1; *Count = 0; AVPacket TempPacket; - av_init_packet(&TempPacket); + init_null_packet(&TempPacket); // FIXME check return ReadFrame(FilePos, FrameSize, CS, MC, ErrorMsg, MsgSize); diff --git a/aegisub/FFmpegSource2/ffms2.avsi b/aegisub/FFmpegSource2/ffms2.avsi new file mode 100644 index 000000000..045c094c6 --- /dev/null +++ b/aegisub/FFmpegSource2/ffms2.avsi @@ -0,0 +1,32 @@ +# FFmpegSource 1.21 syntax compatibility +# Created by TheFluff + +function FFmpegSource2(string source, int "vtrack", int "atrack", bool "cache", \ + string "cachefile", int "fpsnum", int "fpsden", string "pp", int "threads", \ + string "timecodes", int "seekmode", bool "overwrite") { + + vtrack = default(vtrack,-1) + atrack = default(atrack,-2) + cache = default(cache,true) + cachefile = default(cachefile,source+".ffindex") + fpsnum = default(fpsnum,-1) + fpsden = default(fpsden,1) + pp = default(pp,"") + threads = default(threads,-1) + timecodes = default(timecodes,"") + seekmode = default(seekmode,1) + overwrite = default(overwrite,false) + + ((cache == true) && (atrack <= -2)) ? ffindex(source=source, cachefile=cachefile, \ + indexmask=0, overwrite=overwrite) : (cache == true) ? ffindex(source=source, \ + cachefile=cachefile, indexmask=-1, overwrite=overwrite) : nop + + v = ffvideosource(source=source, track=vtrack, cache=cache, cachefile=cachefile, \ + fpsnum=fpsnum, fpsden=fpsden, pp=pp, threads=threads, timecodes=timecodes, \ + seekmode=seekmode) + + a = (atrack <= -2) ? blankclip(audio_rate=0) : ffaudiosource(source=source, \ + track=atrack, cache=cache, cachefile=cachefile) + + return audiodubex(v,a) +} diff --git a/aegisub/FFmpegSource2/ffms2.html b/aegisub/FFmpegSource2/ffms2.html index 4dfd0261b..8a1ceb373 100644 --- a/aegisub/FFmpegSource2/ffms2.html +++ b/aegisub/FFmpegSource2/ffms2.html @@ -234,6 +234,10 @@ Note that --enable-w32threads is required for multithreaded decoding to work.

Changes