* @todo support more than one output stream
*/
-/* #define DEBUG */
-
#include <float.h>
+#include <stdint.h>
+
+#include "libavutil/attributes.h"
#include "libavutil/avstring.h"
#include "libavutil/opt.h"
#include "libavutil/imgutils.h"
#include "internal.h"
#include "video.h"
-typedef struct {
+typedef struct MovieContext {
const AVClass *class;
int64_t seek_point; ///< seekpoint in microseconds
double seek_point_d;
movie_options
};
-static int movie_init(AVFilterContext *ctx)
+static av_cold int movie_init(AVFilterContext *ctx)
{
MovieContext *movie = ctx->priv;
AVInputFormat *iformat = NULL;
{
MovieContext *movie = ctx->priv;
- av_free(movie->file_name);
- av_free(movie->format_name);
if (movie->codec_ctx)
avcodec_close(movie->codec_ctx);
if (movie->format_ctx)
MovieContext *movie = outlink->src->priv;
AVPacket pkt;
int ret, frame_decoded;
- AVStream av_unused *st = movie->format_ctx->streams[movie->stream_index];
if (movie->is_done == 1)
return 0;
if (frame_decoded) {
if (movie->frame->pkt_pts != AV_NOPTS_VALUE)
movie->frame->pts = movie->frame->pkt_pts;
- av_dlog(outlink->src,
+ av_log(outlink->src, AV_LOG_TRACE,
"movie_get_frame(): file:'%s' pts:%"PRId64" time:%f aspect:%d/%d\n",
movie->file_name, movie->frame->pts,
- (double)movie->frame->pts * av_q2d(st->time_base),
+ (double)movie->frame->pts *
+ av_q2d(movie->format_ctx->streams[movie->stream_index]->time_base),
movie->frame->sample_aspect_ratio.num,
movie->frame->sample_aspect_ratio.den);
// We got it. Free the packet since we are returning
{ NULL }
};
-AVFilter avfilter_vsrc_movie = {
+AVFilter ff_vsrc_movie = {
.name = "movie",
.description = NULL_IF_CONFIG_SMALL("Read from a movie source."),
.priv_size = sizeof(MovieContext),