]> git.sesse.net Git - ffmpeg/commitdiff
rtpdec_h264: Return proper error codes
authorMartin Storsjö <martin@martin.st>
Fri, 4 May 2012 21:29:15 +0000 (00:29 +0300)
committerMartin Storsjö <martin@martin.st>
Sat, 5 May 2012 00:09:44 +0000 (03:09 +0300)
Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/rtpdec_h264.c

index 8b56ada3975485a76ec6bc4e7aad9d673cc7ab1a..f3793f5ec6faf91b2d93bc73cd7acb87488c20e5 100644 (file)
@@ -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;
     }