Stream timebase should be set using avpriv_set_pts_info, otherwise
avctx->pkt_timebase is not correct.
This should fix ticket #4766.
Patch is only compile tested.
Signed-off-by: Marton Balint <cus@passwd.hu>
Reviewed-by: Stephen Hutchinson <qyot27@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
In order to safely exit when the user tries to use AviSynth 2.5, the
continue_on_fail value for 2.6's functions need to be set to 1.
Otherwise, the library loader fails before the 'upgrade to 2.6'
log message appears.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
The AVSC_API changes in the new headers mean that the 2.6 alphas
are just as incompatible as 2.5 is.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
In order to safely exit when the user tries to use AviSynth 2.5,
the continue_on_fail value for 2.6's functions need to be set to
1. Otherwise, the library loader fails before the 'upgrade to
2.6' log message appears.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
If the user attempts to use AviSynth 2.5, an error message will
now tell them they need to upgrade.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
AviSynth 2.6 (and by extension, AviSynth+) moves these functions
into AVSC_API. This requires both adjusting their normal use,
and for AvxSynth, adjusting the position/use of the USING_AVISYNTH
ifdefs.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Reviewed-by: Stephen Hutchinson <qyot27@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
If the audio changes from 9eac7c4 were merged as they were, this
would cause scripts with both video+audio to fail with a lot of
audio decoding errors (the video would be fine). Scripts with
only one of either video or audio were unaffected. Additionally,
the av_packet changes in general caused seeking to break.
Using av_packet_from_data allows video+audio scripts to work as
expected, without audio decoding errors. It also fixes seeking.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
These are the remaining av_packet-related bits from 9eac7c4
that didn't get merged at that time.
Changes authored by Anton Khirnov <anton@khirnov.net>, split out
from 9eac7c4 by Stephen Hutchinson <qyot27@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Directly loads AviSynth through LoadLibrary instead of relying on
Video for Windows, and supports using AvxSynth (via dlopen) to
open scripts on Linux and OS X.
Error messages from AviSynth/AvxSynth are now reported through
av_log and exit, rather than the traditional behavior of generating
an error video that the user would need to watch to diagnose.
The main rewrite was authored by d s <avxsynth.testing@gmail.com>
from the AvxSynth team, with additional contributions by
Oka Motofumi <chikuzen.mo@gmail.com>
Stephen Hutchinson <qyot27@gmail.com>
Diego Biurrun <diego@biurrun.de>
Anton Khirnov <anton@khirnov.net>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Uses the 2.5 compatibility header included with the variant of
FFMS2 that uses AviSynth's C-interface. A copy of this header is
now provided in compat/avisynth.
avs_get_row_size_p and avs_get_height_p changed between versions
2.5 and 2.6. Since the avisynth_c.h header that avformat uses
assumes AviSynth 2.6, it would cause 2.5 to crash if given any
kind of real video (the Version() function was known to work,
though).
AvxSynth was unaffected by this issue because, despite being based
on AviSynth 2.5.8 and using 2.5.8's interface version number of 3,
it actually uses 2.6's versions of these functions.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
'Fixes' ticket #2526 insofar as it stops 2.5.8 from crashing and
tells the user to upgrade to 2.6 if they want to make video input
work. A real solution to #2526 would be to get video input from
2.5.8 to work right.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Avisynth is a non-unicode application and cannot accept UTF-8
characters. Therefore, the input filename should be converted to
the code page that it expects.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Partial fix for ticket #2412 in that using PIX_FMT_BGR24 fixes the
swapped channels issue when using scripts serving RGB24.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Dynamically loads the library itself, rather than through VfW.
Supports AvxSynth on Linux and OS X.
Supports the new colorspaces added in AviSynth 2.6 when used
with AviSynth 2.6.
According to its description, it is supposed to be the LCM of all the
frame durations. The usability of such a thing is vanishingly small,
especially since we cannot determine it with any amount of reliability.
Therefore get rid of it after the next bump.
Replace it with the average framerate where it makes sense.
FATE results for the wtv and xmv demux tests change. In the wtv case
this is caused by the file being corrupted (or possibly badly cut) and
containing invalid timestamps. This results in lavf estimating the
framerate wrong and making up wrong frame durations.
In the xmv case the file contains pts jumps, so again the estimated
framerate is far from anything sane and lavf again makes up different
frame durations.
In some other tests lavf starts making up frame durations from different
frame.