Example #1
0
static block_t *DecodeAudio(decoder_t *p_dec, block_t **pp_block)
{
    block_t *p_out = NULL;

    if (DecodeCommon(p_dec, pp_block, NULL, &p_out))
        return NULL;
    return p_out;
}
Example #2
0
static picture_t *DecodeVideo(decoder_t *p_dec, block_t **pp_block)
{
    picture_t *p_out = NULL;

    if (DecodeCommon(p_dec, pp_block, &p_out, NULL))
        return NULL;
    return p_out;
}
Example #3
0
static picture_t *DecodeVideo(decoder_t *p_dec, block_t **pp_block)
{
    decoder_sys_t *p_sys = p_dec->p_sys;
    picture_t *p_out = NULL;

    /* Use the aspect ratio provided by the input (ie read from packetizer).
     * Don't check the current value of the aspect ratio in fmt_out, since we
     * want to allow changes in it to propagate. */
    if (p_dec->fmt_in.video.i_sar_num != 0 && p_dec->fmt_in.video.i_sar_den != 0
     && (p_dec->fmt_out.video.i_sar_num != p_dec->fmt_in.video.i_sar_num ||
         p_dec->fmt_out.video.i_sar_den != p_dec->fmt_in.video.i_sar_den))
    {
        p_dec->fmt_out.video.i_sar_num = p_dec->fmt_in.video.i_sar_num;
        p_dec->fmt_out.video.i_sar_den = p_dec->fmt_in.video.i_sar_den;
        p_sys->b_update_format = true;
    }

    if (DecodeCommon(p_dec, pp_block, Video_OnNewBlock, Video_GetOutput,
                     &p_out, NULL))
        return NULL;
    return p_out;
}