Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 27c27,29
- < #undef malloc // Shut up libav error messages.
- ---
- >
- > // Shut up libav error messages.
- > #undef malloc
- 38d39
- < #include <pthread.h>
- 40,44c41,45
- < #if defined (__APPLE__)
- < #define AVISYNTH_LIB "libavxsynth.dylib"
- < #else
- < #define AVISYNTH_LIB "libavxsynth.so"
- < #endif
- ---
- > #if defined (__APPLE__)
- > #define AVISYNTH_LIB "libavxsynth.dylib"
- > #else
- > #define AVISYNTH_LIB "libavxsynth.so"
- > #endif
- 91c92
- < static const int avs_planes_yuv[3] = {AVS_PLANAR_Y, AVS_PLANAR_V, AVS_PLANAR_U};
- ---
- > static const int avs_planes_yuv[3] = {AVS_PLANAR_Y, AVS_PLANAR_U, AVS_PLANAR_V};
- 185c186
- < int planar = 0; // 0: packed, 1: YUV, 2: Y8
- ---
- > int planar = 0; // 0: packed, 1: YUV, 2: Y8, 3: YVU
- 199c200
- < #ifdef _WIN32
- ---
- > #if 0
- 370,374c371,374
- < if ( avs_is_rgb24(avs->vi) || avs_is_rgb32(avs->vi) ) {
- < src_p = (src_p + (planeheight - 1) * pitch);
- < avs_library->avs_bit_blt(avs->env, dst_p, rowsize, src_p, -pitch, rowsize, planeheight);
- < } else {
- < avs_library->avs_bit_blt(avs->env, dst_p, rowsize, src_p, pitch, rowsize, planeheight);
- ---
- > // Flip RGB video.
- > if (avs_is_rgb24(avs->vi) || avs_is_rgb(avs->vi)) {
- > src_p = src_p + (planeheight - 1) * pitch;
- > pitch = -pitch;
- 375a376,377
- >
- > avs_library->avs_bit_blt(avs->env, dst_p, rowsize, src_p, pitch, rowsize, planeheight);
- 402,403c404
- < }
- < else
- ---
- > } else {
- 404a406
- > }
- 406,407d407
- < if (samples <= 0)
- < return 0;
- 410a411,417
- > // After seeking, audio may catch up with video.
- > if (samples <= 0) {
- > pkt->size = 0;
- > pkt->data = NULL;
- > return 0;
- > }
- >
- 486d492
- < AVS_ScriptEnvironment *env = NULL;
- 492c498
- < avs_library->avs_delete_script_environment(env);
- ---
- > avs_library->avs_delete_script_environment(avs->env);
- 506a513,515
- > avs->curr_frame = 0;
- > avs->curr_sample = 0;
- >
- 518c527,528
- < avs->curr_sample = av_rescale_q(timestamp, samplerate, fps);
- ---
- > if (avs_has_audio(avs->vi))
- > avs->curr_sample = av_rescale_q(timestamp, samplerate, fps);
- 523,524c533,538
- < avs->curr_frame = av_rescale_q(timestamp, fps, samplerate);
- < avs->curr_sample = av_rescale_q(avs->curr_frame, samplerate, fps);
- ---
- > if (avs_has_video(avs->vi)) {
- > avs->curr_frame = av_rescale_q(timestamp, fps, samplerate);
- > avs->curr_sample = av_rescale_q(avs->curr_frame, samplerate, fps);
- > } else {
- > avs->curr_sample = timestamp;
- > }
- 539c553
- < };
- \ No newline at end of file
- ---
- > };
Advertisement
Add Comment
Please, Sign In to add comment