gst-libs/gst/riff/riff-media.c: Fix wrong method name in docs. Fix calculation of strf fields for broken mulaw/alaw.

Original commit message from CVS:
* gst-libs/gst/riff/riff-media.c:
Fix wrong method name in docs. Fix calculation of strf fields for
broken mulaw/alaw.
* gst-libs/gst/riff/riff-read.c:
Whitespace fix and removing double ';'.
This commit is contained in:
Stefan Kost 2008-05-21 14:35:41 +00:00
parent 3cd156cad5
commit eda6d89b8c
4 changed files with 20 additions and 11 deletions

View File

@ -1,3 +1,12 @@
2008-05-21 Stefan Kost <ensonic@users.sf.net>
* gst-libs/gst/riff/riff-media.c:
Fix wrong method name in docs. Fix calculation of strf fields for
broken mulaw/alaw.
* gst-libs/gst/riff/riff-read.c:
Whitespace fix and removing double ';'.
2008-05-21 Wim Taymans <wim.taymans@collabora.co.uk> 2008-05-21 Wim Taymans <wim.taymans@collabora.co.uk>
* docs/design/part-playbin2.txt: * docs/design/part-playbin2.txt:

2
common

@ -1 +1 @@
Subproject commit e365978c480a8fffa4bdb61568fb2cd989d1b197 Subproject commit d0749502b0e891038593866f619a75305367b409

View File

@ -35,7 +35,7 @@ GST_DEBUG_CATEGORY_EXTERN (riff_debug);
#define GST_CAT_DEFAULT riff_debug #define GST_CAT_DEFAULT riff_debug
/** /**
* gst_riff_create_video_caps_with_data: * gst_riff_create_video_caps:
* @codec_fcc: fourCC codec for this codec. * @codec_fcc: fourCC codec for this codec.
* @strh: pointer to the strh stream header structure. * @strh: pointer to the strh stream header structure.
* @strf: pointer to the strf stream header structure, including any * @strf: pointer to the strf stream header structure, including any
@ -961,14 +961,14 @@ gst_riff_create_audio_caps (guint16 codec_id,
GST_WARNING ("invalid depth (%d) of alaw audio, overwriting.", GST_WARNING ("invalid depth (%d) of alaw audio, overwriting.",
strf->size); strf->size);
strf->size = 8; strf->size = 8;
strf->av_bps = 8; strf->blockalign = (strf->size * strf->channels) / 8;
strf->blockalign = strf->av_bps * strf->channels; strf->av_bps = strf->blockalign * strf->rate;
} }
if (strf->av_bps == 0 || strf->blockalign == 0) { if (strf->av_bps == 0 || strf->blockalign == 0) {
GST_WARNING ("fixing av_bps (%d) and blockalign (%d) of alaw audio", GST_WARNING ("fixing av_bps (%d) and blockalign (%d) of alaw audio",
strf->av_bps, strf->blockalign); strf->av_bps, strf->blockalign);
strf->av_bps = strf->size; strf->blockalign = (strf->size * strf->channels) / 8;
strf->blockalign = strf->av_bps * strf->channels; strf->av_bps = strf->blockalign * strf->rate;
} }
} }
rate_max = 48000; rate_max = 48000;
@ -999,14 +999,14 @@ gst_riff_create_audio_caps (guint16 codec_id,
GST_WARNING ("invalid depth (%d) of mulaw audio, overwriting.", GST_WARNING ("invalid depth (%d) of mulaw audio, overwriting.",
strf->size); strf->size);
strf->size = 8; strf->size = 8;
strf->av_bps = 8; strf->blockalign = (strf->size * strf->channels) / 8;
strf->blockalign = strf->av_bps * strf->channels; strf->av_bps = strf->blockalign * strf->rate;
} }
if (strf->av_bps == 0 || strf->blockalign == 0) { if (strf->av_bps == 0 || strf->blockalign == 0) {
GST_WARNING ("fixing av_bps (%d) and blockalign (%d) of mulaw audio", GST_WARNING ("fixing av_bps (%d) and blockalign (%d) of mulaw audio",
strf->av_bps, strf->blockalign); strf->av_bps, strf->blockalign);
strf->av_bps = strf->size; strf->blockalign = (strf->size * strf->channels) / 8;
strf->blockalign = strf->av_bps * strf->channels; strf->av_bps = strf->blockalign * strf->rate;
} }
} }
rate_max = 48000; rate_max = 48000;

View File

@ -656,7 +656,7 @@ gst_riff_parse_info (GstElement * element,
type = GST_TAG_GENRE; type = GST_TAG_GENRE;
break; break;
case GST_RIFF_INFO_IKEY: case GST_RIFF_INFO_IKEY:
type = NULL; /*"Keywords"; */ ; type = NULL; /*"Keywords"; */
break; break;
case GST_RIFF_INFO_ILGT: case GST_RIFF_INFO_ILGT:
type = NULL; /*"Lightness"; */ type = NULL; /*"Lightness"; */