summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authornicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-05-12 23:32:26 +0000
committernicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-05-12 23:32:26 +0000
commit4bd4a37a2eb8163b2af43ed0895e3baf0e117a4a (patch)
treeb98bbe5171a8484d71ccb03b918b6908cd900e44 /libmpcodecs
parenta66c45716aebc50971db2fd472f6474c6e9491be (diff)
downloadmpv-4bd4a37a2eb8163b2af43ed0895e3baf0e117a4a.tar.bz2
mpv-4bd4a37a2eb8163b2af43ed0895e3baf0e117a4a.tar.xz
initialize vorbis structure before calling ERROR()
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15426 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/ad_libvorbis.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libmpcodecs/ad_libvorbis.c b/libmpcodecs/ad_libvorbis.c
index 8e528e8f1b..2726970304 100644
--- a/libmpcodecs/ad_libvorbis.c
+++ b/libmpcodecs/ad_libvorbis.c
@@ -72,6 +72,11 @@ static int init(sh_audio_t *sh)
return 0; \
}
+ /// Init the decoder with the 3 header packets
+ ov = (struct ov_struct_st*)malloc(sizeof(struct ov_struct_st));
+ vorbis_info_init(&ov->vi);
+ vorbis_comment_init(&vc);
+
if(! sh->wf) {
mp_msg(MSGT_DECAUDIO,MSGL_ERR,"ad_vorbis, extradata seems to be absent! exit\n");
ERROR();
@@ -117,10 +122,6 @@ static int init(sh_audio_t *sh)
hsizes[2] = sh->wf->cbSize - offset - hsizes[0] - hsizes[1];
mp_msg (MSGT_DEMUX, MSGL_V, "ad_vorbis, header sizes: %d %d %d\n", hsizes[0], hsizes[1], hsizes[2]);
- /// Init the decoder with the 3 header packets
- ov = (struct ov_struct_st*)malloc(sizeof(struct ov_struct_st));
- vorbis_info_init(&ov->vi);
- vorbis_comment_init(&vc);
for(i=0; i<3; i++) {
op.bytes = hsizes[i];
op.packet = headers[i];