From 526fd3d7da562ac8ee8d48961e1c3aa1915625e2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Tue, 8 Jan 2008 21:10:02 +0000 Subject: [PATCH] gst-libs/gst/tag/gsttagdemux.c: Post an error message if we can't pull as many bytes as we need for the tag. This mak... Original commit message from CVS: * gst-libs/gst/tag/gsttagdemux.c: (gst_tag_demux_pull_start_tag): Post an error message if we can't pull as many bytes as we need for the tag. This makes sure the user gets to see a proper error message if a file with a partial ID3 tag is fed to decodebin, and not a 'no ID3 tag demuxer' error, which would be confusing (see #508138). --- ChangeLog | 9 +++++++++ gst-libs/gst/tag/gsttagdemux.c | 2 ++ 2 files changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index dc242f6..84faaa6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2008-01-08 Tim-Philipp Müller + * gst-libs/gst/tag/gsttagdemux.c: (gst_tag_demux_pull_start_tag): + Post an error message if we can't pull as many bytes as we need + for the tag. This makes sure the user gets to see a proper error + message if a file with a partial ID3 tag is fed to decodebin, and + not a 'no ID3 tag demuxer' error, which would be confusing + (see #508138). + +2008-01-08 Tim-Philipp Müller + * gst-libs/gst/pbutils/descriptions.c: (formats): Add description strings for ID3, APE, and ICY tags. diff --git a/gst-libs/gst/tag/gsttagdemux.c b/gst-libs/gst/tag/gsttagdemux.c index 092f057..4cd5411 100644 --- a/gst-libs/gst/tag/gsttagdemux.c +++ b/gst-libs/gst/tag/gsttagdemux.c @@ -1035,6 +1035,8 @@ gst_tag_demux_pull_start_tag (GstTagDemux * demux, GstTagList ** tags) if (GST_BUFFER_SIZE (buffer) < tagsize) { GST_DEBUG_OBJECT (demux, "Only managed to read %u bytes from file", GST_BUFFER_SIZE (buffer)); + GST_ELEMENT_ERROR (demux, STREAM, DECODE, + (_("Failed to read tag: not enough data")), (NULL)); goto done; } } -- 2.7.4