mirror of
https://github.com/dsoprea/go-exif.git
synced 2025-05-31 11:41:57 +00:00
Add commenting to unknown-type handling
This commit is contained in:
parent
fdb5de93d2
commit
439148e767
@ -1126,6 +1126,9 @@ func (ib *IfdBuilder) AddTagsFromExisting(ifd *Ifd, itevr *IfdTagEntryValueResol
|
|||||||
_, isUnknownUndefined := x.(TagUnknownType_UnknownValue)
|
_, isUnknownUndefined := x.(TagUnknownType_UnknownValue)
|
||||||
|
|
||||||
if isUnknownUndefined == true {
|
if isUnknownUndefined == true {
|
||||||
|
// It's an undefined-type tag that we don't handle. If we
|
||||||
|
// don't know how to handle it, we can't know how many bytes
|
||||||
|
// it is and we must skip it.
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -390,6 +390,7 @@ func UndefinedValue(ifdPath string, tagId uint16, valueContext interface{}, byte
|
|||||||
// Return encapsulated data rather than an error so that we can at least
|
// Return encapsulated data rather than an error so that we can at least
|
||||||
// print/profile the opaque data.
|
// print/profile the opaque data.
|
||||||
|
|
||||||
|
// TODO(dustin): This won't ever work. The unit-count isn't necessarily correct. Revert to returning an error.
|
||||||
valueContextPtr.SetUnknownValueType(TypeByte)
|
valueContextPtr.SetUnknownValueType(TypeByte)
|
||||||
|
|
||||||
valueBytes, err := valueContextPtr.ReadBytes()
|
valueBytes, err := valueContextPtr.ReadBytes()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user