- p_stream->p_bih = (BITMAPINFOHEADER *)
- malloc( sizeof(BITMAPINFOHEADER) );
- if( !p_stream->p_bih )
- {
- /* Mem allocation error, just ignore the stream */
- free( p_stream );
- p_ogg->i_streams--;
- break;
- }
- p_stream->p_bih->biSize = sizeof(BITMAPINFOHEADER);
- p_stream->p_bih->biCompression=
- p_stream->i_fourcc = VLC_FOURCC( st->subtype[0],
- st->subtype[1],
- st->subtype[2],
- st->subtype[3] );
- msg_Dbg( p_input, "found video header of type: %.4s",
- (char *)&p_stream->i_fourcc );
-
- p_stream->f_rate = 10000000.0 /
- GetQWLE(&st->time_unit);
- p_stream->p_bih->biBitCount =
- GetWLE(&st->bits_per_sample);
- p_stream->p_bih->biWidth =
- GetDWLE(&st->sh.video.width);
- p_stream->p_bih->biHeight =
- GetDWLE(&st->sh.video.height);
- p_stream->p_bih->biPlanes= 1 ;
- p_stream->p_bih->biSizeImage =
- (p_stream->p_bih->biBitCount >> 3) *
- p_stream->p_bih->biWidth *
- p_stream->p_bih->biHeight;
-
- msg_Dbg( p_input,
- "fps: %f, width:%i; height:%i, bitcount:%i",
- p_stream->f_rate, p_stream->p_bih->biWidth,
- p_stream->p_bih->biHeight,
- p_stream->p_bih->biBitCount);
-
- {
- char title[sizeof("Stream") + 10];
- input_info_category_t *p_cat;
- sprintf( title, "Stream %d", p_ogg->i_streams );
- p_cat = input_InfoCategory( p_input, title );
- input_AddInfo( p_cat, _("Type"), _("Video") );
- input_AddInfo( p_cat, _("Codec"), "%.4s",
- (char *)&p_stream->i_fourcc );
- input_AddInfo( p_cat, _("Frame Rate"), "%f",
- p_stream->f_rate );
- input_AddInfo( p_cat, _("Bit Count"), "%d",
- p_stream->p_bih->biBitCount );
- input_AddInfo( p_cat, _("Width"), "%d",
- p_stream->p_bih->biWidth );
- input_AddInfo( p_cat, _("Height"), "%d",
- p_stream->p_bih->biHeight );
- }
- p_stream->i_bitrate = 0;
+ p_stream->fmt.i_codec =
+ VLC_FOURCC( st->subtype[0], st->subtype[1],
+ st->subtype[2], st->subtype[3] );
+ msg_Dbg( p_demux, "found video header of type: %.4s",
+ (char *)&p_stream->fmt.i_codec );
+
+ p_stream->fmt.video.i_frame_rate = 10000000;
+ p_stream->fmt.video.i_frame_rate_base = st->time_unit;
+ if( st->time_unit <= 0 )
+ st->time_unit = 400000;
+ p_stream->f_rate = 10000000.0 / st->time_unit;
+ p_stream->fmt.video.i_bits_per_pixel = st->bits_per_sample;
+ p_stream->fmt.video.i_width = st->sh.video.width;
+ p_stream->fmt.video.i_height = st->sh.video.height;
+
+ msg_Dbg( p_demux,
+ "fps: %f, width:%i; height:%i, bitcount:%i",
+ p_stream->f_rate,
+ p_stream->fmt.video.i_width,
+ p_stream->fmt.video.i_height,
+ p_stream->fmt.video.i_bits_per_pixel );