summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien Moutte <julien@moutte.net>2007-09-27 10:06:23 +0000
committerJulien Moutte <julien@moutte.net>2007-09-27 10:06:23 +0000
commit24c1b1dae1a1c113766b08b3c2956c9d403b03d3 (patch)
tree86801dcf5ff45c399f2688de3b5a82e7614d8496
parentef4ea4876c436e4080950a7db9f6a2678535e600 (diff)
downloadgst-plugins-bad-24c1b1dae1a1c113766b08b3c2956c9d403b03d3.tar.gz
gst-plugins-bad-24c1b1dae1a1c113766b08b3c2956c9d403b03d3.tar.bz2
gst-plugins-bad-24c1b1dae1a1c113766b08b3c2956c9d403b03d3.zip
gst/flv/gstflvparse.c: I got it wrong again, audio rate was not detected correctly in all cases.
Original commit message from CVS: 2007-09-27 Julien MOUTTE <julien@moutte.net> * gst/flv/gstflvparse.c: (gst_flv_parse_tag_audio), (gst_flv_parse_tag_video): I got it wrong again, audio rate was not detected correctly in all cases.
-rw-r--r--ChangeLog6
-rw-r--r--gst/flv/gstflvparse.c13
2 files changed, 12 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 1d830ae3..9b207e73 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-09-27 Julien MOUTTE <julien@moutte.net>
+
+ * gst/flv/gstflvparse.c: (gst_flv_parse_tag_audio),
+ (gst_flv_parse_tag_video): I got it wrong again, audio rate
+ was not detected correctly in all cases.
+
2007-09-26 Wim Taymans <wim.taymans@gmail.com>
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_dispose),
diff --git a/gst/flv/gstflvparse.c b/gst/flv/gstflvparse.c
index bf475cb3..fe5bfd10 100644
--- a/gst/flv/gstflvparse.c
+++ b/gst/flv/gstflvparse.c
@@ -419,11 +419,11 @@ gst_flv_parse_tag_audio (GstFLVDemux * demux, const guint8 * data,
width = 16;
}
/* Sampling rate */
- if ((flags >> 2) == 3) {
+ if ((flags & 0x0C) == 0x0C) {
rate = 44100;
- } else if ((flags >> 2) == 2) {
+ } else if ((flags & 0x0C) == 0x08) {
rate = 22050;
- } else if ((flags >> 2) == 1) {
+ } else if ((flags & 0x0C) == 0x04) {
rate = 11025;
}
/* Codec tag */
@@ -457,7 +457,8 @@ gst_flv_parse_tag_audio (GstFLVDemux * demux, const guint8 * data,
case 3:
caps = gst_caps_new_simple ("audio/x-raw-int",
"endianness", G_TYPE_INT, G_BYTE_ORDER,
- "signed", G_TYPE_BOOLEAN, TRUE, NULL);
+ "signed", G_TYPE_BOOLEAN, TRUE,
+ "width", G_TYPE_INT, width, "depth", G_TYPE_INT, width, NULL);
break;
default:
GST_WARNING_OBJECT (demux, "unsupported audio codec tag %u", codec_tag);
@@ -472,9 +473,7 @@ gst_flv_parse_tag_audio (GstFLVDemux * demux, const guint8 * data,
}
gst_caps_set_simple (caps,
- "rate", G_TYPE_INT, rate,
- "channels", G_TYPE_INT, channels,
- "width", G_TYPE_INT, width, "depth", G_TYPE_INT, width, NULL);
+ "rate", G_TYPE_INT, rate, "channels", G_TYPE_INT, channels, NULL);
gst_pad_set_caps (demux->audio_pad, caps);