diff options
Diffstat (limited to 'src/lib/decoder.cc')
| -rw-r--r-- | src/lib/decoder.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/decoder.cc b/src/lib/decoder.cc index e4b892ea4..c4759a872 100644 --- a/src/lib/decoder.cc +++ b/src/lib/decoder.cc @@ -48,6 +48,7 @@ extern "C" { #include "filter.h" #include "delay_line.h" #include "ffmpeg_compatibility.h" +#include "subtitle.h" using namespace std; using namespace boost; @@ -303,6 +304,14 @@ Decoder::process_video (AVFrame* frame, shared_ptr<Subtitle> sub) image->make_black (); } + if (sub && _opt->apply_crop) { + list<shared_ptr<SubtitleImage> > im = sub->images (); + for (list<shared_ptr<SubtitleImage> >::iterator i = im.begin(); i != im.end(); ++i) { + Position p = (*i)->position (); + (*i)->set_position (Position (p.x - _fs->crop.left, p.y - _fs->crop.top)); + } + } + TIMING ("Decoder emits %1", _video_frame); Video (image, _video_frame, sub); ++_video_frame; |
