[FFmpeg-devel] [PATCH] avformat/electronicarts: support ADPCM PSX

Peter Ross pross at xvid.org
Thu Oct 22 06:29:55 CEST 2015


On Wed, Oct 21, 2015 at 11:14:02PM +0200, Paul B Mahol wrote:
> Signed-off-by: Paul B Mahol <onemda at gmail.com>
> ---
>  libavformat/electronicarts.c | 19 +++++++++++++++----
>  1 file changed, 15 insertions(+), 4 deletions(-)
> 
> diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c
> index c0b6d6e..12eec80 100644
> --- a/libavformat/electronicarts.c
> +++ b/libavformat/electronicarts.c
> @@ -86,6 +86,8 @@ typedef struct EaDemuxContext {
>      int sample_rate;
>      int num_channels;
>      int num_samples;
> +
> +    int platform;
>  } EaDemuxContext;

all looks okay
tested with psx samples

> @@ -653,7 +664,7 @@ static int ea_read_packet(AVFormatContext *s, AVPacket *pkt)
>          case SEND_TAG:
>          case SEEN_TAG:
>              while (!avio_feof(pb)) {
> -                if (avio_rl32(pb)) {
> +                if (avio_rl32(pb) == SCHl_TAG) {
>                      avio_skip(pb, -4);
>                      break;
>                  }

seems unrelated to demuxing files containing ADPCM PSX audio?

also note, this case block is triggered by several different versions of elecontric arts files
'end audio stream tags' (SEAD, 1SNx, SCxLl). but when with this hunk applied, the loop only ends early
if 'SCHl_TAG' is reached.

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20151022/8067dfad/attachment.sig>


More information about the ffmpeg-devel mailing list