[FFmpeg-cvslog] rtpdec_h264: Return proper error codes

Martin Storsjö git at videolan.org
Sat May 5 20:36:37 CEST 2012


ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Sat May  5 00:29:15 2012 +0300| [b7b7354c336a0e3df8b6e7ca8baebe8750ed0f45] | committer: Martin Storsjö

rtpdec_h264: Return proper error codes

Signed-off-by: Martin Storsjö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b7b7354c336a0e3df8b6e7ca8baebe8750ed0f45
---

 libavformat/rtpdec_h264.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/rtpdec_h264.c b/libavformat/rtpdec_h264.c
index 8b56ada..f3793f5 100644
--- a/libavformat/rtpdec_h264.c
+++ b/libavformat/rtpdec_h264.c
@@ -272,7 +272,7 @@ static int h264_handle_packet(AVFormatContext *ctx,
         av_log(ctx, AV_LOG_ERROR,
                "Unhandled type (%d) (See RFC for implementation details\n",
                type);
-        result= -1;
+        result = AVERROR(ENOSYS);
         break;
 
     case 28:                   // FU-A (fragmented nal)
@@ -319,7 +319,7 @@ static int h264_handle_packet(AVFormatContext *ctx,
     case 31:                   // undefined
     default:
         av_log(ctx, AV_LOG_ERROR, "Undefined type (%d)", type);
-        result= -1;
+        result = AVERROR_INVALIDDATA;
         break;
     }
 



More information about the ffmpeg-cvslog mailing list