summaryrefslogtreecommitdiffstats
path: root/libhb/scan.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2010-10-23 17:21:56 +0000
committerjstebbins <[email protected]>2010-10-23 17:21:56 +0000
commit598eb7d0143f7c3cddea494fa9c626478fce2cf2 (patch)
tree6aedebdd1720e1e35b0872babeaa66167bb00e44 /libhb/scan.c
parent07331bb1e1c3d237fd63579d82c82440a7380883 (diff)
Add build option --enable-ff-mpeg2 to use ffmpeg for mpeg2 decoding
instead of mpeg2dec. disabled by default. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3610 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/scan.c')
-rw-r--r--libhb/scan.c8
1 files changed, 8 insertions, 0 deletions
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;