Browse files

Added interlaced flag in raw input / generator

  • Loading branch information...
1 parent 6afd90e commit 5dbaf7db28e70404bc7a767a585f617e02c5fa7d @srstrong srstrong committed Feb 3, 2014
Showing with 6 additions and 2 deletions.
  1. +2 −2 c_src/video_raw_generator.c
  2. +4 −0 c_src/video_raw_input.c
View
4 c_src/video_raw_generator.c
@@ -47,9 +47,9 @@ static void process(ID3ASFilterContext *context,
avpicture_fill((AVPicture *) this->frame, this->data, this->pixfmt, this->width, this->height);
- set_frame_metadata(this->frame, metadata);
+ this->frame->interlaced_frame = this->interlaced;
- TRACE("GOT FRAME!");
+ set_frame_metadata(this->frame, metadata);
send_to_graph(context, this->frame, NINETY_KHZ);
}
View
4 c_src/video_raw_input.c
@@ -9,6 +9,7 @@ typedef struct _codec_t
int width;
int height;
enum PixelFormat input_pixfmt;
+ int interlaced;
} codec_t;
@@ -21,6 +22,8 @@ static void process(ID3ASFilterContext *context,
avpicture_fill((AVPicture *) this->frame, data, this->input_pixfmt, this->width, this->height);
+ this->frame->interlaced_frame = this->interlaced;
+
set_frame_metadata(this->frame, metadata);
send_to_graph(context, this->frame, NINETY_KHZ);
@@ -45,6 +48,7 @@ static const AVOption options[] = {
{ "width", "the width", offsetof(codec_t, width), AV_OPT_TYPE_INT, { .i64 = -1 }, INT_MIN, INT_MAX },
{ "height", "the height", offsetof(codec_t, height), AV_OPT_TYPE_INT, { .i64 = -1 }, INT_MIN, INT_MAX },
{ "pixel_format", "the pixel format", offsetof(codec_t, input_pixfmt), AV_OPT_TYPE_INT },
+ { "interlaced", "interlaced", offsetof(codec_t, interlaced), AV_OPT_TYPE_INT, { .i64 = 0 }, INT_MIN, INT_MAX },
{ NULL }
};

0 comments on commit 5dbaf7d

Please sign in to comment.