Re: [FFmpeg-devel] [PATCH] libavformat/aea EOF Patch

2023-03-09 Thread Marton Balint




On Thu, 9 Mar 2023, asivery wrote:


Thank you very much, indeed that works as well.
Here's the updated patch.


Will apply, thanks.

Marton



Best regards.

---
diff --git a/libavformat/aea.c b/libavformat/aea.c
index f4b39e4f9e..d16217381b 100644
--- a/libavformat/aea.c
+++ b/libavformat/aea.c
@@ -90,13 +90,7 @@ static int aea_read_header(AVFormatContext *s)

static int aea_read_packet(AVFormatContext *s, AVPacket *pkt)
{
-int ret = av_get_packet(s->pb, pkt, s->streams[0]->codecpar->block_align);
-
-pkt->stream_index = 0;
-if (ret <= 0)
-return AVERROR(EIO);
-
-return ret;
+return av_get_packet(s->pb, pkt, s->streams[0]->codecpar->block_align);
}

const AVInputFormat ff_aea_demuxer = {

--- Original Message ---
On Thursday, March 9th, 2023 at 12:28 AM, Marton Balint  wrote:




On Sat, 4 Mar 2023, asivery wrote:


Could someone please take a look? This would improve AEA demuxing, right now 
every AEA file makes ffmpeg crash with an error.



The way I see it, you could simply replace the whole body of
aea_read_packet() with this single line:

return av_get_packet(s->pb, pkt, s->streams[0]->codecpar->block_align);


Regards,
Marton


Thank you in advance :)
--- Original Message ---
On Saturday, October 22nd, 2022 at 7:43 PM, asivery asiv...@protonmail.com 
wrote:


Hello,
This patch aims to fix a problem I've noticed while working with AEA (Sony 
ATRAC1 comtainer) files.
Right now FFmpeg always exits with an "Input/Output error" when dealing with 
AEA files.
This patch solves that issue by returning AVERROR_EOF once the end of file is 
encountered, instead of always returning AVERROR(EIO).

I am sending this patch again because of an incorrect mime type of the first 
one.

Best regards,Asivery
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel


To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] [PATCH] libavformat/aea EOF Patch

2023-03-08 Thread asivery
Thank you very much, indeed that works as well.
Here's the updated patch.

Best regards.

---
diff --git a/libavformat/aea.c b/libavformat/aea.c
index f4b39e4f9e..d16217381b 100644
--- a/libavformat/aea.c
+++ b/libavformat/aea.c
@@ -90,13 +90,7 @@ static int aea_read_header(AVFormatContext *s)
 
 static int aea_read_packet(AVFormatContext *s, AVPacket *pkt)
 {
-int ret = av_get_packet(s->pb, pkt, s->streams[0]->codecpar->block_align);
-
-pkt->stream_index = 0;
-if (ret <= 0)
-return AVERROR(EIO);
-
-return ret;
+return av_get_packet(s->pb, pkt, s->streams[0]->codecpar->block_align);
 }
 
 const AVInputFormat ff_aea_demuxer = {

--- Original Message ---
On Thursday, March 9th, 2023 at 12:28 AM, Marton Balint  wrote:


> 
> On Sat, 4 Mar 2023, asivery wrote:
> 
> > Could someone please take a look? This would improve AEA demuxing, right 
> > now every AEA file makes ffmpeg crash with an error.
> 
> 
> The way I see it, you could simply replace the whole body of
> aea_read_packet() with this single line:
> 
> return av_get_packet(s->pb, pkt, s->streams[0]->codecpar->block_align);
> 
> 
> Regards,
> Marton
> 
> > Thank you in advance :)
> > --- Original Message ---
> > On Saturday, October 22nd, 2022 at 7:43 PM, asivery asiv...@protonmail.com 
> > wrote:
> > 
> > > Hello,
> > > This patch aims to fix a problem I've noticed while working with AEA 
> > > (Sony ATRAC1 comtainer) files.
> > > Right now FFmpeg always exits with an "Input/Output error" when dealing 
> > > with AEA files.
> > > This patch solves that issue by returning AVERROR_EOF once the end of 
> > > file is encountered, instead of always returning AVERROR(EIO).
> > > 
> > > I am sending this patch again because of an incorrect mime type of the 
> > > first one.
> > > 
> > > Best regards,Asivery
> > > ___
> > > ffmpeg-devel mailing list
> > > ffmpeg-devel@ffmpeg.org
> > > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> > 
> > To unsubscribe, visit link above, or email
> > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
> 
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] [PATCH] libavformat/aea EOF Patch

2023-03-08 Thread Marton Balint




On Sat, 4 Mar 2023, asivery wrote:


Could someone please take a look? This would improve AEA demuxing, right now 
every AEA file makes ffmpeg crash with an error.


The way I see it, you could simply replace the whole body of 
aea_read_packet() with this single line:


return av_get_packet(s->pb, pkt, s->streams[0]->codecpar->block_align);

Regards,
Marton


Thank you in advance :)
--- Original Message ---
On Saturday, October 22nd, 2022 at 7:43 PM, asivery  
wrote:


Hello,
This patch aims to fix a problem I've noticed while working with AEA (Sony 
ATRAC1 comtainer) files.
Right now FFmpeg always exits with an "Input/Output error" when dealing with 
AEA files.
This patch solves that issue by returning AVERROR_EOF once the end of file is 
encountered, instead of always returning AVERROR(EIO).

I am sending this patch again because of an incorrect mime type of the first 
one.

Best regards,Asivery

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] [PATCH] libavformat/aea EOF Patch

2023-03-04 Thread asivery
Could someone please take a look? This would improve AEA demuxing, right now 
every AEA file makes ffmpeg crash with an error.
Thank you in advance :)
--- Original Message ---
On Saturday, October 22nd, 2022 at 7:43 PM, asivery  
wrote:

> Hello,
> This patch aims to fix a problem I've noticed while working with AEA (Sony 
> ATRAC1 comtainer) files.
> Right now FFmpeg always exits with an "Input/Output error" when dealing with 
> AEA files.
> This patch solves that issue by returning AVERROR_EOF once the end of file is 
> encountered, instead of always returning AVERROR(EIO).
>
> I am sending this patch again because of an incorrect mime type of the first 
> one.
>
> Best regards,Asivery
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".