summaryrefslogtreecommitdiffstats
path: root/libhb/work.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2011-03-19 20:58:01 +0000
committerjstebbins <[email protected]>2011-03-19 20:58:01 +0000
commit24d2785ae92568533caed9528944167ca27e8905 (patch)
tree6449a94ad4a22c66bfaddc8df9bce45080ceceb8 /libhb/work.c
parentde22836e9e399616ea04051eabd8b8cbedb4e8cb (diff)
Add mpeg-2 encoding support to libhb, cli, and lingui
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3853 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/work.c')
-rw-r--r--libhb/work.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/libhb/work.c b/libhb/work.c
index c8caff7b8..e8c2a4e1e 100644
--- a/libhb/work.c
+++ b/libhb/work.c
@@ -264,8 +264,12 @@ void hb_display_job_info( hb_job_t * job )
/* Video encoder */
switch( job->vcodec )
{
- case HB_VCODEC_FFMPEG:
- hb_log( " + encoder: FFmpeg" );
+ case HB_VCODEC_FFMPEG_MPEG4:
+ hb_log( " + encoder: FFmpeg MPEG-4" );
+ break;
+
+ case HB_VCODEC_FFMPEG_MPEG2:
+ hb_log( " + encoder: FFmpeg MPEG-2" );
break;
case HB_VCODEC_X264:
@@ -452,7 +456,7 @@ static void do_job( hb_job_t * job )
{
hb_set_anamorphic_size(job, &job->width, &job->height, &job->anamorphic.par_width, &job->anamorphic.par_height);
- if( job->vcodec == HB_VCODEC_FFMPEG )
+ if( job->vcodec & HB_VCODEC_FFMPEG_MASK )
{
/* Just to make working with ffmpeg even more fun,
lavc's MPEG-4 encoder can't handle PAR values >= 255,
@@ -722,8 +726,13 @@ static void do_job( hb_job_t * job )
/* Video encoder */
switch( job->vcodec )
{
- case HB_VCODEC_FFMPEG:
+ case HB_VCODEC_FFMPEG_MPEG4:
w = hb_get_work( WORK_ENCAVCODEC );
+ w->codec_param = CODEC_ID_MPEG4;
+ break;
+ case HB_VCODEC_FFMPEG_MPEG2:
+ w = hb_get_work( WORK_ENCAVCODEC );
+ w->codec_param = CODEC_ID_MPEG2VIDEO;
break;
case HB_VCODEC_X264:
w = hb_get_work( WORK_ENCX264 );
@@ -993,7 +1002,7 @@ static void do_job( hb_job_t * job )
w = muxer;
}
- hb_buffer_t * buf_in, * buf_out;
+ hb_buffer_t * buf_in, * buf_out = NULL;
while ( !*job->die && !*w->done && w->status != HB_WORK_DONE )
{