Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 409001 | Differences between
and this patch

Collapse All | Expand All

(-)modules/stream_out/switcher.c.old (-10 / +9 lines)
Lines 292-298 Link Here
292
    p_stream->pf_send   = Send;
292
    p_stream->pf_send   = Send;
293
    p_stream->p_sys     = p_sys;
293
    p_stream->p_sys     = p_sys;
294
294
295
    avcodec_init();
296
    avcodec_register_all();
295
    avcodec_register_all();
297
296
298
    return VLC_SUCCESS;
297
    return VLC_SUCCESS;
Lines 355-361 Link Here
355
            return NULL;
354
            return NULL;
356
        }
355
        }
357
356
358
        id->ff_enc_c = avcodec_alloc_context();
357
        id->ff_enc_c = avcodec_alloc_context3( NULL );
359
358
360
        /* Set CPU capabilities */
359
        /* Set CPU capabilities */
361
        unsigned i_cpu = vlc_CPU();
360
        unsigned i_cpu = vlc_CPU();
Lines 388-394 Link Here
388
        id->ff_enc_c->bit_rate    = p_fmt->i_bitrate;
387
        id->ff_enc_c->bit_rate    = p_fmt->i_bitrate;
389
388
390
        vlc_avcodec_lock();
389
        vlc_avcodec_lock();
391
        if( avcodec_open( id->ff_enc_c, id->ff_enc ) )
390
        if( avcodec_open2( id->ff_enc_c, id->ff_enc, NULL ) )
392
        {
391
        {
393
            vlc_avcodec_unlock();
392
            vlc_avcodec_unlock();
394
            msg_Err( p_stream, "cannot open encoder" );
393
            msg_Err( p_stream, "cannot open encoder" );
Lines 748-754 Link Here
748
            return 0;
747
            return 0;
749
        }
748
        }
750
749
751
        id->ff_enc_c = avcodec_alloc_context();
750
        id->ff_enc_c = avcodec_alloc_context3( NULL );
752
751
753
        /* Set CPU capabilities */
752
        /* Set CPU capabilities */
754
        unsigned i_cpu = vlc_CPU();
753
        unsigned i_cpu = vlc_CPU();
Lines 844-850 Link Here
844
843
845
    if ( id->i_nb_pred >= p_sys->i_gop )
844
    if ( id->i_nb_pred >= p_sys->i_gop )
846
    {
845
    {
847
        id->p_frame->pict_type = FF_I_TYPE;
846
        id->p_frame->pict_type = AV_PICTURE_TYPE_I;
848
#if 0
847
#if 0
849
        id->p_frame->me_threshold = 0;
848
        id->p_frame->me_threshold = 0;
850
        id->p_frame->mb_threshold = 0;
849
        id->p_frame->mb_threshold = 0;
Lines 853-859 Link Here
853
    }
852
    }
854
    else
853
    else
855
    {
854
    {
856
        id->p_frame->pict_type = FF_P_TYPE;
855
        id->p_frame->pict_type = AV_PICTURE_TYPE_P;
857
#if 0
856
#if 0
858
        if ( id->p_frame->mb_type != NULL )
857
        if ( id->p_frame->mb_type != NULL )
859
        {
858
        {
Lines 873-879 Link Here
873
872
874
#if 0
873
#if 0
875
    if ( id->p_frame->mb_type == NULL
874
    if ( id->p_frame->mb_type == NULL
876
          && id->ff_enc_c->coded_frame->pict_type != FF_I_TYPE )
875
          && id->ff_enc_c->coded_frame->pict_type != AV_PICTURE_TYPE_I )
877
    {
876
    {
878
        int mb_width = (id->ff_enc_c->width + 15) / 16;
877
        int mb_width = (id->ff_enc_c->width + 15) / 16;
879
        int mb_height = (id->ff_enc_c->height + 15) / 16;
878
        int mb_height = (id->ff_enc_c->height + 15) / 16;
Lines 926-938 Link Here
926
925
927
    switch ( id->ff_enc_c->coded_frame->pict_type )
926
    switch ( id->ff_enc_c->coded_frame->pict_type )
928
    {
927
    {
929
    case FF_I_TYPE:
928
    case AV_PICTURE_TYPE_I:
930
        p_out->i_flags |= BLOCK_FLAG_TYPE_I;
929
        p_out->i_flags |= BLOCK_FLAG_TYPE_I;
931
        break;
930
        break;
932
    case FF_P_TYPE:
931
    case AV_PICTURE_TYPE_P:
933
        p_out->i_flags |= BLOCK_FLAG_TYPE_P;
932
        p_out->i_flags |= BLOCK_FLAG_TYPE_P;
934
        break;
933
        break;
935
    case FF_B_TYPE:
934
    case AV_PICTURE_TYPE_B:
936
        p_out->i_flags |= BLOCK_FLAG_TYPE_B;
935
        p_out->i_flags |= BLOCK_FLAG_TYPE_B;
937
        break;
936
        break;
938
    default:
937
    default:

Return to bug 409001