summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
Diffstat (limited to 'libhb')
-rw-r--r--libhb/module.defs3
-rw-r--r--libhb/scan.c8
-rw-r--r--libhb/work.c7
3 files changed, 18 insertions, 0 deletions
diff --git a/libhb/module.defs b/libhb/module.defs
index 4759a921a..6518bcc8d 100644
--- a/libhb/module.defs
+++ b/libhb/module.defs
@@ -34,6 +34,9 @@ LIBHB.out += $(LIBHB.a)
###############################################################################
+ifeq (1,$(FEATURE.ff.mpeg2))
+LIBHB.GCC.D += USE_FF_MPEG2
+endif
LIBHB.GCC.D += __LIBHB__ USE_PTHREAD
LIBHB.GCC.I += $(LIBHB.build/) $(CONTRIB.build/)include
diff --git a/libhb/scan.c b/libhb/scan.c
index 445314bcd..901551f55 100644
--- a/libhb/scan.c
+++ b/libhb/scan.c
@@ -5,6 +5,7 @@
It may be used under the terms of the GNU General Public License. */
#include "hb.h"
+#include "hbffmpeg.h"
#include "a52dec/a52.h"
#include "dca.h"
@@ -526,6 +527,13 @@ static int DecodePreviews( hb_scan_t * data, hb_title_t * title )
hb_deep_log( 2, "scan: preview %d", i + 1 );
int vcodec = title->video_codec? title->video_codec : WORK_DECMPEG2;
+#if defined(USE_FF_MPEG2)
+ if (vcodec == WORK_DECMPEG2)
+ {
+ vcodec = WORK_DECAVCODECV;
+ title->video_codec_param = CODEC_ID_MPEG2VIDEO;
+ }
+#endif
hb_work_object_t *vid_decoder = hb_get_work( vcodec );
vid_decoder->codec_param = title->video_codec_param;
vid_decoder->title = title;
diff --git a/libhb/work.c b/libhb/work.c
index 7caa0691e..c9d32de91 100644
--- a/libhb/work.c
+++ b/libhb/work.c
@@ -637,6 +637,13 @@ static void do_job( hb_job_t * job, int cpu_count )
/* Video decoder */
int vcodec = title->video_codec? title->video_codec : WORK_DECMPEG2;
+#if defined(USE_FF_MPEG2)
+ if (vcodec == WORK_DECMPEG2)
+ {
+ vcodec = WORK_DECAVCODECV;
+ title->video_codec_param = CODEC_ID_MPEG2VIDEO;
+ }
+#endif
hb_list_add( job->list_work, ( w = hb_get_work( vcodec ) ) );
w->codec_param = title->video_codec_param;
w->fifo_in = job->fifo_mpeg2;