Commit f1c9b20a authored by Laurent Aimar's avatar Laurent Aimar

* mpeg_audio: fixed input infos update, and removed all tabs.

 (each vlc_object_find has to be followed by a vlc_object_release once
the object isn't needed anymore)

 Btw, I think we should better do that update in src/input/input_dec.c,
this way it will work with every decoder AND a decoder should not touch
p_input (decoders will be used by transcode for instance ...)
parent 655e585f
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
* Preamble * Preamble
*****************************************************************************/ *****************************************************************************/
#include <vlc/vlc.h> #include <vlc/vlc.h>
#include <vlc/input.h> /* for input infos */
#include <vlc/decoder.h> #include <vlc/decoder.h>
#include <vlc/aout.h> #include <vlc/aout.h>
...@@ -467,9 +468,10 @@ static uint8_t *GetOutBuffer( decoder_t *p_dec, void **pp_out_buffer ) ...@@ -467,9 +468,10 @@ static uint8_t *GetOutBuffer( decoder_t *p_dec, void **pp_out_buffer )
input_info_category_t *p_cat; input_info_category_t *p_cat;
char psz_streamid[TITLE_MAX]; char psz_streamid[TITLE_MAX];
int i_es_id = p_dec->fmt_out.i_id; int i_es_id = p_dec->fmt_out.i_id;
input_thread_t * p_input = vlc_object_find( p_dec, VLC_OBJECT_INPUT, input_thread_t * p_input = vlc_object_find( p_dec, VLC_OBJECT_INPUT, FIND_PARENT );
FIND_PARENT );
if( p_input )
{
snprintf(psz_streamid, TITLE_MAX, "%s%04x", _("Stream "), i_es_id); snprintf(psz_streamid, TITLE_MAX, "%s%04x", _("Stream "), i_es_id);
p_cat = input_InfoCategory( p_input, psz_streamid ); p_cat = input_InfoCategory( p_input, psz_streamid );
...@@ -488,6 +490,9 @@ static uint8_t *GetOutBuffer( decoder_t *p_dec, void **pp_out_buffer ) ...@@ -488,6 +490,9 @@ static uint8_t *GetOutBuffer( decoder_t *p_dec, void **pp_out_buffer )
aout_DateInit( &p_sys->end_date, p_sys->i_rate ); aout_DateInit( &p_sys->end_date, p_sys->i_rate );
aout_DateSet( &p_sys->end_date, p_sys->i_pts ); aout_DateSet( &p_sys->end_date, p_sys->i_pts );
vlc_object_release( p_input );
}
} }
p_dec->fmt_out.audio.i_rate = p_sys->i_rate; p_dec->fmt_out.audio.i_rate = p_sys->i_rate;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment