Ticket #2120 (closed bug)

Opened 10 years ago

Last modified 10 years ago

mp3 files with missing headers throws an exception

Reported by: todor Owned by: stefan
Priority: major Milestone: M12_RELEASE
Component: uncategorized Version: 2.0
Keywords: Cc: stefan
Category: unknown Effort:
Importance: Ticket_group:
Estimated Number of Hours: 0 Add Hours to Ticket: 0
Billable?: yes Total Hours: 0
Analysis_owners: stefan Design_owners: stefan
Imp._owners: stefan Test_owners:
Analysis_reviewers: stefan Changelog:
Design_reviewers: pap Imp._reviewers: pap, meddle
Test_reviewers: Analysis_score: 3
Design_score: 3 Imp._score: 3
Test_score: 0

Description (last modified by stefan) (diff)

  1. Insert an mp3 audio file.
  2. If the file is with missing or corrupted header, the media decoder native stops and throws an exception.

Fix:

  • java - in the org.sophie2.main.media.natlib.decoder.MediaNativeBridge is added if clause to check whether returned response is ErrorResponse that contains "length < 0" substring in its message, which means that the packet read from the file is corrupted (mostly the header)...
  • natives - in the media_decoder.h file in the decodeaudio3 method, the assert that used to check whether the decoding of the packet is successful is changed to if clause, and if it is corrupted/missing/ it throws an exception that is handled in the mainLoop of the native. A ErrorResponse with the exception message is returned to the java side.

A sample .mp3 file is added to this ticked in order to test the fix.
The patch with the changes is added.

Attachments

01 - Marduk - Panzer Division Marduk.mp3 (2.4 MB) - added by stefan 10 years ago.
sample mp3 with damaged/missing header
bug#2120.patch (2.5 KB) - added by stefan 10 years ago.

Change History

comment:1 Changed 10 years ago by todor

  • Status changed from new to s1b_analysis_finished

Changed 10 years ago by stefan

sample mp3 with damaged/missing header

comment:2 Changed 10 years ago by stefan

  • Status changed from s1b_analysis_finished to s2a_design_started
  • Description modified (diff)

comment:3 Changed 10 years ago by stefan

  • Status changed from s2a_design_started to s3b_implementation_finished

comment:4 Changed 10 years ago by stefan

  • Description modified (diff)

comment:5 Changed 10 years ago by stefan

  • Design_owners set to stefan
  • Imp._owners set to stefan

comment:6 Changed 10 years ago by pap

  • Status changed from s3b_implementation_finished to s1c_analysis_ok
  • Cc stefan added
  • Imp._reviewers set to pap
  • Design_score changed from 0 to 2.5
  • Design_reviewers set to pap
  • Imp._score changed from 0 to 2
  • About the design I am not enough into natives but I dislike the way of using exeptions and especially the "e.getMessage().contains("length < 0")" thing.
  • There are no native executables built for all platforms and I cannot neither test the fix nor integrate it.
    • The linux32 audio_output/audio_input in the stable-target are not working on my machine(4 bytes -> starting dummy output, because of device problems) whereas the old natives that are in org.sophie2.base.natlib work fine. (Even restarted my X server to make sure it's alright)
  • The latter means that the stable-target is not stable at all and that's not nice.

Changed 10 years ago by stefan

comment:7 Changed 10 years ago by stefan

  • Owner set to stefan
  • Status changed from s1c_analysis_ok to s2a_design_started

comment:8 Changed 10 years ago by stefan

  • Status changed from s2a_design_started to s3b_implementation_finished

comment:9 Changed 10 years ago by meddle

  • Status changed from s3b_implementation_finished to s3c_implementation_ok
  • Imp._score changed from 2 to 3
  • Analysis_reviewers set to stefan
  • Imp._reviewers changed from pap to pap, meddle

Merged into the trunk at [7800].

comment:10 Changed 10 years ago by meddle

  • Design_score changed from 2.5 to 3
  • Analysis_score changed from 0 to 3

comment:11 Changed 10 years ago by deyan

  • Status changed from s3c_implementation_ok to closed

Batch update from file query-10.csv

Note: See TracTickets for help on using tickets.